Bug#782264: grub-install fails in nested LVM
Josip Rodin
joy at debbugs.entuzijast.net
Tue Apr 28 07:31:11 UTC 2015
Hi,
I think this bug can be genericized to grub-install and update-grub no
longer working inside chroot with a LVM backing device. Actual nested LVM
isn't necessary to reproduce the problem.
You used to be able to give it a device node -- pointing to the LV -- and it
would grub-install or update-grub on that. So just copy the two
/dev/foo{,-p1} files into the chroot's /dev and you're done.
Now it seems to take that node you have it on the command-line and try to
canonicalize it, which fails.
When you do it without nested /proc, you get this:
% sudo chroot /mnt/ubuntu14-build grub-install --modules=part_msdos /dev/new-root
Installing for i386-pc platform.
/proc/devices: fopen failed: No such file or directory
/proc/devices: fopen failed: No such file or directory
/proc/devices: fopen failed: No such file or directory
/proc/devices: fopen failed: No such file or directory
/proc/devices: fopen failed: No such file or directory
device node not found
Installation finished. No error reported.
This actually manages to stuff GRUB into the MBR, but there's no
/boot/grub/grub.cfg to actually boot; when you run update-grub, it fails
just like when you try grub-install with nested /proc:
% sudo chroot /mnt/ubuntu14-build mount none -t proc /proc
% sudo chroot /mnt/ubuntu14-build grub-install --modules=part_msdos /dev/new-root
Installing for i386-pc platform.
grub-install: error: failed to get canonical path of `/dev/mapper/vgayrabtu-ubuntu14--build--root-p1'.
--
2. That which causes joy or happiness.
More information about the Pkg-grub-devel
mailing list