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

Bug 320641

Summary: sys-boot/grub-1.98 grub-probe fails to detect devicemapper discs
Product: Gentoo Linux Reporter: Bernd Lommerzheim <bernd>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Severity: normal CC: cjwatson
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description Bernd Lommerzheim 2010-05-19 21:13:04 UTC
As soon as your / or /boot device is a devicemapper disc (/dev/mapper/$name) grub-mkconfig fails with the following error:
 /sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
According to an arch linux bugreport [1] this error occurs because /dev/mapper/$name is a symbolic link to ../dm-$id. I tried the patch [2] from that bugreport and it works for me. Maybe we should add it to the grub-1.98 ebuild because devicemapper is requied when using lvm or cryptsetup and this is a quite common configuration. Thanks.
Comment 1 SpanKY gentoo-dev 2010-05-20 22:47:40 UTC
grub2 issues go upstream
Comment 2 Colin Watson 2010-08-18 10:41:36 UTC
I fixed this upstream a while back.  If Gentoo is distributing a set of udev rules that create symlinks under /dev/mapper, then as a matter of good distribution integration work it would be nice if you backported the patch to support this to your current stable ebuild of grub2, so that everything works together and we don't get complaints from Gentoo users directed to us upstream until such time as we release 1.99.

The patch is at; as you can see it's quite small.  It should backport straightforwardly to 1.98, with the exception that you need to remember to apply the patch to util/getroot.c rather than to kern/emu/getroot.c.
Comment 3 SpanKY gentoo-dev 2010-08-18 16:48:47 UTC
better yet, put out a new release already.  we havent started supporting grub2 yet in Gentoo.