mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 09:10:53 +00:00
change the check for a Windows partition in chainloader_func, to fix the problem that GRUB cannot be compiled, if FAT support is disabled.
This commit is contained in:
1 parent
e85272f436
commit
1372bfd60a
3 files changed
+11
-6
No files matched your search
@@ -1,3 +1,9 @@
|
|||||||
|
2001-02-27 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* stage2/builtins.c (chainloader_func): Don't check if the
|
||||||
|
current partition is FAT, but check if it has a FAT partition
|
||||||
|
type and the BPB has a system id starting with "MSWIN".
|
||||||
|
|
||||||
2001-02-27 OKUJI Yoshinori <okuji@gnu.org>
|
2001-02-27 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
Added hercules support based on a patch by Frank Mehnert
|
Added hercules support based on a patch by Frank Mehnert
|
||||||
|
|||||||
+4
-6
@@ -448,12 +448,10 @@ chainloader_func (char *arg, int flags)
|
|||||||
grub_close ();
|
grub_close ();
|
||||||
kernel_type = KERNEL_TYPE_CHAINLOADER;
|
kernel_type = KERNEL_TYPE_CHAINLOADER;
|
||||||
|
|
||||||
/* XXX: Windows evil hack. I don't know why, but Windows seems not to
|
/* XXX: Windows evil hack. For now, only the first five letters are
|
||||||
set the start address of an extended partition in the BPB correctly.
|
checked. */
|
||||||
So this is necessary to make Windows bootable even with an extended
|
if (IS_PC_SLICE_TYPE_FAT (current_slice)
|
||||||
partition. Maybe this should be made only for Windows, but how can
|
&& ! grub_memcmp (BOOTSEC_LOCATION + BOOTSEC_BPB_SYSTEM_ID, "MSWIN", 5))
|
||||||
we determine if it is Windows or not precisely?! */
|
|
||||||
if (open_partition () && fat_mount ())
|
|
||||||
*((unsigned long *) (BOOTSEC_LOCATION + BOOTSEC_BPB_HIDDEN_SECTORS))
|
*((unsigned long *) (BOOTSEC_LOCATION + BOOTSEC_BPB_HIDDEN_SECTORS))
|
||||||
= part_start;
|
= part_start;
|
||||||
|
|
||||||
|
|||||||
@@ -175,6 +175,7 @@ extern char *grub_scratch_mem;
|
|||||||
#define BOOTSEC_SIGNATURE 0xAA55
|
#define BOOTSEC_SIGNATURE 0xAA55
|
||||||
#define BOOTSEC_BPB_OFFSET 0x3
|
#define BOOTSEC_BPB_OFFSET 0x3
|
||||||
#define BOOTSEC_BPB_LENGTH 0x3B
|
#define BOOTSEC_BPB_LENGTH 0x3B
|
||||||
|
#define BOOTSEC_BPB_SYSTEM_ID 0x3
|
||||||
#define BOOTSEC_BPB_HIDDEN_SECTORS 0x1C
|
#define BOOTSEC_BPB_HIDDEN_SECTORS 0x1C
|
||||||
#define BOOTSEC_PART_OFFSET 0x1BE
|
#define BOOTSEC_PART_OFFSET 0x1BE
|
||||||
#define BOOTSEC_PART_LENGTH 0x40
|
#define BOOTSEC_PART_LENGTH 0x40
|
||||||
|
|||||||
Reference in new issue
Block a user