Created
March 12, 2016 21:41
-
-
Save astery/08cc91e12b873337413f to your computer and use it in GitHub Desktop.
Chroot sequence from gentoo handbook
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
#!/bin/bash | |
mkdir -p /mnt/gentoo | |
mount -t proc proc /mnt/gentoo/proc | |
mount --rbind /sys /mnt/gentoo/sys | |
mount --make-rslave /mnt/gentoo/sys | |
mount --rbind /dev /mnt/gentoo/dev | |
mount --make-rslave /mnt/gentoo/dev | |
rm /dev/shm && mkdir /dev/shm | |
mount -t tmpfs -o nosuid,nodev,noexec shm /dev/shm | |
chmod 1777 /dev/shm | |
chroot /mnt/gentoo /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