Skip to content

Instantly share code, notes, and snippets.

@nmilosev
Last active December 26, 2017 07:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nmilosev/fcedf1458f8814caab6a01e61eab6bcb to your computer and use it in GitHub Desktop.
Save nmilosev/fcedf1458f8814caab6a01e61eab6bcb to your computer and use it in GitHub Desktop.
simple enter-fedora chroot script
#!/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