Bug#542435: grub-probe: error: cannot find a device for /. (LVM2)

Stefan Lippers-Hollmann s.L-H at gmx.de
Wed Aug 19 19:01:20 UTC 2009


Hi

On Wednesday 19 August 2009, Felix Zielcke wrote:
> Am Mittwoch, den 19.08.2009, 18:12 +0200 schrieb Stefan
> Lippers-Hollmann:
[...]
> > Since 2.02.51-1 (17 Aug 2009), lvm2 depends on dmsetup, which ships a few 
> > udev rules:
> > 
> > /lib/udev/rules.d/55-dm.rules
> > /lib/udev/rules.d/60-persistent-storage-dm.rules
> > /lib/udev/rules.d/95-dm-notify.rules
> > 
> > Trying to call grub-probe (indirectly through grub-install or update-grub)
> > on a kernel whose initramfs includes these udev rules results in grub-probe
> > failing to find the / "partition" (a logical volume on LVM2):
> > 
> > # grub-probe  --target=device /
> > grub-probe: error: cannot find a device for /.
> > 
> > This failure breaks installing grub2 on a pure LVM2 system and renders an 
> > installed system (which has always been working fine for me) on LVM2 
> > unbootable, as soon as dmsetup and its udev rules enter the initramfs and 
> > when update-grub gets invoked by installing kernel updates.
> > 
> > Deleting dmsetup's udev rules and regenerating the initramfs makes 
> > grub-probe working again.
> > 
> > I am reliably experiencing this problem, which renders the affectable 
> > systems unbootable on initramfs changes or kernel updates, on 3 systems 
> > using ext3 and ext4 for / since dmsetup got pulled in by lvm2. It is 
> > independent of the installed kernel version (2.6.29 - 2.6.31-rc6-git5)
> > Please feel free to reassign to dmsetup (lvm2), but I assume grub-probe 
> > simply can't interpret the mangled udev representation since dmsetup got 
> > installed.
> > 
> 
> Are the /dev/mapper/* files still created or are there now just
> the /dev/vg/lv ones?
> grub-probe only supports the /dev/mapper/ ones.

=== working, without dmsetup udev rules ===

$ ls -al /dev/mapper/ /dev/sputnik/
/dev/mapper/:
insgesamt 0
drwxr-xr-x  2 root root     140 19. Aug 20:52 .
drwxr-xr-x 17 root root    2880 19. Aug 20:52 ..
crw-rw----  1 root root  10, 60 19. Aug 2009  control
brw-rw----  1 root disk 254,  0 19. Aug 2009  sputnik-debian64
brw-rw----  1 root disk 254,  3 19. Aug 20:52 sputnik-home
brw-rw----  1 root disk 254,  2 19. Aug 20:52 sputnik-swap
brw-rw----  1 root disk 254,  1 19. Aug 20:52 sputnik-var

/dev/sputnik/:
insgesamt 0
drwxr-xr-x  2 root root  120 19. Aug 20:52 .
drwxr-xr-x 17 root root 2880 19. Aug 20:52 ..
lrwxrwxrwx  1 root root   28 19. Aug 2009  debian64 -> /dev/mapper/sputnik-debian64
lrwxrwxrwx  1 root root   24 19. Aug 20:52 home -> /dev/mapper/sputnik-home
lrwxrwxrwx  1 root root   24 19. Aug 20:52 swap -> /dev/mapper/sputnik-swap
lrwxrwxrwx  1 root root   23 19. Aug 20:52 var -> /dev/mapper/sputnik-var

# grub-probe  --target=device /
/dev/mapper/sputnik-debian64


=== NOT working, with dmsetup udev rules ===

$ ls -al /dev/mapper/ /dev/sputnik/
/dev/mapper/:
insgesamt 0
drwxr-xr-x  2 root root    140 19. Aug 20:56 .
drwxr-xr-x 17 root root   2860 19. Aug 20:57 ..
crw-rw----  1 root root 10, 60 19. Aug 2009  control
lrwxrwxrwx  1 root root      7 19. Aug 2009  sputnik-debian64 -> ../dm-0
lrwxrwxrwx  1 root root      7 19. Aug 20:56 sputnik-home -> ../dm-3
lrwxrwxrwx  1 root root      7 19. Aug 20:56 sputnik-swap -> ../dm-2
lrwxrwxrwx  1 root root      7 19. Aug 20:56 sputnik-var -> ../dm-1

/dev/sputnik/:
insgesamt 0
drwxr-xr-x  2 root root  120 19. Aug 20:56 .
drwxr-xr-x 17 root root 2860 19. Aug 20:57 ..
lrwxrwxrwx  1 root root    7 19. Aug 2009  debian64 -> ../dm-0
lrwxrwxrwx  1 root root    7 19. Aug 20:56 home -> ../dm-3
lrwxrwxrwx  1 root root    7 19. Aug 20:56 swap -> ../dm-2
lrwxrwxrwx  1 root root    7 19. Aug 20:56 var -> ../dm-1

# grub-probe  --target=device /
grub-probe: error: cannot find a device for /.

Regards
	Stefan Lippers-Hollmann
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20090819/4fefaf81/attachment.pgp>


More information about the Pkg-grub-devel mailing list