Last active
August 29, 2015 14:05
-
-
Save rjaeckel/43f6f27a15968f94fca7 to your computer and use it in GitHub Desktop.
chroot +X
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
#!/bin/bash | |
# @see: http://wiki.ubuntuusers.de/chroot/Live-CD | |
# mount partition | |
mount /dev/sda1 /mnt | |
# mount boot here if neccessary | |
# mount system environment | |
# .X11 is for xserver and resolv.conf for networking | |
for i in /dev /dev/pts /proc /sys /run /tmp/.X11-unix /etc/resolv.conf; do mount -B $i /mnt$i; done | |
# allow local x-server-connections as it is not going to be started in chroot: | |
xhost + local: | |
# do the chroot | |
chroot /mnt /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment