Package: grub-pc
Version: 1.99-27+deb7u2
Severity: normal

Since lvm2 v2.02.106 its udev rule creates a 
/dev/disk/by-id/lvm-pv-uuid-<PV_UUID> symlink for PVs:

  
https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=417e52c13a8156b11c25c411d44bda8b32bf87e4

lvm2 2.02.111-2.2 as present in Debian/jessie includes this change in
/lib/udev/rules.d/69-lvm-metad.rules.

When debootstrapping Debian/wheezy to a virtio disk from a system
running Debian/jessie (or using lvm2 >=v2.02.106) this causes the
resulting GRUB installation to look like that (`/media/ngcp-root` is
the mounted logical volume with the rootfs which also includes /boot):

| root@grml ~ # cat /media/ngcp-root/boot/grub/device.map
| (hd0)   /dev/disk/by-id/lvm-pv-uuid-RNZHr8-hLlc-nles-X9Gs-RYSp-Mqo7-uZTk6N
| (hd1)   /dev/vda

and failing to boot with:

> error: no such disk
> Entering rescue mode...
> grub rescue>

When manually removing the lvm-pv-uuid* symlink from the Debian/jessie
system before installing GRUB it works fine:

| root@grml ~ # rm 
/dev/disk/by-id/lvm-pv-uuid-RNZHr8-hLlc-nles-X9Gs-RYSp-Mqo7-uZTk6N
| root@grml ~ # ls /dev/disk/by-id
| ata-QEMU_DVD-ROM_QM00003@  dm-name-ngcp-swap@                                 
                            
dm-uuid-LVM-lQhnvLyYmhESObLrZcnJs4FTZq9usVDzRex3ImRtrmqhpDH9xKBj22St82lHDADh@
| dm-name-ngcp-root@         
dm-uuid-LVM-lQhnvLyYmhESObLrZcnJs4FTZq9usVDzrcMaDfk8O0RionEYRxdjnYxsY6eb0Esi@
| root@grml ~ # grml-chroot /media/ngcp-root/ grub-install --recheck /dev/vda # 
`grml-chroot` makes sure /proc, /sysfs and /dev are properly mounted in the 
chroot
| Writing /etc/debian_chroot ...
| Installation finished. No error reported.
| root@grml ~ # cat /media/ngcp-root/boot/grub/device.map
| (hd0)   /dev/vda

NOTE: This problem seems to exist only for virtio disks. When using a
disk on the SATA bus the resulting device.map of the Debian/wheezy
system looks like that and boots fine:

| root@grml ~ # cat /media/vg0-root/boot/grub/device.map
| (hd0)   /dev/disk/by-id/ata-QEMU_HARDDISK_QM00005
| (hd1)   /dev/disk/by-id/lvm-pv-uuid-lJJr4E-M96R-3eIS-b6YO-5usn-bH5o-osQV2B

regards,
-mika-


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: https://lists.debian.org/[email protected]

Reply via email to