script to make a small busybox chroot env, since arch's base package has way too many dependencies
This commit is contained in:
parent
3c484c636d
commit
8caabeaf8b
1 changed files with 18 additions and 0 deletions
18
bin/mkbusyroot
Executable file
18
bin/mkbusyroot
Executable 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
|
||||
|
Loading…
Reference in a new issue