script to make a small busybox chroot env, since arch's base package has way too many dependencies

This commit is contained in:
xfnw 2021-04-28 22:59:42 -04:00
parent 3c484c636d
commit 8caabeaf8b

18
bin/mkbusyroot Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh
TARGET="$1"
mkdir -p $TARGET
pacstrap $TARGET busybox
cd $TARGET
ln -s bin usr/bin
tee etc/passwd <<<'root:x:0:0::/root:/bin/sh'
tee etc/group <<<'root:x:0:root'
tee etc/profile <<<'export PS1="[\u@\h \W]\$ "'
cd usr/bin
busybox --list | grep -v busybox | xargs -n1 ln -s busybox