update-grub error {cannot find device for /} is /dev mounted ?

Xen list at xenhideout.nl
Tue Aug 15 07:24:21 UTC 2017


Sreyan Chakravarty schreef op 14-08-2017 19:45:

> mount /dev/mapper/ubuntu-root /mnt
> mount /dev/sda5 /mnt/@/boot
> 
> For some reason when I mount the root partition from the LVM it is 
> under "@" directory in the mount point. Hence I have to mount the 
> separate boot partition under /mnt/@/boot.

This makes no sense to me. That would imply that there is only one 
subdirectory in / and this is @ and it contains all the rest.

> Then perform the chroot
> chroot . /bin/bash -l

I assume you are in /mnt/@ when you do that?

> I get the error-:
> /usr/sbin/grub-mkconfig error cannot find device for / is /dev mounted
> 
> can someone please help ? Is this because I am using / partition in an 
> encrypted LVM ? I have already mounted /dev.

That should make no difference. GRUB is going to use the LVM ID (UUID) 
of your partitions to find your /boot, provided it is unencrypted, and 
if you have full encryption including /boot, it will first unlock your 
container and then proceed using UUIDs so it will still be referencing 
the unlocked LVM.

I mean during boot of course.

I would insist that the @ thing is wrong, but who am I to know?

Obviously Grub is going to be checking your partitions and trying to see 
if anything is in there; it would be weird if it had to look under @, 
your root partition is mounted this way but your boot is fine right?

You can probably use the -v flag or similar to get very verbose error 
reporting for grub-mkconfig, at least that works for grub-install. Give 
it a try?




More information about the ubuntu-users mailing list