Skip to content

Instantly share code, notes, and snippets.

@Ralnoc
Last active June 10, 2016 11:07
Show Gist options
  • Save Ralnoc/746f59fc585fea641bbdb3cc582d017d to your computer and use it in GitHub Desktop.
Save Ralnoc/746f59fc585fea641bbdb3cc582d017d to your computer and use it in GitHub Desktop.
Mount and chroot into a root partition from a livecd
sudo mount $1 /mnt
for i in /sys /proc /run /dev /dev/pts; do sudo mount --bind "$i" "/mnt$i"; done
sudo cp /etc/resolv.conf /mnt/etc/
sudo chroot /mnt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment