Isaac Whatever

I'm making this up.

Tuesday, April 17, 2007

 

Simple Gentoo Chroot Instructions

I mess with Gentoo a lot. I usually install from the Minimal Installation CD - so I have a few of them lying around.

When I screw up a kernel compile or bork the system in one of a thousand other ways, it's helpful to be able to use the Gentoo Minimal Installation CD as a rescue CD, but it takes a few steps.

1. Mount the partitions:

# mount /dev/ /mnt/gentoo
# mount /dev/ /mnt/gentoo/boot


2. Copy over DNS information - might not really be required

# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf


3. Mount /proc and /dev

# mount -t proc none /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev


4. Enter the Environment

# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile


5. Change prompt (not required)

# export PS1="(chroot) $PS1"


All of this comes directly from the Gentoo Handbook, which any Gentoo user is probably already familiar with.

Plus, using a Live CD would probably be even easier. There are a number of great ones for nearly any use, including my favorite, BackTrak.

Labels: , , , , , , , , ,






<< Home

Archives

May 2004   June 2004   July 2004   September 2004   October 2004   November 2004   February 2005   March 2005   April 2005   May 2005   June 2005   August 2005   September 2005   October 2005   November 2005   December 2005   January 2006   April 2006   July 2006   September 2006   October 2006   February 2007   March 2007   April 2007   May 2007   November 2007   December 2007   January 2008   February 2008   March 2008   April 2008   May 2008   June 2008   July 2008   August 2008   October 2008   November 2008   December 2008   April 2009   January 2010   December 2010   January 2012   February 2012   March 2012   May 2012   September 2012   October 2013   January 2014   December 2014   April 2022  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]