[Pkg-sysvinit-devel] Bug#799329: sysvinit: does not work inside systemd-nspawn

Tomasz Buchert tomasz at debian.org
Thu Sep 17 22:15:03 UTC 2015


Package: sysvinit
Version: 2.88dsf-59.2
Severity: normal

Hi,
I've tried to boot sysvinit-enabled Debian with systemd-nspawn and it doesn't
work, unfortunately.
It would be great if sysvinit could boot inside systemd-nspawn: I maintain some
daemons in Debian
and it looks like a nice way to test whether they work with sysvinit.

Here is what I've done:

  $ debootstrap unstable debian-tree
  $ systemd-nspawn -D debian-tree -b
  (this works fine, the container boots and even NAT is set up automatically)

Then I followed [1] with the second apt-get invocation done
*without* -b because otherwise it didn't work. Then I restarted
the container and got:

  $ sudo systemd-nspawn -D debian-tree -b
  Spawning container debian-tree on /xxx/debian-tree.
  Press ^] three times within 1s to kill container.
  Failed to create directory /xxx/debian-tree/sys/fs/selinux: Read-only file
system
  Failed to create directory /xxx/debian-tree/sys/fs/selinux: Read-only file
system
  /etc/localtime is not a symlink, not updating container timezone.
  INIT: version 2.88 booting
  [info] Using makefile-style concurrent boot in runlevel S.
  ....
  .... (and so on, with some warnings and errors, but looks as if it's gonna
work)
  ....
  [ ok ] Starting enhanced syslogd: rsyslogd.
  [ ok ] Starting periodic command scheduler: cron.

This is a place where it hangs for some time. If I run machictl status I get:

  $ machinectl status debian-tree
  debian-tree
           Since: vie 2015-09-18 00:09:43 CEST; 6s ago
          Leader: 21599 (init)
         Service: nspawn; class container
            Root: /xxx/debian-tree
              OS: Debian GNU/Linux stretch/sid
            Unit: machine-debian\x2dtree\x2dyo.scope
                  ├─21599 init [2]
                  ├─22456 /usr/sbin/rsyslogd
                  ├─22486 /usr/sbin/cron
                  ├─22510 /sbin/getty 38400 tty1
                  ├─22511 /sbin/getty 38400 tty2
                  ├─22512 /sbin/getty 38400 tty3
                  ├─22513 /sbin/getty 38400 tty4
                  ├─22514 /sbin/getty 38400 tty5
                  └─22515 /sbin/getty 38400 tty6

Anyway, after 100 seconds, the container console shows:

  INIT: Id "3" respawning too fast: disabled for 5 minutes
  INIT: Id "1" respawning too fast: disabled for 5 minutes
  INIT: Id "2" respawning too fast: disabled for 5 minutes
  INIT: Id "5" respawning too fast: disabled for 5 minutes
  INIT: Id "6" respawning too fast: disabled for 5 minutes
  INIT: Id "4" respawning too fast: disabled for 5 minutes
  INIT: no more processes left in this runlevel

and machinectl status shows that all getty's are gone.


Could sysvinit be updated to detect systemd-nspawn and show
a login console or something?

Cheers,
Tomasz

[1] http://without-
systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation



-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

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

Versions of packages sysvinit depends on:
ii  init         1.23
ii  libc6        2.19-19
ii  libselinux1  2.3-2+b1
ii  libsepol1    2.3-2

sysvinit recommends no packages.

sysvinit suggests no packages.

-- no debconf information



More information about the Pkg-sysvinit-devel mailing list