grub-probe fails for logical volume on GPT disk

Bug #408580 reported by Hunter
10
This bug affects 2 people
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)

Related branches

Revision history for this message
Hunter (oxothuk-maps) wrote :

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.

Revision history for this message
Felix Zielcke (fzielcke) wrote : Re: [Bug 408580] [NEW] grub-probe fails for logical volume on GPT disk

Am Montag, den 03.08.2009, 20:54 +0000 schrieb Hunter:
> 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)

I just tried it out myself. Installed karmic alpha 3 with GPT,
seperate /boot and / on LVM

root@ubuntu:~# grub-probe -t abstraction /
lvm
root@ubuntu:~# grub-probe -t partmap /
gpt
root@ubuntu:~# grub-probe -t fs /
ext2

Maybe your LVM has an unknown metadata header or multiple data/metadata
areas.
I think in these cases the error isn't always shown or something has
changed that they aren't anymore displayed.
Multiple metadata areas are now fixed upstream.

--
Felix Zielcke
Proud Debian Maintainer

Revision history for this message
Hunter (oxothuk-maps) wrote :

I'll check the number of metadata areas when I get home, but this sounds like a plausible explanation. From some brief googling, it seems like the number of LVM metadata areas for "large" disks is now 2 by default. Not sure what their threshold is, but I would certainly expect that my 1.5 TB Samsung drive is "large". OTOH, the disk on which I was successful (with a MSDOS label) was not nearly as large - 250GB.

Where can I go to get the upstream version - preferably in the form of a rescue disc ?

Revision history for this message
Felix Zielcke (fzielcke) wrote :

I'm not sure if you mean a floppy or cd image with rescue disc so I attach just both.
you need to `insmod lvm' then ls should show your logical volumes if the multiple metadata areas are the reason for it.

Revision history for this message
Felix Zielcke (fzielcke) wrote :
Revision history for this message
Hunter (oxothuk-maps) wrote :

ok, I confirmed two things:
a) my large disk volume group does in fact have two metadata areas
b) the grub rescue disc you sent me is able to see the logical volumes on my large disc. I didn't go through the exercise of actually loading the kernel and booting, but I have no reason to think that wouldn't work.

So I think that confirms that my problem is a dupe of the general "more than one metadata area" bug.

Can I expect the fix to flow down to karmic in a later alpha release, or do I need to add my vote somewhere to help make that happen?

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.3 KiB)

This bug was fixed in the package grub2 - 1.96+20090826-3ubuntu1

---------------
grub2 (1.96+20090826-3ubuntu1) karmic; urgency=low

  * Resynchronise with Debian (LP: #413151). Remaining changes:
    + debian/control:
      - Recommend rather than Suggest os-prober.
    + debian/default/grub:
      - Adjust for default Ubuntu boot options.
      - Use GRUB_CMDLINE_LINUX_DEFAULT option to set "quiet splash" for
        default items only. These options won't be set in single user mode.
      - Default to hiding the menu with a three-second timeout. Pressing
        Escape during this time will show the menu.
    + debian/grub.d/05_debian_theme:
      - Set a monochromatic theme for Ubuntu.
    + debian/legacy/update-grub:
      - Apply Ubuntu branding: title, recovery mode, quiet option, and tweak
        how memtest86+ is displayed.
      - Use UUIDs where appropriate.
    + debian/patches/03_ubuntu_grub_standards:
      - Remove GNU/Linux from default string.
    + debian/patches/10_crashkernel.patch:
      - add crashkernel= options if kdump and makedumpfile
        is available (part of the kernel-crashdump spec)
  * Drop 950_hidden_timeout.diff, merged upstream.
  * Drop 951_gfxpayload_keep.diff. It doesn't make as much sense as I
    thought, and it needs better kernel support anyway.
  * 950_getkeystatus.diff: New patch. Add getkeystatus terminal method, and
    add a new keystatus command to query it.
  * 951_quick_boot.diff: New patch:
    - If other operating systems are installed, then automatically unhide
      the menu (LP: #411584).
    - Otherwise, if GRUB_HIDDEN_TIMEOUT is 0, then use keystatus if
      available to check whether Shift is pressed. If it is, show the menu,
      otherwise boot immediately. If keystatus is not available, then fall
      back to a short delay interruptible with Escape.
  * debian/default/grub: Adjust defaults to match new quick-boot code.

grub2 (1.96+20090826-3) unstable; urgency=low

  * Add missing quotes in grub-pc.config and *.postinst.

grub2 (1.96+20090826-2) unstable; urgency=low

  * Really use the correct templates in grub-pc.config. ARGS.

grub2 (1.96+20090826-1) unstable; urgency=low

  * New SVN snapshot.

  * Use the right templates in grub-pc.config. (Closes: #543615)

grub2 (1.96+20090825-1) unstable; urgency=low

  * New SVN snapshot.
    - Enable gfxterm only if there's a suitable video backend and don't
      print an error if not. (Closes: #520846)

  [ Felix Zielcke ]
  * Copy unicode.pf2 instead of ascii.pf2 to /boot/grub in grub-pc
    postinst (Closes: #542314).
  * Update Standards version to 3.8.3.
  * Use DEB_HOST_ARCH_CPU for the generation of the lintian overrides.
  * Fix calling the grub-pc/postrm_purge_boot_grub template in
    grub-pc.postinst.
  * Handle GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT via
    debconf. Thanks to Martin F. Krafft and Colin Watson for idea and
    hints.
  * Use ucfr --force when /etc/default/grub is registered to a grub-* package.
  * Use #!/bin/sh in *.config and fix a small bashism in grub-pc.config.

  [ Robert Millan ]
  * patches/907_terminal_output_workaround.diff: Remove. It seems that
    it wasn't really necessary.
  ...

Read more...

Changed in grub2 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.