The bug is still present.

# update-grub -v
grub-mkconfig (GRUB) 2.02~beta2-36ubuntu3.2

After chroot

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

Ubuntu: kubuntu-16.04.1-desktop-amd64

Filesystem:
/dev/sda  <- grub installed here
/dev/sda5 <- /boot (btrfs)
/dev/sda6 <- /     (btrfs with @ subvolume)
/dev/sda7 <- /home (btrfs with @home subvolume)

I've installed Kubuntu from ISO image to this filesystem. I didn't
create subvolumes the installer did that.

After installation I've entered chroot using this commands:

sudo mount -v -t btrfs /dev/sda6 /mnt -O noatime,nodiratime,subvol=@
sudo mount -v -t btrfs /dev/sda5 /mnt/@/boot -O noatime,nodiratime
sudo mount -v -t btrfs /dev/sda7 /mnt/@/home -O noatime,nodiratime,subvol=@home
for i in sys proc dev dev/pts; do sudo mount -v --bind /$i /mnt/@/$i; done
sudo chroot /mnt/@

The stupid thing is @ directory after /mnt. I really don't know how to
avoid it. I thing it's root of all problems.

Ok, after chroot I've edit /etc/grub.d/40_custom to add ISO image from
another partition (/dev/sda7) but update-grub fails:

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

More than that I've used some monkey path from internet that force grub-
probe to return 0. But the system is in unusable state anyway.

Firstly I've got "sparse file not allowed error". Solve it by commenting
out of this line

if [ -n "\${have_grubenv}" ]; then if [ -z "\${boot_once}" ]; then
save_env recordfail; fi; fi

in /etc/grub.d/00_header file.

Secondly I've got "device not found 'root'". It seems that linux
commandline options is wrong.

Take a look

root@kubuntu:/# cat /boot/grub/grub.cfg | grep vmlinuz
        linux   /vmlinuz-4.4.0-31-generic root=/dev/sda1 ro  quiet splash 
$vt_handoff
                linux   /vmlinuz-4.4.0-31-generic root=/dev/sda1 ro  quiet 
splash $vt_handoff
                linux   /vmlinuz-4.4.0-31-generic root=/dev/sda1 ro recovery 
nomodeset 
        linux (loop)/casper/vmlinuz.efi boot=casper 
iso-scan/filename=${isofile} quiet splash

As you can see `root=/dev/sda1` instead of /dev/sda6. But nothing
changes if I change it manually to /dev/sda6 or UUID=blah. I've also
tryied UUID=blah + rootflags=subvol=@. Nothing workrs.

I think that all of this problems has a single root. And, actually, it's
critical.

** Changed in: grub2 (Ubuntu)
       Status: Invalid => New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/591454

Title:
  grub-probe: cannot find a device for /boot/grub

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/591454/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to