=== modified file 'grub-core/boot/i386/pc/boot.S' --- grub-core/boot/i386/pc/boot.S 2010-09-19 22:06:45 +0000 +++ grub-core/boot/i386/pc/boot.S 2010-12-17 04:27:12 +0000 @@ -407,11 +407,13 @@ ret /* - * Windows NT breaks compatibility by embedding a magic - * number here. + * Windows NT uses this as a 32-bit Volume Id that is unique + * amoung disks connected to the system and needs to be + * preserved. LILO acts similarly, using this field to locate + * the disks with its second stage. */ - . = _start + GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC + . = _start + GRUB_BOOT_MACHINE_X86_VOLID nt_magic: .long 0 .word 0 === modified file 'include/grub/i386/pc/boot.h' --- include/grub/i386/pc/boot.h 2010-04-26 08:56:12 +0000 +++ include/grub/i386/pc/boot.h 2010-12-12 06:22:16 +0000 @@ -39,8 +39,8 @@ /* The offset of BOOT_DRIVE_CHECK. */ #define GRUB_BOOT_MACHINE_DRIVE_CHECK 0x66 -/* The offset of a magic number used by Windows NT. */ -#define GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC 0x1b8 +/* The offset of what is used as a Volume Id by Windows NT and LILO. */ +#define GRUB_BOOT_MACHINE_X86_VOLID 0x1b8 /* The offset of the start of the partition table. */ #define GRUB_BOOT_MACHINE_PART_START 0x1be === modified file 'util/grub-setup.c' --- util/grub-setup.c 2010-11-26 21:03:16 +0000 +++ util/grub-setup.c 2010-12-12 06:19:44 +0000 @@ -396,9 +396,9 @@ /* Copy the partition table. */ if (dest_partmap) - memcpy (boot_img + GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC, - tmp_img + GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC, - GRUB_BOOT_MACHINE_PART_END - GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC); + memcpy (boot_img + GRUB_BOOT_MACHINE_X86_VOLID, + tmp_img + GRUB_BOOT_MACHINE_X86_VOLID, + GRUB_BOOT_MACHINE_PART_END - GRUB_BOOT_MACHINE_X86_VOLID); free (tmp_img);