From: Guillaume Pellerin Date: Mon, 7 Jun 2021 07:07:26 +0000 (+0200) Subject: add chroot mount script X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=32b7fb38af85cc2442dba2e5af4aae752fd149ff;p=clone-me.git add chroot mount script --- diff --git a/chroot-off.sh b/chroot-off.sh new file mode 100755 index 0000000..8995f10 --- /dev/null +++ b/chroot-off.sh @@ -0,0 +1,10 @@ + +dir=/mnt/custom + +umount $dir/sys +umount $dir/proc +umount $dir/dev +umount $dir/var +umount $dir/home +umount $dir + diff --git a/chroot-on.sh b/chroot-on.sh new file mode 100755 index 0000000..e594409 --- /dev/null +++ b/chroot-on.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +dir=/mnt/custom + +ROOT=/dev/sdb2 +VAR=/dev/sdb3 +HOME=/dev/sdb6 + +mount $ROOT $dir +mount --bind /sys $dir/sys +mount --bind /proc $dir/proc +mount --bind /dev $dir/dev +mount --bind /run $dir/run +mount $VAR $dir/var +mount $HOME $dir/home + +chroot $dir