Skip to content

Instantly share code, notes, and snippets.

@fivethreeo

fivethreeo/chroot.sh

Last active Aug 15, 2020
Embed
What would you like to do?
export MOUNT_DEV=/dev/sda1
export MOUNT_POINT=/mnt
sudo -E mount $MOUNT_DEV $MOUNT_POINT
sudo -E mount --bind /dev $MOUNT_POINT/dev
sudo -E mount --bind /proc $MOUNT_POINT/proc
sudo -E mount --bind /run $MOUNT_POINT/run
sudo -E mount --bind /sys $MOUNT_POINT/sys
sudo -E chroot $MOUNT_POINT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.