Skip to content

Instantly share code, notes, and snippets.

@trb143
Forked from nmilosev/fedora-chroot.sh
Created December 26, 2017 07:51
Show Gist options
  • Save trb143/441b0c373b950f870ff0942dd67f954c to your computer and use it in GitHub Desktop.
Save trb143/441b0c373b950f870ff0942dd67f954c 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