[Bug 591454] Re: grub-probe: cannot find a device for /boot/grub

kostyarin k-i-r at inbox.ru
Tue Sep 20 16:42:45 UTC 2016


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 at 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
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/591454

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

Status in grub2 package in Ubuntu:
  New

Bug description:
  Binary package hint: grub2

  dpkg: dependency problems prevent configuration of ubuntu-standard:
   ubuntu-standard depends on memtest86+; however:
    Package memtest86+ is not configured yet.
  dpkg: error processing ubuntu-standard (--configure):
   dependency problems - leaving unconfigured
  Setting up grub-pc (1.98-1ubuntu6) ...
  /usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).
  No path or device is specified.
  Try `/usr/sbin/grub-probe --help' for more information.
  Auto-detection of a filesystem module failed.
  Please specify the module with the option `--modules' explicitly.

  ProblemType: Package
  DistroRelease: Ubuntu 10.04
  Package: grub-pc 1.98-1ubuntu6
  ProcVersionSignature: Ubuntu 2.6.31-22.60-generic
  Uname: Linux 2.6.31-22-generic x86_64
  Architecture: amd64
  Date: Tue Jun  8 22:41:58 2010
  ErrorMessage:
   ErrorMessage: subprocess installed post-installation script returned error exit status 1
  SourcePackage: grub2
  Title: package grub-pc 1.98-1ubuntu6 failed to install/upgrade:

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



More information about the foundations-bugs mailing list