Elektrine lite

← Feed

@niconiconi@mk.absturztau.be

Post #4261385

2026-07-30 19:52 UTC

Until that happens, Everyone needs to keep using this hack: dhclient eth0 wg-quick up wg0 mount -o ro 10.0.0.1:/my_root /mnt cd /mnt pivot_root . old_root exec chroot . sh -c 'umount /old_root; exec /sbin/init' \ dev/console 2>&1 This doesn't even work well in 2026, because /sbin/init is not PID 1. Not a problem for old SysV init which is just a collection of shell scripts, but a huge problem today. You can start a PID namespace to work around it, using the existing system userspace as a do-nothing Dom0, but I hope someone else already did the hack for me in a distro.

Replies (2)

  • @dramforever@mastodon.social 2026-07-30 22:21

    @niconiconi@mk.absturztau.be maybe systemd-nspawn -D --console=interactive fight fire with fire

    Open ##4261384

  • @niconiconi@mk.absturztau.be 2026-08-03 05:16

    I've found a solution to the "init is not PID 1" problem on Alpine Linux. Now I can use a normal Alpine Linux as a bootloader! It turns out that "userspace-only reboot" is also supported by BusyBox init, after all. When you send SIGQUIT to PID 1, BusyBox shuts down all services, and relaunches a new init according to /etc/inittab's ::reboot:/target. So, to chainload your next system from an Alpine Live CD/USB. You just need to do these steps. First, get your networking, VPN (kernel-mode only) and NFS ready. Use IPv6 SLAAC for network, so the network survives in multiple userspaces even without a running DHCP client. /etc/init.d/networking start wg-quick up wg0 mount -t nfs4 -o vers=4.2,sec=sys 10.10.20.1:/client1/debian_root /mnt/ Then, echo "::restart:/sbin/switch_root /mnt /sbin/init" >> /etc/inittab # reload inittab kill -s SIGHUP 1 # disable sanity check # warning: switch_root will delete everything in rootfs touch /init # the king is dead, long live the king kill -s SIGQUIT 1 OpenRC shuts down the Alpine Linux, and BusyBox init replaces itself with systemd, and starts Debian in /mnt via NFS + VPN! The kernels don't match, new Debian kernel modules WILL NOT work, so you need a "double jump" with a kexec step to reload the kernels. This is currently in development, I'll write a blog post soon.

    Open ##4367202