limine-deploy: Move code to activate partition to after MBR detection
This commit is contained in:
parent
e5f2b2c085
commit
ddf248aaf8
@ -471,13 +471,6 @@ int main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!any_active) {
|
|
||||||
fprintf(stderr, "No active partition found, some systems may not boot.\n");
|
|
||||||
fprintf(stderr, "Setting partition 1 as active to work around the issue...\n");
|
|
||||||
hint8 = 0x80;
|
|
||||||
device_write(&hint8, 446, sizeof(uint8_t));
|
|
||||||
}
|
|
||||||
|
|
||||||
char hintc[64];
|
char hintc[64];
|
||||||
device_read(hintc, 4, 8);
|
device_read(hintc, 4, 8);
|
||||||
if (memcmp(hintc, "_ECH_FS_", 8) == 0) {
|
if (memcmp(hintc, "_ECH_FS_", 8) == 0) {
|
||||||
@ -508,6 +501,13 @@ int main(int argc, char *argv[]) {
|
|||||||
device_write(&hint16, 1080, sizeof(uint16_t));
|
device_write(&hint16, 1080, sizeof(uint16_t));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mbr && !any_active) {
|
||||||
|
fprintf(stderr, "No active partition found, some systems may not boot.\n");
|
||||||
|
fprintf(stderr, "Setting partition 1 as active to work around the issue...\n");
|
||||||
|
hint8 = 0x80;
|
||||||
|
device_write(&hint8, 446, sizeof(uint8_t));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gpt == 0 && mbr == 0) {
|
if (gpt == 0 && mbr == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user