Last active
December 26, 2017 07:51
-
-
Save nmilosev/fcedf1458f8814caab6a01e61eab6bcb to your computer and use it in GitHub Desktop.
simple enter-fedora chroot script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Entering Fedora 24 ARM chroot" | |
mount -t proc proc /fedora/proc/ | |
mount -t sysfs sys /fedora/sys/ | |
mount -o bind /dev /fedora/dev/ | |
mount -o bind /dev /fedora/dev/pts | |
chroot /fedora /bin/env -i \ | |
HOME=/root TERM="$TERM" PS1='[\u@f24chroot \W]\$ ' \ | |
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/bin \ | |
/bin/bash --login | |
echo "Exiting Fedora 24 ARM chroot" | |
umount /fedora/dev/ | |
umount /fedora/dev/pts | |
umount /fedora/sys/ | |
umount /fedora/proc/ | |
echo "Cleaned up" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment