Add arch-rootfs build script

This commit is contained in:
sin 2014-02-13 14:23:43 +00:00
parent e6c30c4cb2
commit 60c0551762
2 changed files with 27 additions and 0 deletions

18
pkgs/arch-rootfs Normal file
View File

@ -0,0 +1,18 @@
url=$mirror/arch-rootfs.tar.gz
fetch() {
wget -c $url -O src/arch-rootfs.tar.gz
}
unpack() {
pushd src
[ -d root.x86_64 ] || tar xzf arch-rootfs.tar.gz
popd
}
install() {
pushd src
cp -arP root.x86_64/* $root/emul
popd
cp stuff/enter-emul $root/bin
}

9
stuff/enter-emul Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
cp /etc/resolv.conf /emul/etc/resolv.conf
mount -B /proc /emul/proc
mount -B /sys /emul/sys
mount -B /dev /emul/dev
mount -B /dev/pts /emul/dev/pts
chroot /emul /bin/sh -l