CompuLab fit-PC

Introduction
These are reference notes for using Gentoo Linux on the CompuLab fit-PC computer.

The notes cover:


 * Installing Gentoo Linux, using the standard installation method
 * Hardware configuration
 * Software configuration

Installing Gentoo Linux
The fit-PC is different from most modern PCs in two notable ways:


 * It has no CD-ROM drive
 * It is considered to be a i586

As a result these additional steps (described below) are needed when installing Gentoo Linux using the the standard method described in the Gentoo Linux x86 Handbook:


 * Creating a LiveUSB
 * Bootstrapping to i586

To install Gentoo Linux you will need:


 * a fit-PC
 * an USB keyboard
 * an USB stick (128Mb or more)
 * an internet connection
 * a Gentoo Linux helper host to prepare the LiveUSB stick (could be the fit-PC)

Creating a LiveUSB
The standard installation method should be followed, until "2. Choosing the Right Installation Medium".

At this point it is necessary to prepare a "Gentoo Linux LiveUSB" Installation Medium, based on the "Gentoo Minimal Installation CD". There are a number of methods for preparing a "Gentoo Linux LiveUSB" described on the Web (Gentoo Linux LiveUSB HOWTO, HOWTO LiveUSB Key), however these methods use a FAT16 formated USB stick which prevents the kernel supplied with the "Gentoo Minimal Image" from booting. To ensure the "self-sustained Gentoo environment" boots satisfactorily from a "Gentoo Minimal Image" it is necessary to format the USB stick with a EXT2 file system. The method described below is based on those previously described at HOWTO LiveUSB and Problem with booting "LiveUSB".

Prepare USB stick
The following instruction are run on the Linux helper host. My USB stick device is /dev/sda.

You may need to unmount volumes of the stick if already formated

Clear disk partition table and boot sector
 * 1) umount /dev/sda1

Partitioning
 * 1) dd if=/dev/zero of=/dev/sda count=1024


 * 1) fdisk /dev/sda

Device     Boot    Start    End     Blocks   Id  System /dev/sda1  *       1        1006    258010+  83  Linux Formating


 * 1) mke2fs /dev/sda1

Put Gentoo Minimal LiveCD on the USB stick
Fetch Gentoo Minimal LiveCD ISO image

Mount the ISO and copy to the USB stick (Mount ISO and MDF Images)
 * 1) wget -S http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/releases/x86/2008.0/installcd/install-x86-minimal-2008.0.iso


 * 1) mkdir -p /mnt/cdrom
 * 2) modprobe loop
 * 3) mount -o loop,ro -t iso9660 install-x86-minimal-2008.0.iso /mnt/cdrom
 * 4) mkdir -p /mnt/usb
 * 5) mount /dev/sda1 /mnt/usb
 * 6) cp -r /mnt/cdrom/* /mnt/usb
 * 7) umount /mnt/cdrom

Make USB stick bootable


 * 1) emerge syslinux
 * 2) dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
 * 3) mv /mnt/usb/isolinux/isolinux.cfg /mnt/usb/isolinux/extlinux.conf
 * 4) nano /mnt/usb/isolinux/extlinux.conf                     # add slowusb after cdroot (if necessary)
 * 5) extlinux -i /mnt/usb/isolinux
 * 6) umount /dev/sda1

Booting from LiveUSB
Plug in USB stick Plug in USB keyboard Power up fit-PC while pressing the DEL key Change the BIOS boot order to: Drive C: Nand Flash Boot 1st: Drive C: reboot fit-PC Specify the gentoo-nofb kernel boot: gentoo-nofb Re-plug keyboard after usb-storage module has loaded

Selecting the correct Tarball
Continue with the standard installation method until "5.b. Default: Using a Stage from the Internet".

At this point it is necessary to download the Stage Tarball. The fit-PC is considered to have a i586 configuration hence it is necessary to choose the stage3-x86 tarball.


 * 1) wget -S http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/releases/x86/2008.0/stages/stage3-x86-2008.0.tar.bz2

Configuring the Compile Options
Continue with the standard installation method until "5.d. Configuring the Compile Options".

In the Gentoo architecture classification fit-PC is i586. Hence, the flags in /mnt/gentoo/etc/make.conf need to be set thus

CFLAGS="-march=k6-2 -Os -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" CHOST="i586-pc-linux-gnu" MAKEOPTS="-j1"

Bootstrapping
Continue with the standard installation method until "7. Configuring the Kernel".

As we have already noted the fit-PC is classified as a i586 machine. However, we have downloaded a x86 tarball. To convert from the i486 sources to i586 it is necessary to under take the bootstrapping procedure described in the Gentoo FAQ.


 * 1) cd /usr/portage/scripts
 * 2) ./bootstrap.sh
 * 3) emerge -e system