2

I created a new root partition and I am trying run update-grub inside a chroot. I bindmount the following

for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done

And then:

update-grub
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?)

The error message normally occurs when /proc or /dev are not mounted but, as described above, I believe they were mounted correctly.

Why can't I run update-grub?

Jakuje
  • 9,145
  • 2
  • 40
  • 44
user1295450
  • 51
  • 1
  • 5
  • possible duplicate of [update grub2 without hardware access (e.g. in a chroot)?](http://serverfault.com/questions/401351/update-grub2-without-hardware-access-e-g-in-a-chroot) – 200_success Dec 07 '14 at 02:39
  • Doesn't seem like a duplicate because update-grub fails for me even with /dev bind mounted – user1295450 Dec 07 '14 at 03:14
  • Is /etc/mtab a symlink to /proc/mounts (as it should be, nowadays)? If it is, what device does it say is mounted as the root file system? Is that device accessible in the chroot? – Teddy Dec 07 '14 at 20:39
  • It wasn't symlinked but symlinking didn't help. Root file system was then listed as rootfs, no specific device was listed. – user1295450 Dec 07 '14 at 23:14

0 Answers0