Using this method, you can install an entire Gentoo image complete with portage and overlay 20060216 in about 15 minutes. This image was created on 5/30/2006 immediately following a deep world update. I will periodically perform a deep world update and replace the image located at www.kurobox.com/downloads/gentoo/gentoo-image.tgz. If you are aware of a major update that should be included in this image please email dtaylor at kurobox dot com with a description of the update and I will put it on my very long list of things to do.

Preparing for Install

Start by using any FTP client to upload EM_mode_binaries.tar.bz2 (you can download it from http://kurobox.com/downloads/gentoo to /tmp on the Kuro (hint: Windows may change the extension of the file when you download it from the internet). Then login to the kuro using a telnet client

Partitioning & Formating HDD

Note: The /etc/fstab file that comes with the Gentoo image is configured to work with
this harddisk partitioning scheme. If you want to use a different partitioning scheme
you must edit /etc/fstab accordingly. Nano is not part of the flash image. you can get it
from /gentoo/usr/sbin/ after you untar the image.

We run fdisk and create partitions. I use four partitions: hda1 for /, hda2 for the swap space, hda3 for /var, and hda4 for data storage (/datafiles). This section from the Gentoo Handbook explains how to prepare your hard disk (create partitions). For most users, 10gb each for / on hda1 and /var on hda3 is adequate. 512mb is good for a swap space on hda2 and use the remainder for /datafiles on hda4. However, you can decide which way you want to break up your hard disk. Remember you need to mount all of the drives (except the swap and /datafiles) before you untar the image (More on that later).

# fdisk /dev/hda

Once the partitions are created we format the partitions. Here we format the first partition on /dev/hda (the hard drive is /dev/hda).

Install Gentoo Image

Mount new partitions

This will allow us to create the gentoo system on the hard drive instead of in the flash ram disk. We will create the directoy /gentoo mount /dev/hda1 there, then create /gentoo/var and mount /dev/hda3.

Extracting the Image

We then change directories to /gentoo and untar the image in what will be our root directory

# cd /gentoo
# tar zxvf gentoo-image.tgz

Once the image is untarred we can delete the image from /gentoo.

# rm gentoo-image.tgz

Since the flash doesn't have nano in it we copy it from the newly installed image so we can edit make.conf.

# cp /gentoo/bin/nano /bin/

Next we change the GENTOO_MIRRORS and SYNC lines in /etc/make.conf to suit your location. Pick the three nearest sites listed at http://www.gentoo.org/main/en/mirrors.xml for your GENTOO_MIRRORS line. For Your SYNC line, your choices are namerica, samerica, europe, asia and au (australia) in place of namerica in my SYNC line.

# cd /gentoo/etc
# nano make.conf

Configure Network

Next we configure the network. If you want to use DCHP, you can skip this step as the image is configured for DCHP.

# cd conf.d
# nano net

If you want a static IP address you need to uncomment a couple of lines. Scroll down to the section INTERFACE HANDLERS and uncomment the following lines. In the example I have set the IP address to 192.168.0.9, the network mask to 255.255.255.0, and the gateway to 192.168.0.1. Do not uncomment the default via 4321:0:1:2:3:4:567:89ab". You will want to change the IP address, subnet mask, and gateway address to suit your network.

Clean up and Reboot

Set the box to boot to the new system. By the way, that device is FL3 in lowercase.

# echo -n "OKOK" > /dev/fl3

and then restart the system

# shutdown -r now

Wait a few minutes and then log onto your kuro with putty. The first time the system boots it will take about 3 minutes as it needs to generate the certificates used by sshd. Login with user id root and password kurobox.

Post Installation Tasks

First we set the root password and create a new user who is a member of wheel so they can su to root.

Now would be a good time to update everything. This shouldn't take too long as an emerge -uD world was run on the image prior to creating the tarball on 5/30/06.

kurobox / # emerge -uD world

Last, if anything was updated and portage says we need to update our config files we run etc-update. Don't do this blindly as you can easily break your brand new system. You need to understand what the configuration files mean and choose what lines you want to edit.