#!/bin/sh # Early system setup. Can't use execlineb here due to a bug, see below /bin/busybox echo "* Stage 0 starting" /bin/busybox mount -a /bin/busybox mount -o rw,remount / /bin/busybox --install -s # Work around some weirdness in the jor1k vm fs. Can't run execlineb, but we can run the result of decompressing a compressed version. # Nevermind. On my local webserver this works, but on public webserver it fails # with invalid magic. However, forcing the backend to store execlineb in an # uncompressed state, it works. At some point I'll rewrite this to not need busybox/sh #gunzip /bin/elb.gz #cp /bin/elb /bin/execlineb umount /proc umount /sys # vm fs doesn't support saved user id, so adjust some files by hand chown syslog:syslog /var/log/syslogd # vm fs doesn't support saved fifos, so create them here mkfifo /etc/s6-stage1/uncaught-logs/fifo # Attempt to launch stage1 or fallback to a shell exec tryexec /sbin/stage1 "" foreground echo -e "\033[31mFailed to start stage1\033[0m" "" sh -i