Tue 01 Dec 2009 09:51:15 AM UTC, original submission:
I want to use grub2 (1.97.1) to boot OpenSuSE-ia32 (10.3) from a GPT-labeled disk. The disk was prepared using parted2 (GIT-20091124):
# parted2 /dev/sda print
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 42,9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17,4kB 214MB 214MB ext3 primary boot
2 214MB 222MB 8225kB primary bios_grub
3 222MB 42,9GB 42,7GB primary lvm
-------- end of output -----------
Parted2 writes a protected MBR to the disk which shows up in fdisk:
# LANG=C fdisk -l /dev/sda
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 208828 83 Linux
/dev/sda2 27 27 8032 83 Linux
/dev/sda3 28 5222 41726145 83 Linux
/dev/sda4 1 1 0+ ee EFI GPT
Partition table entries are not in disk order
-------- end of output -----------
grub2-install produces the following error:
/usr/sbin/grub2-install --recheck --no-floppy /dev/sda --force
grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!
grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged.
Installation finished. No error reported.
This is the contents of the device map /boot/grub2/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(hd0) /dev/sda
-------- end of output -----------
As shown in the parted2-output there is a BIOS Boot Partition on the disk (flag bios_grug), but grub2-install fails to detect it, because it only checks the first partition for the "EFI GPT" label.
I've attached a patch to fix this.
|