From b4165184fed0cbc6913eaab207c2f5f110c38aca Mon Sep 17 00:00:00 2001 From: Daniel Bainton Date: Sun, 9 Mar 2014 11:23:03 +0000 Subject: [PATCH] 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. --- misc/run-chroot | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 misc/run-chroot diff --git a/misc/run-chroot b/misc/run-chroot new file mode 100755 index 0000000..2463734 --- /dev/null +++ b/misc/run-chroot @@ -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."