Notes on Gentoo x86 Chroot Setup Guide
I followed the Gentoo x86 Chroot Setup Guide. Here are my notes/deviations of setup a chroot on Ubuntu.
The stage3 tarball is “an archive containing a minimal Gentoo environment.” When extracting files from it, you need root permission to preserve file permissions.
After extraction, make a portage
directory inside chroot
since my host system is Ubuntu, which does not have that directory
I do not mount /usr/portage
and /usr/src/linux
for the same reason.
You may supply -n
option when mounting directories
so that you do not write to /etc/mtab
.
I followed the chapter 6 of Configuring Portage and I skipped the other chapters.
I added myself with
Note that I set UID to be the same as my UID (1000) of the host system so that I have access permissions of files inside chroot from the host system.
I added USE="-X"
to /etc/portage/make.conf
since I do not need GUI inside chroot.
I installed sudo
and
edited /etc/sudoers
to allow users of wheel
group running sudo
Finally, you may enter chroot from your host system with
For mounting and entering chroot, I took script excerpt from enter_chroot.sh