Installing Gentoo Linux
Introduction
Here's what I learned while installing Gentoo over the Net using the x86
version of "Gentoo 2006.0 Minimal CD/InstallCD". Do not read the Linux
2006.0 x86 Handbook, as this is meant for networkless installation, and
read Gentoo
Linux x86 Handbook instead.
If you are using an on-board LAN adapter such as the nVidia
port (driver)
on an ASRock motherboard, it might not be supported by standard kernels. In
this case, either use a full CD, or borrow a standard PCI LAN adapter just to
install Gentoo and the required LAN driver. Once you're up and running, you
can download and install the nVidia driver for the on-board LAN and audio adapters.
Setup
We'll install Gentoo through the Net using the Mininal CD:
- Get a Linux-friendly network card, make sure a DHCP server is available
to give this host an IP configuration, burn the ISO image, and boot from
the CD
- After you get a prompt, if you are not using a US keyboard, you might
need to reload the layout using the loadkeys command followed by the ISO
name of the layout, eg. loadkeys fr
- Partition your hard disk using either fdisk or cfidsk
- Create filesystems using eg. mke2fs /dev/hda1
- Initialize the swap partition, eg. mkswap /dev/hda2 ; swapon
- Mount and move into the new hard disk: mount /dev/hda1 /mnt/gentoo ;
cd /mnt/gentoo
- Use the date command to check that the date is correct (must be in the
format MMDDhhmmYYYY)
- Download a stage3 file (i586, i686, x86?) and
Portage from a mirror using "links http://www.gentoo.org/main/en/mirrors.xml";
Stages are located in /releases/x86/2006.0/stages/ , while Portage files
are located under /snapshots
- Unpack the stage3 tar file: tar xvjpf stage3.tar.bz2
- Unpad the Portage file: tar xvjf /mnt/gentoo/portage-<date>.tar.bz2
-C /mnt/gentoo/usr
- Add a list of mirrors in the Portage file: mirrorselect -i -o >>
/mnt/gentoo/etc/make.conf
- Set the rsync servers: mirrorselect -i -r -o >> /mnt/gentoo/etc/make.conf
- Copy DNS info: cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
- Mount proc and dev: mount -t proc none /mnt/gentoo/proc ; mount -o bind
/dev /mnt/gentoo/dev
- Chroot to the hard disk:
- chroot /mnt/gentoo /bin/bash
- env-update
- source /etc/profile
- export PS1="(chroot) $PS1"
- Update the Portage tree using rsync: emerge --sync . Do not update Portage
itself at this point even if warned that a new version is available
- Configure the kernel:
- Set the timezone (let's use London): ls /usr/share/zoneinfo ; cp
/usr/share/zoneinfo/Europe/London /etc/localtime
- USE="-doc symlink" emerge gentoo-sources
- Check that the source code was correctly used through ls -l /usr/src/linux
- emerge genkernel
- zcat /proc/config.gz > /usr/share/genkernel/x86/kernel-config-2.6
- emerge coldplug
- rc-update add coldplug boot
- find /lib/modules/2.6 -type f -iname '*.o' -or -iname '*.ko'
- nano -w /etc/modules.autoload.d/kernel-2.6
Issues
- Remove unneeded items in Grub menu
- nslookup doesn't work?
- no more mouse once used my kernel instead of Gentoo CD
- nVidia audio
- domain name since not set by DHCP
- 80x25 text mode instead of 132? when using Gentoo CD
Tips
Even though we're prompted to choose a keyboard (eg. 16 for French), Gentoo
forgets this setting, and reverts to US keyboard layout. To choose a new layout
once Gentoo is up and running, use eg. "loadkeys fr".
Resources