Bug#872999: qemu image built by vmdebootstrap is unbootable due to bad root=/dev/mapper/loop0p1 kernel parameter

Raphaël Hertzog hertzog at debian.org
Wed Aug 23 13:44:36 UTC 2017


Package: vmdebootstrap
Version: 1.7-1+nmu1
Severity: important
User: devel at kali.org
Usertags: origin-kali

Hello, I'm trying to update my qemu image used for autopkgtest, so I
followed the instructions from man autopkgtest-virt-qemu to create the
image but the resulting image does not boot and thus does not work
for autopkgtest either.

I believe that the root cause is this error shown in the vmdebootstrap
output:

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

Maybe the behaviour of update-grub changed recently... vmdebootstrap
has not changed recently and yet this worked on my laptop a few weeks
ago (I can't verify whether we had this warning or not, but the built
VM was definitely booting).

In any case, the problem shown in the serial console of the virtual
machine is this one:

    [...]
    Begin: Running /scripts/local-block ... done.
    Begin: Running /scripts/local-block ... done.
    Begin: Running /scripts/local-block ... done.
    done.
    Gave up waiting for root file system device.  Common problems:
     - Boot args (cat /proc/cmdline)
       - Check rootdelay= (did the system wait long enough?)
     - Missing modules (cat /proc/modules; ls /dev)
    ALERT!  /dev/mapper/loop0p1 does not exist.  Dropping to a shell!

When I inspect /boot/grub/grub.cfg it does indeed contain root=/dev/mapper/loop0p1
which we don't want. I manually modified the file to put root=/dev/sda1
and with this I can get it to boot with a simple command like this:

    qemu -serial stdio /srv/autopkgtest-images/kali-rolling.img

Unfortunately, autopkgtest is still not happy with the image, I get this:

    $ autopkgtest -B ./cpputest_3.8-5.dsc -- qemu /srv/autopkgtest-images/kali-rolling.img
    autopkgtest [15:23:50]: version 4.4
    autopkgtest [15:23:50]: host x260-buxy; command line: /usr/bin/autopkgtest -B ./cpputest_3.8-5.dsc -- qemu /srv/autopkgtest-images/kali-rolling.img
    qemu-system-x86_64: terminating on signal 15 from pid 20284 (/usr/bin/python3)
    <VirtSubproc>: failure: timed out waiting for "login prompt on ttyS0"
    autopkgtest [15:24:50]: ERROR: testbed failure: cannot send to testbed: ['BrokenPipeError: [Errno 32] Broken pipe\n']

And even with -ddd, you don't get any detail about what autopkgtest does see (or not) on
the serial console so I have no clue what's going on really.

Cheers,

-- System Information:
Debian Release: buster/sid
  APT prefers oldoldstable
  APT policy: (500, 'oldoldstable'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.12.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages vmdebootstrap depends on:
ii  debootstrap         1.0.91
ii  kpartx              0.6.4-5+b1
ii  libjs-sphinxdoc     1.5.6-2
ii  parted              3.2-17
ii  python              2.7.13-2
ii  python-cliapp       1.20160724-2
ii  python-distro-info  0.17
ii  python2.7           2.7.13-4
ii  qemu-utils          1:2.8+dfsg-7

Versions of packages vmdebootstrap recommends:
ii  dosfstools        4.1-1
ii  extlinux          3:6.03+dfsg-14.1
ii  grub2-common      2.02-2
ii  python-guestfs    1:1.34.6-5
pn  qemu-system       <none>
pn  qemu-user-static  <none>
pn  squashfs-tools    <none>

Versions of packages vmdebootstrap suggests:
pn  cmdtest  <none>
pn  mbr      <none>
pn  pandoc   <none>
pn  u-boot   <none>

-- no debconf information



More information about the autopkgtest-devel mailing list