Skip to content

Instantly share code, notes, and snippets.

@fivethreeo
Last active August 15, 2020 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fivethreeo/3d2a8ec356a6d569b605bddb2fa6721e to your computer and use it in GitHub Desktop.
Save fivethreeo/3d2a8ec356a6d569b605bddb2fa6721e to your computer and use it in GitHub Desktop.
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