Package: runit-init
Version: 2.1.2-52
Severity: grave
Justification: makes the system unbootable

Hi,

in order to investigate runit-init as a possible init alternative, I
tried booting a minimal Debian system containing runit-init and a linux
kernel image. This is what I got:

| Begin: Running /scripts/local-bottom ... done.
| Begin: Running /scripts/init-bottom ... done.
| [    1.518637] Not activating Mandatory Access Control as /sbin/tomoyo-init 
does not exist.
| - runit: $Id: 25da3b86f7bed4038b8a039d2f8e8c9bbcf0822b $: booting.
| - runit: enter stage: /etc/runit/1
| /etc/rcS.d/S01mountkernfs.sh: 280: mount: not found
| /etc/rcS.d/S01mountkernfs.sh: 280: mount: not found
| /etc/rcS.d/S01mountkernfs.sh: 280: mount: not found
| Starting hotplug events dispatcher: systemd-udevd.
| Synthesizing the initial hotplug events (subsystems)...done.
| Synthesizing the initial hotplug events (devices)...[    1.752098] input: 
Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
| done.
| Waiting for /dev to be fully populated...[    1.763554] sr 1:0:0:0: Attached 
scsi generic sg0 type 5
| [    1.766920] ACPI: button: Power Button [PWRF]
| [    2.180257] RAPL PMU: API unit is 2^-32 Joules, 0 fixed counters, 
10737418240 ms ovfl timer
| [    2.196663] cryptd: max_cpu_qlen set to 1000
| [    2.284932] AVX2 version of gcm_enc/dec engaged.
| [    2.286968] AES CTR mode by8 optimization enabled
| done.
| /etc/rcS.d/S03mountdevsubfs.sh: 280: mount: not found
| Activating swap...failed.
| /etc/rcS.d/S04checkroot.sh: 210: mount: not found
| Cannot check root file system because it is not mounted read-only. ... failed!
| /etc/rcS.d/S04checkroot.sh: 316: mount: not found
| Creating compatibility symlink from /etc/mtab to /proc/mounts. ... (warning).
| /etc/init.d/mountkernfs.sh: 289: mount: not found
| /etc/init.d/mountkernfs.sh: 289: mount: not found
| /etc/init.d/mountkernfs.sh: 289: mount: not found
| /etc/init.d/mountdevsubfs.sh: 289: mount: not found
| Checking file systems...fsck: cannot check /dev/vda: fsck.ext4 not found
| done.
| Cleaning up temporary files... /tmp.
| Mounting local filesystems.../etc/rcS.d/S07mountall.sh: 35: mount: not found
| failed.
| Activating swapfile swap, if any...done.
| /etc/rcS.d/S07mountall.sh: 280: mount: not found
| /etc/rcS.d/S07mountall.sh: 280: mount: not found
| Cleaning up temporary files....
| Cleaning up temporary files....
| - runit: leave stage: /etc/runit/1
| - runit: enter stage: /etc/runit/2
| /etc/runit/2: 8: mount: not found
| runsvchdir: default: current.

The biggest problem here is the lack of mount. mount is not essential
and nothing depends on it, so it goes missing. Something in the runit
ecosystem should definitely depend on mount.

Then after boot, no getty is spawned and there is no way to log in.

I retried with mount installed and got something different:

| Begin: Running /scripts/local-bottom ... done.
| Begin: Running /scripts/init-bottom ... done.
| [    1.554225] Not activating Mandatory Access Control as /sbin/tomoyo-init 
does not exist.
| - runit: $Id: 25da3b86f7bed4038b8a039d2f8e8c9bbcf0822b $: booting.
| - runit: enter stage: /etc/runit/1
| Starting hotplug events dispatcher: systemd-udevd.
| Synthesizing the initial hotplug events (subsystems)...done.
| Synthesizing the initial hotplug events (devices)...done.
| Waiting for /dev to be fully populated...[    1.770569] input: Power Button 
as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
| [    1.783674] sr 1:0:0:0: Attached scsi generic sg0 type 5
| [    1.796417] ACPI: button: Power Button [PWRF]
| [    2.151984] RAPL PMU: API unit is 2^-32 Joules, 0 fixed counters, 
10737418240 ms ovfl timer
| [    2.155414] cryptd: max_cpu_qlen set to 1000
| [    2.287889] AVX2 version of gcm_enc/dec engaged.
| [    2.290906] AES CTR mode by8 optimization enabled
| done.
| Activating swap...done.
| [    3.003917] EXT4-fs (vda): re-mounted. Quota mode: none.
| Checking root file system...fsck: error 2 (No such file or directory) while 
executing fsck.ext4 for /dev/vda
| fsck exited with status code 8
| failed (code 8).
| An automatic file system check (fsck) of the root filesystem failed.
| A manual fsck must be performed, then the system restarted.
| Press Enter for maintenance
| (or press Control-D to continue):

It seems like runit requires checking the filesystem, but e2fsprogs is
not essential anymore and it fails hard. Nowadays, checking ext4
filesystems is optional and systemd skips doing it in the absence of
e2fsprogs.

So I went on to retry with e2fsprogs added and this is what I got:

| Begin: Running /scripts/local-bottom ... done.
| Begin: Running /scripts/init-bottom ... done.
| [    1.484294] Not activating Mandatory Access Control as /sbin/tomoyo-init 
does not exist.
| - runit: $Id: 25da3b86f7bed4038b8a039d2f8e8c9bbcf0822b $: booting.
| - runit: enter stage: /etc/runit/1
| Starting hotplug events dispatcher: systemd-udevd.
| Synthesizing the initial hotplug events (subsystems)...done.
| Synthesizing the initial hotplug events (devices)...[    1.687579] input: 
Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
| done.
| Waiting for /dev to be fully populated...[    1.700596] sr 1:0:0:0: Attached 
scsi generic sg0 type 5
| [    1.703218] ACPI: button: Power Button [PWRF]
| [    2.105448] RAPL PMU: API unit is 2^-32 Joules, 0 fixed counters, 
10737418240 ms ovfl timer
| [    2.152185] cryptd: max_cpu_qlen set to 1000
| [    2.348491] AVX2 version of gcm_enc/dec engaged.
| [    2.352216] AES CTR mode by8 optimization enabled
| done.
| Activating swap...done.
| [    3.116512] EXT4-fs (vda): re-mounted. Quota mode: none.
| Checking root file system...debvm: clean, 7586/66560 files, 428724/1048576 
blocks
| done.
| [    3.219541] EXT4-fs (vda): re-mounted. Quota mode: none.
| Creating compatibility symlink from /etc/mtab to /proc/mounts. ... (warning).
| Checking file systems...done.
| Cleaning up temporary files... /tmp.
| Mounting local filesystems...done.
| Activating swapfile swap, if any...done.
| Cleaning up temporary files....
| Cleaning up temporary files....
| - runit: leave stage: /etc/runit/1
| - runit: enter stage: /etc/runit/2
| runsvchdir: default: current.

In particular, the user has no way to log into the system as no getty is
being spawned. I see that the autopkgtest has to do this manually via
"ln -s /etc/sv/getty-ttyS0 /etc/service/". Do you think there could be a
better way to achieve this such that at least the console= kernel
command line parameter is automatically issued a getty?

Helmut

Reply via email to