Gentoo Rescue

Starting Gentoo from a Boot CD
mount -t proc none /mnt/gentoo/proc mount -o bind /dev /mnt/gentoo/dev chroot /mnt/gentoo /bin/bash env-update source /etc/profile export PS1="(chroot) $PS1" hostname net.lo net.eth0 sshd mount -t devpts devpts /dev/pts
 * Download and burn 'Gentoo Minimal CD/InstallCD'
 * Boot from the CD.
 * Set root password to something known:.
 * Configure sshd to start over an alternative port (e.g. 2222): edit.
 * Start sshd:
 * Login remotely as root.
 * Chroot as described in the Gentoo Handbook:
 * Restart all services, including:
 * Mount devpts (otherwise remote login to sshd won't work)
 * Test that you can login as normal.
 * Ctrl+D out of the chroot.
 * Stop the port 2222 sshd: