Created
January 17, 2017 22:42
-
-
Save sylvchev/9d1e0bf091d9e699955f8967e083a404 to your computer and use it in GitHub Desktop.
chrooting in a gentoo for installation purpose (from a debian-based 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
sudo su - | |
mkdir /mnt/gentoo && mount /dev/sda3 /mnt/gentoo/ && mount /dev/sda2 /mnt/gentoo/boot/ && mount /dev/sda1 /mnt/gentoo/mnt/efi && cp -L /etc/resolv.conf /mnt/gentoo/etc/ && mount -t proc proc /mnt/gentoo/proc && mount --rbind /sys /mnt/gentoo/sys && mount --make-rslave /mnt/gentoo/sys && rm /dev/shm && mkdir /dev/shm && mount -t tmpfs -o nosuid,nodev,noexec shm /dev/shm && chmod 1777 /dev/shm && mount --rbind /dev /mnt/gentoo/dev && mount --make-rslave /mnt/gentoo/dev && chroot /mnt/gentoo /bin/bash | |
. /etc/profile | |
exit | |
cd | |
umount -l /mnt/gentoo/dev{/shm,/pts,} | |
umount -R /mnt/gentoo | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment