Last active
June 10, 2016 11:07
-
-
Save Ralnoc/746f59fc585fea641bbdb3cc582d017d to your computer and use it in GitHub Desktop.
Mount and chroot into a root partition from a livecd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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