Add run-chroot script to misc/

The script will first mount dev and proc and then it will chroot into
the root/ directory and after exiting the chroot, it will unmount dev and
proc.

Can be used to quickly test the built system.
This commit is contained in:
Daniel Bainton 2014-03-09 11:23:03 +00:00
parent 2ee7b8828a
commit b4165184fe

16
misc/run-chroot Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
echo -n "Mounting dev... "
sudo mount -o bind /dev root/dev
echo "done."
echo -n "Mounting proc... "
sudo mount -t proc proc root/proc
echo "done."
echo "Chrooting..."
sudo chroot root /bin/sh
echo -n "Unmounting dev... "
sudo umount root/dev
echo "done."
echo -n "Unmounting proc... "
sudo umount root/proc
echo "done."