[systemd-devel] Minimal Userland
Fisher, Charles J. (Top Echelon)
Charles.Fisher at alcoa.com
Fri Oct 31 11:53:53 PDT 2014
Posting just in case someone finds it of interest.
I did this on Oracle Linux 7.
mkdir /home/nifty
mkdir /home/nifty/bin
cp /your/busybox /home/nifty/bin
cd /home/nifty/bin
ln -s busybox sh
chroot /home/nifty
bin/busybox ls -l
#####so far, so good, any system can do this
exit
./busybox --list | awk '{print "ln -s busybox " $0}' | sh
mkdir /home/nifty/etc
touch /home/nifty/etc/os-release
cd /home/nifty
ln -s bin sbin
ln -s usr/bin bin
echo 'root::0:0:root:/root:/bin/sh' > /home/nifty/etc/passwd
echo 'console::respawn:/bin/getty 38400 /dev/console' > /home/nifty/etc/inittab
tar cf - /usr/share/zoneinfo | (cd /home/nifty; tar xvpf -)
systemd-nspawn -bD /home/nifty
#####login to the new userland you just built
More information about the systemd-devel
mailing list