Today’s goal is to install the server so that it can boot. This includes configuring the use flags, configuring the kernel, set up /etc/fstab and install grub.
Let’s start with chrooting – according to chapter 6 of the gentoo handbook. We mount proc and dev and chroot. Then, we sync and update portage. Now comes the USE flag definition – this will follow as soon as I can copy / paste to the blog. Now, we add these lines to /etc/locale.gen:
de_CH.UTF-8 UTF-8
en_US.UTF-8 UTF-8
… and run locale-gen.
Now, it’s finally time to emerge the kernel – gentoo-sources, and then configure it. Also, we emerge the following packages: reiserfsprogs, lvm2, sudo and grub.
Kernel-Configuration
As usual, I list only what definitively needs to be there – I also turned off stuff, but this is according to the needs. I make sure that everything mentioned in chapter 7 of the Gentoo Handbook and everything mentioned in the LVM doc is turned on. Here’s the list:
Processor type and features --->
Subarchitecture Type (PC-compatible)
Processor family: (Pentium-4)
(2) Maximum numbers of CPU supportedPower Management Support --->
CPU Frequency Scaling --->
<M> Intel Pentium 4 Clock Modulation
[*] PCI Express supportDevice drivers --->
Plug and Play Support --->
[*] Plug and Play support
Multi-device support (RAID and LVM) --->
[*] Multiple devices driver support (RAID and LVM)
<M> Device mapper supportSound -->
[ ] Sound cart support
File systems —>
CD-ROM/DVD filesystems —>
[*] MS Joliet CDROM extension
DOS/FAT/NT Filesystems —>
(850) Default codepage for FAT
Native Language support —>
<*> Codepage 850
BTW: Don’t forget to set the timezone…. Then, we make sure that dm-mod is loaded automatically (by adding dm-mod to /etc/modules.autoload.d/kernel-2.6)
Finally, let’s create /etc/fstab:
/dev/hda1 / ext3 noatime 0 1
/dev/hda2 none swap sw 0 0
/dev/vgroup/usr /usr reiserfs notail 0 2
/dev/vgroup/opt /opt reiserfs notail 0 2
/dev/vgroup/var /var reiserfs notail 0 2
/dev/vgroup/tmp /tmp reiserfs notail 0 2
/dev/vgroup/home /home reiserfs notail 0 2
/dev/shm tmpfs defaults 0
Now, we configure /etc/conf.d/hostname and /etc/conf.d/net. Then, we set the root password, add a user, adjust rc.conf, define the keymap and the clock and configure grub; this is all explained in detail in chapter 8 and the following ones of the handbook.
Now, we reboot – voila!!













