Genkernel menuconfig all

After you have made any changes you want to your kernel configuration, select Exit, and then choose Yes to save it. At this point, genkernel makes your new kernel. This takes a while.

After genkernel is complete, note the names of the kernel and boot loader. (Type ls /boot to see the names.)

25. Add coldplug. Type the following to enable coldplug (so hardware outside of that which is detected during initialization is detected and configured automatically):

# emerge coldplug

# rc-update add coldplug boot

26. Configure system services. Install your system services — system logger, cron service, hotplug, and reiserfs service — and set the domain name. Then turn on each of those services, as follows:

# emerge syslog-ng

# rc-update add syslog-ng default

# emerge vixie-cron

# rc-update add vixie-cron default

# emerge hotplug

# rc-update add hotplug default

# emerge reiserfsprogs

27. Add special driver support. There may be particular kernel modules required by your computer at this point. For example, if you have a special Ethernet adapter or a special type of video card, use the emerge command to install kernel modules now. You may not need any of them. Here are a few examples:

# emerge nvidia-kernel

# emerge nforce-audio

# emerge e1000

# emerge ati-drivers

These emerge command lines are used only if you have special hardware associated with the kernel drivers. Respectively, those commands load drivers for accelerated NVidia video cards, audio for Nvidia NForce motherboards, fIntel e1000 Gigabit Ethernet cards, and ATI Radeon+/FireGL graphics acceleration video cards.

28. Add user and machine information. Add a password for the root user, a regular user account name of your choosing (chris in this example), a machine name, and a domain name. If you like, you can also edit the /etc/hosts and /etc/rc.conf files to add IP addresses and a hostname or change the basic system startup script.

# passwd

# useradd chris -m -G users,wheel,audio -s /bin/bash

# passwd chris

# echo mymachine > /etc/hostname

# echo mydomain.com > /etc/dnsdomainname

29. Set up networking. Edit the net file, and then run rc-update to add the eth0 interface as the default. (Uncomment the line iface eth0 = "dhcp" to have the network use DHCP to start up automatically.)

# rc-update add net.ethO default

30. Add kernel modules. Add any extra kernel modules that you need to add at boot time. You usually need to do this only if some piece of hardware isn't detected and the module needed to use it isn't automatically loaded. Edit either the kernel-2.4 or kernel-2.6 file, depending on which kernel you are using.

# nano -w /etc/modules.autoload.d/kernel-~uname -r~ You can type uname -a to see what your current kernel version is.

31. Configure the boot loader. You need to install a boot loader (grub in this example) and configure it. The example makes the following assumptions about your setup. You need to replace any of the following information with the settings for your particular setup:

Gentoo is installed on your first IDE hard disk (/dev/hda).

You have a separate /boot partition on /dev/hdal.

Your initrd file in the /boot directory is initramfs-genkernel-x86-2.6.18-gentoo-r2.

Your kernel file in the /boot directory is kernel-genkernel-x86-2.6.18-gentoo-r2.

If any of that information is different for your setup, you need to adapt the following step appropriately. To configure grub, install it with emerge, run the grub command, and then create the grub.conf file as follows:

# emerge grub

# grub grub> root (hdO.O) grub> setup (hdO)

grub> quit

When you create the grub.conf file, you need to do the following:

# cd /boot/grub

# cp grup.conf.sample grub.conf

# nano -w /boot/grub/grub.conf default 0 timeout 15

splashimage=(hd0,0)/grub/splash.xpm.gz title=Gentoo Linux root (hd0,0)

kernel /kernel-genkernel-x86-2.6.18-gentoo-r2 root=/dev/hda0 initrd /initrd-genkernel-x86-2.6.18-gentoo-r2

32. Reboot. Exit from your chroot partition by running umount to unmount all partitions and then rebooting as follows:

# umount /mnt/gentoo/proc /mnt/gentoo

# reboot

Remove the installation disk and allow the computer to boot from hard disk. After a few moments, you should see the GRUB boot screen. Select Gentoo Linux (press Enter).

From here on, you will be booting from the hard disk and working directly from the operating system you installed. If you see error messages, such as missing kernel drivers, I recommend that you go to http://forums.gentoo.com and search for the driver that's causing problems. Chances are that someone else has had the same problem and can offer you a solution.

33. Install a desktop. For most of us, it's not much fun just working from the command line. The following command installs a basic set of desktop packages, including the X Window System (xfree), KDE desktop (kde), Mozilla browser (mozilla), and Openoffice.org office suite (openoffice-bin). (This takes a long time to install over the network.)

# emerge xorg-x11

At this point you can add a simple window manager, such as enlightenment. You could add the entire KDE desktop (emerge kde) or GNOME desktop, but I warn you that it will take a very, very long time to complete over the network. The Gentoo Quick Install Guide shows an example GNOME install (emerge -vp gnome) as taking nearly nine hours to complete and a complete KDE install (emerge -vp kde-meta) taking more than 19 hours to complete.

Here is an example of installing the enlightenment window manager:

# emerge enlightenment

After that, you should choose some desktop applications to install. For example, here's how to install the Firefox Web browser and Abiword word processor:

# emerge mozilla-firefox abiword

34. Configure the X server. Now that your desktop software is installed, you need to configure the X Window System to work properly with your video card and monitor. Type the following to configure your video card and monitor:

# Xorg -configure

The previous command creates a sample configuration file: / root/xorg.conf.new. Type the following command to test that configuration file:

# X -config /root/xorg.conf.new

If you see a gray screen with your mouse cursor represented by an X and able to move, the configuration file is basically working. To exit from X, press Ctrl+Backspace. Copy the file to its permanent location:

# cp /root/xorg.conf.new /etc/X11/xorg.conf

Now, you should be able to start your desktop interface:

# startx

If no window manager is found, or if you get a window manager you don't want such as twm, create a $HOME/.xinitrc file and indicate the file manager to use. For example, to use fluxbox as your window manager, add the following line to your .xinitrc file:

XSESSION=enlightenment

You can run startx again to start your desktop with the new window manager.

At this point you should have a working desktop. If you need help getting it working, refer to the Gentoo X Server Configuration HOWTO (www.gentoo.org/doc/en/xorg-config.xml). For documentation on configuring other parts of your Gentoo system, I recommend that you check out www.gentoo.org/doc/en/index.xml.

Continue reading here: Which Version Is Right for You

Was this article helpful?

0 0