Skip to content

Instantly share code, notes, and snippets.

@xsnpdngv
Created April 9, 2017 21:43
Show Gist options
  • Select an option

  • Save xsnpdngv/7645b4b1145b38613170bd860a134950 to your computer and use it in GitHub Desktop.

Select an option

Save xsnpdngv/7645b4b1145b38613170bd860a134950 to your computer and use it in GitHub Desktop.
chroot
#!/bin/sh
sudo mkdir -p /mnt/linux
sudo mount /dev/sda1 /mnt/linux
for i in /sys /proc /run /dev /dev/pts; do sudo mount --bind "$i" "/mnt/linux$i"; done
sudo chroot /mnt/linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment