Package: grub-pc Version: 2.02~beta2-22 Severity: important Dear Maintainer,
I was trying to install grub to a raw image (i.e. a flat file that will be used to house a VM). Host & guest image both Debian Jessie I have partitioned the file: part 1 : ext2 (for boot) part 2 : LVM (for root & swap) I have the raw mounted to /dev/loop0 with kpartx so these partitions map to: part 1 : /dev/mapper/loop0p1 part 2 : /dev/mapper/loop0p2 The LVM setup (vg labelled "lv") on part 2 provides: /dev/mapper/lv-root /dev/mapper/lv-swap_1 I then have it mounted like this: /dev/mapper/lv-root -> /mnt /dev/mapper/loop0p1 -> /mnt/boot I then install grub like this: chroot /mnt grub-mkdevicemap chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg grub-install --force --root-directory=/mnt /dev/loop0 Which appears to install as it should: # chroot /mnt grub-mkdevicemap # chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.16.0-4-amd64 Found initrd image: /boot/initrd.img-3.16.0-4-amd64 done # grub-install --force --root-directory=/mnt /dev/loop0 Installing for i386-pc platform. Installation finished. No error reported. So this appears to all complete fine... But when I boot the raw image I get an error about a device not found (a UUID that I have no idea where it comes from. It does not appear to match any of the UUIDs that I see in the grub.cfg so I assume that this is coming from the grub installation in the MBR?) I can fix grub easy enough from the vm: -boot with live iso -mount /dev/mapper/lv-root as /mnt & /dev/sda1 as /mnt/boot # grub-install --root-directory=/mnt /dev/sda Once grub is repaired than all works as it should, however I want it to just work from the start... I posted this on the gnu-grub mailing list and a kind soul reproduced it on a similar version of grub-pc (on OpenSUSE) but noted that it could not be reproduced in the current upstream version. I tried my luck on the Stretch version (2.02~beta2-28) and it's fixed there already. I was hoping that we may be able to work out where the issue lays and have the fix backported to Jessie? Any more info you need and/or anything further you would like me to do please let me know. Regards, Jeremy Davis
signature.asc
Description: OpenPGP digital signature