iglunix-autobuild/chroot_iglunix

30 lines
410 B
Text
Raw Normal View History

2021-02-04 16:58:42 +00:00
#!/bin/bash
cd ./root
echo "Going to chroot, woot!"
2021-02-04 16:58:42 +00:00
mkdir proc
mkdir sys
mkdir dev
mkdir tmp
if true
then
sudo mount --bind /tmp tmp/
sudo mount -t proc /proc proc/
sudo mount -t sysfs /sys sys/
sudo mount --rbind /dev dev/
fi
2021-02-21 14:39:18 +00:00
sudo chroot ./ /bin/sh login_shell
2021-02-10 20:28:50 +00:00
2021-02-04 16:58:42 +00:00
sudo umount root/tmp/
sudo umount root/proc/
sudo umount root/sys/
sudo mount --make-rprivate root/dev/
sudo umount -l root/dev/
2021-02-12 16:20:35 +00:00