# How to chroot in Gentoo
Linux @ 02 December 2010
When I tried to install gentoo and finally open my system I realized that the ethernet connection was broken. After a search I saw that it was due to lack of the hdpc packet so I had to go back to the live CD and emerge it. If I want to emerge a packet on my system with a live CD then I should chroot. I simply adopted something from the installation guide of gentoo.
I opened the system with a live CD and fell into the gentoo live session then I did the following (I assume that you have configured eth0)
mkdir /mnt/temp mount /dev/sda3 /mnt/temp mirrorselect -i -o >> /mnt/temp/etc/make.conf mirrorselect -i -r -o >> /mnt/temp/etc/make.conf cp -L /etc/resolv.conf /mnt/temp/etc/ mount -t proc none /mnt/temp/proc mount -o bind /dev /mnt/temp/dev chroot /mnt/temp /bin/bash env-update >> Regenerating /etc/ld.so.cache... source /etc/profile export PS1="(chroot) $PS1" |
now you have chroot and have an alive internet connection
emerge hdpc >> when everything finishes reboot |
if you eject the live CD and permit the system start then you will have a system on which hdpc is installed.