2008-07-30 Robert Millan <rmh@aybabtu.com>

* include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
        Increase from 0x50 to 0x60.
        * util/i386/pc/grub-install.in: Detect cross-disk installs, and
        use UUIDs to identify the root drive for them.  If that's not
        possible, abort.
        * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
        check, for cross-disk installs.
This commit is contained in:
robertmh 2008-07-30 10:44:38 +00:00
parent ae88bca301
commit 59198b722c
4 changed files with 40 additions and 24 deletions

View file

@ -339,17 +339,11 @@ setup (const char *dir,
if (grub_disk_write (dest_dev->disk, embed_region.start, 0, core_size, core_img))
grub_util_error ("%s", grub_errmsg);
/* The boot image and the core image are on the same drive,
so there is no need to specify the boot drive explicitly. */
*boot_drive = 0xff;
*kernel_sector = grub_cpu_to_le64 (embed_region.start);
/* FIXME: can this be skipped? */
*boot_drive = 0xFF;
*root_drive = 0xFF;
/* If the root device is different from the destination device,
it is necessary to embed the root drive explicitly. */
if (root_dev->disk->id != dest_dev->disk->id)
*root_drive = (grub_uint8_t) root_dev->disk->id;
else
*root_drive = 0xFF;
*kernel_sector = grub_cpu_to_le64 (embed_region.start);
/* Write the boot image onto the disk. */
if (grub_disk_write (dest_dev->disk, 0, 0, GRUB_DISK_SECTOR_SIZE,
@ -480,15 +474,8 @@ setup (const char *dir,
*kernel_sector = grub_cpu_to_le64 (first_sector);
/* If the destination device is different from the root device,
it is necessary to embed the boot drive explicitly. */
if (root_dev->disk->id != dest_dev->disk->id)
*boot_drive = (grub_uint8_t) root_dev->disk->id;
else
*boot_drive = 0xFF;
/* When the core image is not embedded, the root device always follows
the boot device. */
/* FIXME: can this be skipped? */
*boot_drive = 0xFF;
*root_drive = 0xFF;
*install_dos_part = grub_cpu_to_le32 (dos_part);