Skip to content

Instantly share code, notes, and snippets.

@minlexx
Created January 7, 2019 16:39
Show Gist options
  • Save minlexx/1338865aaf7edefe2ce27b816c55543a to your computer and use it in GitHub Desktop.
Save minlexx/1338865aaf7edefe2ce27b816c55543a to your computer and use it in GitHub Desktop.
Gentoo_chroot_script.sh
#/bin/bash
# Before chroot
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
mount --rbind /dev /mnt/gentoo/dev
mount --make-rslave /mnt/gentoo/dev
#!/bin/bash
# After chroot (unmount)
umount -l /mnt/gentoo/dev{/shm,/pts,}
umount -R /mnt/gentoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment