Gentoo Rescue

From Schmid.wiki
Jump to: navigation, search

Starting Gentoo from a Boot CD

  • Download and burn 'Gentoo Minimal CD/InstallCD'
  • Boot from the CD.
  • Set root password to something known: passwd.
  • Configure sshd to start over an alternative port (e.g. 2222): edit /etc/ssh/sshd_config.
  • Start sshd: /etc/init.d/sshd start
  • Login remotely as root ssh -p 2222 root@server.
  • Chroot as described in the Gentoo Handbook:
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"
  • Restart all services, including:
hostname
net.lo
net.eth0
sshd
  • Mount devpts (otherwise remote login to sshd won't work)
mount -t devpts devpts /dev/pts
  • Test that you can login as normal.
  • Ctrl+D out of the chroot.
  • Stop the port 2222 sshd: /etc/init.d/sshd stop

References

Personal tools