mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-27 17:49:23 +00:00
add a workaround to boot Windows from a logical partition.
This commit is contained in:
1 parent
3c8e99279f
commit
ca6efbe093
5 files changed
+34
-9
No files matched your search
@@ -447,6 +447,18 @@ chainloader_func (char *arg, int flags)
|
||||
|
||||
grub_close ();
|
||||
kernel_type = KERNEL_TYPE_CHAINLOADER;
|
||||
|
||||
/* XXX: Windows evil hack. I don't know why, but Windows seems not to
|
||||
set the start address of an extended partition in the BPB correctly.
|
||||
So this is necessary to make Windows bootable even with an extended
|
||||
partition. Maybe this should be made only for Windows, but how can
|
||||
we determine if it is Windows or not precisely?! */
|
||||
if (open_partition () && fat_mount ())
|
||||
*((unsigned long *) (BOOTSEC_LOCATION + BOOTSEC_BPB_HIDDEN_SECTORS))
|
||||
= part_start;
|
||||
|
||||
errnum = ERR_NONE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user