[Bug 703009] Re: grub-probe: error: cannot stat `aufs'.

Christoph Burschka 703009 at bugs.launchpad.net
Fri Aug 19 17:03:20 UTC 2011


For the specific case of upgrading the kernel packages on a live system,
I have found a trick that seems to work for me. I can't be sure it won't
break something, though.

The problem in this case cannot be solved by manually running the grub
utilities, as the package manager will always attempt to run grub-update
by itself.  This runs grub-probe on /, which is the aufs and cannot
apparently be probed. If grub-probe is instead run on the /cdrom path,
which contains the actual USB disk, then it runs through without errors.

My workaround involved modifying the three grub-probe lines in the
/usr/sbin/grub-mkconfig script to use /cdrom instead of /. The script
then ran successfully and generated what looks like the correct
grub.cfg.

Basically, this changeset:

@@ -136,16 +129,16 @@ fi
 mkdir -p ${GRUB_PREFIX}
 
 # Device containing our userland.  Typically used for root= parameter.
-GRUB_DEVICE="`${grub_probe} --target=device /`"
+GRUB_DEVICE="`${grub_probe} --target=device /cdrom`"
 GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true
 
 # Device containing our /boot partition.  Usually the same as GRUB_DEVICE.
-GRUB_DEVICE_BOOT="`${grub_probe} --target=device /boot`"
+GRUB_DEVICE_BOOT="`${grub_probe} --target=device /cdrom/boot`"
 GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`" || true
 
 # Filesystem for the device containing our userland.  Used for stuff like
 # choosing Hurd filesystem module.
-GRUB_FS="`${grub_probe} --target=fs / 2> /dev/null || echo unknown`"
+GRUB_FS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2> /dev/null || echo unknown`"
 
 if test -f ${sysconfdir}/default/grub ; then
   . ${sysconfdir}/default/grub

-- 
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/703009

Title:
  grub-probe: error: cannot stat `aufs'.

Status in “grub2” package in Ubuntu:
  Confirmed

Bug description:
  Binary package hint: grub2

  I can no longer install/upgrade grub2:

  $ sudo grub-install --force /dev/sdb1
  /usr/sbin/grub-probe: error: cannot stat `aufs'.

  
  $ cat /proc/self/mountinfo
  14 22 0:14 / /sys rw,nosuid,nodev,noexec,relatime - sysfs none rw
  15 22 0:3 / /proc rw,nosuid,nodev,noexec,relatime - proc none rw
  16 22 0:5 / /dev rw,relatime - devtmpfs none rw,size=1917364k,nr_inodes=479341,mode=755
  17 16 0:11 / /dev/pts rw,nosuid,noexec,relatime - devpts none rw,gid=5,mode=620,ptmxmode=000
  18 14 0:15 / /sys/fs/fuse/connections rw,relatime - fusectl fusectl rw
  19 22 8:17 / /cdrom rw,relatime - vfat /dev/sdb1 rw,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
  20 22 7:0 / /rofs ro,noatime - squashfs /dev/loop0 ro
  22 1 0:16 / / rw,noatime - aufs aufs rw,si=f61b339350ef0b2d
  23 14 0:7 / /sys/kernel/debug rw,relatime - debugfs none rw
  24 14 0:10 / /sys/kernel/security rw,relatime - securityfs none rw
  25 16 0:17 / /dev/shm rw,nosuid,nodev,relatime - tmpfs none rw
  26 22 0:18 / /tmp rw,nosuid,nodev,relatime - tmpfs tmpfs rw
  27 22 0:19 / /var/run rw,nosuid,relatime - tmpfs none rw,mode=755
  28 22 0:20 / /var/lock rw,nosuid,nodev,noexec,relatime - tmpfs none rw
  29 15 0:21 / /proc/sys/fs/binfmt_misc rw,nosuid,nodev,noexec,relatime - binfmt_misc binfmt_misc rw
  31 22 0:22 / /home/ubuntu/.gvfs rw,nosuid,nodev,relatime - fuse.gvfs-fuse-daemon gvfs-fuse-daemon rw,user_id=999,group_id=999

  ProblemType: Bug
  DistroRelease: Ubuntu 11.04
  Package: grub2 (not installed)
  ProcVersionSignature: Ubuntu 2.6.37-12.26-generic 2.6.37
  Uname: Linux 2.6.37-12-generic x86_64
  Architecture: amd64
  Date: Fri Jan 14 18:50:37 2011
  LiveMediaBuild: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110109)
  ProcEnviron:
   LANGUAGE=en_US.UTF-8:en
   LANG=en_US.UTF-8
   LC_MESSAGES=en_AG.utf8
   SHELL=/bin/bash
  SourcePackage: grub2

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




More information about the foundations-bugs mailing list