Bug#597084: grub-pc: /etc/kernel/postinst.d/zz-update-grub fails inside openvz chroot

Michael Prokop mika at debian.org
Mon Nov 8 17:15:51 UTC 2010


* Vladimir 'φ-coder/phcoder' Serbinenko <phcoder at gmail.com> [Mon Nov 08, 2010 at 05:33:41PM +0100]:

> > It fails because of the way openvz guests look like (simfs as
> > rootfs):

> What does linux expect as root= on command line in such config? How such
> config can be detected and needed parameters figured out? Would it be
> possible to have a root ssh access to such a system (since it's virtual
> I guess you could copy one that contains no private data and wipe it
> after we're done).

There's no root=... in the kernel command line involved, openvz
guests are like chroots.

There's a simple way to trigger the problem on your own:

  mount -o remount,rw,exec,dev,suid /dev/shm
  debootstrap sid /dev/shm/testchroot http://cdn.debian.net/debian
  mount --bind /dev /dev/shm/testchroot/dev
  chroot /dev/shm/testchroot /bin/bash
  apt-get install grub-pc
  grub-probe --target=device /

-> this will return:

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

as well - the same problem as with the openvz guest.
Building on tmpfs like on /dev/shm is actually not uncommon if speed
matters for a buildprocess.

Maybe testing for /dev/root and skipping update-grub/grub-probe
calls if the device doesn't exist is enough to resolve this issue?

regards,
-mika-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20101108/c14aa2fb/attachment.pgp>


More information about the Pkg-grub-devel mailing list