Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 904228

Summary: sys-boot/grub: Grub fails to detect LVM volumes with: error: disk `lvmid/*/*' not found
Product: Gentoo Linux Reporter: Horst Prote <prote>
Component: Current packagesAssignee: Mike Gilbert <floppym>
Status: UNCONFIRMED ---    
Severity: major CC: base-system, prote, sam
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.debian.org/987008
https://savannah.gnu.org/bugs/?61620
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch

Description Horst Prote 2023-04-12 13:14:18 UTC
Created attachment 859936 [details, diff]
Patch

See also https://savannah.gnu.org/bugs/?func=detailitem&item_id=61620
and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987008

Citation from the svannah.gnu.org Bug:
When handling a regular LVM volume, Grub can fail with the message:
error: disk `lvmid/******-****-****-****-****-****-
****/******-****-****-****-****-****-******' not found.

If the condition which triggers this exists, grub-probe will report the error mentioned above. Similarly, the grub boot code will fail to detect LVM volumes, resulting in a failure to boot off of LVM disks/partitions. The condition can be created on any LVM VG by an LVM configuration change, so any system with /boot on LVM can become unbootable at 'any' time (after any LVM configuration change).

==== Cause ===
The problem is caused by an incorrect computation of mda_end in lvm.c, when the metadata area wraps around.
--- Citation End ---

I was hit by this yesterday, then tried the proposed fix on grub-2.06-r6 (see attached patch) which worked for me.
Comment 1 Mike Gilbert gentoo-dev 2024-04-03 02:42:36 UTC
I'm not comfortable applying this patch without upstream review. Please submit it to to the grub-devel mailing list.