Created
November 14, 2018 12:54
-
-
Save coalwater/2e5c5fbe69edf3defcbd3cae09573547 to your computer and use it in GitHub Desktop.
Mounting another linux system on your already running system
This file contains 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
# run as root or add sudo | |
mount /dev/sdX /mnt | |
mount --rbind /dev /mnt/dev | |
mount --make-rslave /mnt/dev | |
mount -t proc /proc /mnt/proc | |
mount --rbind /sys /mnt/sys | |
mount --make-rslave /mnt/sys | |
mount --rbind /tmp /mnt/tmp | |
chroot /mnt /bin/bash | |
source /etc/profile | |
export PS1="(chroot) $PS1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment