grub-probe fails for logical volume on GPT disk
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: grub2
Environment as follows:
Intel DG45ID motherboard, Intel E7300 (Core 2 Duo) processor, 4GB Kingston RAM
Samsung 1.5 TB SATA hard drive.
Hard drive labeled with GPT and partitioned as follows:
/dev/sda1 - 8MB, flag BIOS_GRUB
/dev/sda2 - 1.4 TB, flag LVM
/dev/sda3 - 8 GB, formatted as ext4
Installing from Ubuntu Karmic Alpha 3 (x86_64), alternate install CD
Scenario 1-
a) Created volume group gptvg on physical volume /dev/sda2
b) Created logical volume lvroot on gptvg
c) Installed karmic onto lvroot (no separate /boot)
d) Final step (install grub) loads grub2 packages but fails to install grub on MBR (hd0). Red error screen.
e) rebooted from karmic install disc, selected rescue mode.
f) executing grub-install manually returns an error from grub-probe "no mapping exists for (gptvg-lvroot).
Scenario 2-
a) Installed karmic onto /dev/sda3.
b) This time grub is successfully loaded onto MBR, and reboot is successful. Verified that contents of /dev/sda1 match what is in /boot/grub/core.img
c) grub-probe -t fs / is sucessful (print "ext2")
d) created logical volume lvdata, formatted as ext4, mounted as /data
e) grub-probe -t fs /data is NOT successful. Same error as before ("no mapping exists for (gptvg-lvdata)")
Scenario 3-
a) Used different hard disk with pc (msdos) partitioning
b) Disk contains single partition (/dev/sda1)
c) created volume group pcvg using physical volume /dev/sda1
d) created logical volume lvroot
e) Installed Karmic on lvroot (no separate /boot)
f) grub is successfully loaded to MBR
g) system boots normally.
h) grub-probe -t fs / is successful (prints "ext2")
So to net this out:
a) grub2 works for / on LVM logical volume if standard MSDOS partitioning is used.
b) grub works for GPT partitioning if / is on a regular partition
c) grub2 does NOT work when the two are combined - GPT partitioning, boot partition on a LVM logical volume
Further info:
In scenario 2, grub-probe -v -t fs / shows that the message preceding the error is "opening (gptvg-lvroot)
Let me correct my last comment.
1) In scenario 1, grub-probe -v -t fs / shows the message preceding the error is "opening (gptvg-lvroot)"
2) In scenario 2, grub-probe -v -t fs /data shows the message preceding the error is "opening (gptvg-lvdata)"
If I replace -t fs with -t partmap in the commands above, the result is the same. So it seems that for grub-probe discovering the partition map is an interim step to discovering the filesystem type, and that's where the problem is.