[Vmdebootstrap-devel] Bug#800910 closed by Neil Williams <codehelp at debian.org> (Bug#800910: fixed in vmdebootstrap 1.2-1)

Christian Seiler christian at iwakd.de
Wed Nov 11 20:48:31 UTC 2015


Hi,

thanks for taking care of this, but I think the fix you use is wrong:
it just checks for Wheezy, instead of checking for sysvinit. Problem
being that there are other sysvinit-based systems: Squeeze for the one
part, which has LTS until February; but also Jessie and Sid if you
include the package sysvinit-core at debootstrap time. Also, if you run
vmdebootstrap on a derivative, they might also use sysvinit as the init
system, so this change could hurt those.

Instead of checking the distribution, you should rather check whether
sysvinit is installed, i.e. if /etc/inttab exists in the system (I
already mentioned that in my original bug report.)

I've attached a patch that updates the check to be properly generic and
not Wheezy-specific.

I've tested it with Squeeze, Wheezy, Jessie and Sid; Jessie and Sid
both with systemd and sysvinit, and I with the patch attached to this
email applied I get the following (correct) behavior:

 - Squeeze, Wheezy, Jessie+sysvinit-core, Sid+sysvinit-core:
    /etc/inittab gets updated with a serial console, VM boots in Qemu
    with sysvinit as init system, serial console shows up

 - Jessie, Sid (defaults, i.e. systemd):
    /etc/inittab doesn't exist and isn't created by vmdeboostrap, VM
    boots in Qemu with systemd as init system, serial console shows up

Without my patch, Squeeze, Jessie+sysvinit-core and Sid+sysvinit-core
don't get a serial console anymore (they did before you applied the
patch that was to take care of the bug I reported, i.e. in 1.1).

Regards,
Christian

Steps to reproduce:

vmdebootstrap --sparse --log=sid-sysvinit.log --package=sysvinit-core \
              --verbose --serial-console --distribution=sid \
              --size=10000000000 --grub --image=sid-sysvinit.img
vmdebootstrap --sparse --log=sid-systemd.log \
              --verbose --serial-console --distribution=sid \
              --size=10000000000 --grub --image=sid-systemd.img
vmdebootstrap --sparse --log=jessie-sysvinit.log --package=sysvinit-core \
              --verbose --serial-console --distribution=jessie \
              --size=10000000000 --grub --image=jessie-sysvinit.img
vmdebootstrap --sparse --log=jessie-systemd.log \
              --verbose --serial-console --distribution=jessie \
              --size=10000000000 --grub --image=jessie-systemd.img

vmdebootstrap --sparse --log=wheezy.log \
              --verbose --serial-console --distribution=wheezy \
              --size=10000000000 --grub --image=wheezy.img
vmdebootstrap --sparse --log=squeeze.log \
              --verbose --serial-console --distribution=squeeze \
              --size=10000000000 --grub --image=squeeze.img

Run the images with:

qemu-system-x86_64 -enable-kvm -drive file=$IMAGE.img,if=virtio \
                   -serial stdio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-serial-console-for-all-sysvinit-based-systems.patch
Type: text/x-diff
Size: 1447 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/vmdebootstrap-devel/attachments/20151111/7ccb2076/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/vmdebootstrap-devel/attachments/20151111/7ccb2076/attachment-0001.sig>


More information about the Vmdebootstrap-devel mailing list