You are not logged in.

#1 2023-05-31 06:57:56

Ralf
Member
From: Ruhrgebiet
Registered: 2013-03-15
Posts: 45

systemd-nspawn booting Alpine Linux fails

Hi,

I wonder if it is possible to boot Alpine Linux by systemd-nspawn.
The Alpine user mailing list can't help with this.

• root@archlinux /home/rocketmouse 
# systemd-nspawn -bqD /mnt/m1.alpine

   OpenRC 0.47.1 is starting up Linux 6.3.5-arch1-1 (x86_64) [SYSTEMD-NSPAWN]

 * /proc is already mounted
 * /run/openrc: creating directory
 * /run/lock: creating directory
 * /run/lock: correcting owner
 * Caching service dependencies ...                           [ ok ]
 * Loading hardware drivers ...                               [ ok ]
 * Creating user login records ...                            [ ok ]
 * Setting hostname ...                                       [ ok ]
 * Setting keymap ...
loadkmap: can't open console                                  [ !! ]
 * ERROR: loadkmap failed to start
 * Loading modules ...                                        [ ok ]
 * Starting networking ...
 *   lo ...                                                   [ ok ]
 *   eth0 ...
ip: ioctl 0x8913 failed: No such device
udhcpc: ioctl 0x8933 failed: No such device
ifup: failed to change interface eth0 state to 'up'           [ !! ]
 * Starting busybox syslog ...                                [ ok ]
 * Setting keymap ...
loadkmap: can't open console                                  [ !! ]
 * ERROR: loadkmap failed to start
 * Starting busybox acpid ...                                 [ ok ]
 * Starting busybox crond ...                                 [ ok ]
can't open /dev/tty1: No such file or directory
can't open /dev/tty2: No such file or directory
can't open /dev/tty3: No such file or directory
can't open /dev/tty4: No such file or directory
can't open /dev/tty5: No such file or directory
can't open /dev/tty6: No such file or directory
can't open /dev/tty1: No such file or directory
[snip]
can't open /dev/tty6: No such file or directory
can't open /dev/tty1: No such file or directory
[snip]
can't open /dev/tty6: No such file or directory
can't open /dev/tty1: No such file or directory
[snip]

It's caught in an endless "can't open /dev/tty" loop.
Any ideas?

Regards,
Ralf

Offline

#2 2023-05-31 08:53:56

-thc
Member
Registered: 2017-03-15
Posts: 500

Re: systemd-nspawn booting Alpine Linux fails

Well - on the one hand you try to use systemd

Arch Wiki wrote:

Note: systemd-nspawn requires that the operating system in the container uses systemd init (has it running as PID 1) and systemd-nspawn is installed in the container. These requirements can be satisfied by making sure the systemd-container package is installed on the container system. The systemd-container package depends on dbus, which is not installed by default. Make sure the dbus or dbus-broker package is installed on the container system.

and Alpine uses OpenRC. It shouldn't work this way - by design.

Offline

#3 2023-05-31 09:00:40

Ralf
Member
From: Ruhrgebiet
Registered: 2013-03-15
Posts: 45

Re: systemd-nspawn booting Alpine Linux fails

Thank you,

so I'll stay with pure chroot without steroids.

Regards,
Ralf

Offline

Board footer

Powered by FluxBB