I decided to install Gentoo GNU/Linux on my ASUS N10J-A2 netbook. If you are asking “Why Gentoo?” the answer is quite simple: because. The idea was to learn as much about GNU/Linux as possible and a very technical, powerful distribution seemed like the best fit. I know you can get GNU/Linux in a nice package where you do not need to do anything you wouldn't do on Windows (such as Ubuntu, Debian or SuSE), but that wasn't what I wanted. I want to get my hands dirty, I want to dig down deep and emerge (pun intended) a master of the system. But that's just me. Anyway, if you don't like Gentoo, tough luck - all the information here will be centered around it, so suck it up and deal. If you are looking for a similar installation guide but for Ubuntu/Debian, look here. Moreover, all information will also be dealing with a Intel Atom processor, so adjust any references in this text to your architecture. On with the show …
To install Gentoo, you'll need the Installer Live CD (cca. 700MiB) and not the Minimal Installation CD (cca. 50MiB). Choose the bigger download to have most of the necessary installation files handy on an “offline” CD rather than downloading everything from the internet. Note that Gentoo gave up on yearly releases, so the newest Live/Minimal CDs you will be able to get is probably 2008.0. The file you are looking for on any Gentoo mirror nearby is called “livecd-i686-installer-*.iso” and is usually found under /releases/x86/current/installcd/.
Also it is a good idea to think about a partition layout beforehand. My notebook provided me with a 320GB hard disk which constitutes cca. 298GiB. My partition scheme is therefore as follows:
/dev/hda1 ... /boot ... 32M /dev/hda2 ... /swap ... 4G /dev/hda3 ... system ... 20G /dev/hda4 ... /home ... * (~ 274G)
As you can see I was very generous with the /swap and the system partitions (where /, /usr, /var, etc. will reside). In addition, I moved the /home directory to a separate partition to protect the data. Of course during the installation you'll only create the partitions - setting /home to its partition will be done later in etc/fstab. (internal link -
)
(For future reference: entry to etc/fstab will look something like /dev/hda4 /home ext3 noatime 0 1
)
To know what hardware I will be dealing with during installation, I ran lspci from the Gentoo Live CD and got this output:
00:00.0 Host bridge: Intel Corporation Mobile 945GME Express Memory Controller Hub (rev 03) 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03) 00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03) 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02) 00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02) 00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02) 00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2) 00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02) 00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA AHCI Controller (rev 02) 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02) 02:00.0 Network controller: Atheros Communications Inc. Device 002a (rev 01)
To be able to react to all problems that occur during the installation and setup of the system it is recommended to know where to get help. The IRC channels of Gentoo (#gentoo and #gentoo-laptop on irc.freenode.net) are a great source of quick answers, if your problems are common or n00b-like; before chatting, please register your nick (add this link to irssi install description
!). However, if your problems are less common or complicated and cannot be solved in the channels, try searching the Gentoo forums and http://www.google.com for a solution and if you can't find anything, post it as a new topic. Also a great resource for tips, tricks and how-tos is the Gentoo Wiki.
The Gentoo installation process is very well documented in the Gentoo Handbook. All you need to do is follow the instructions. I will write down anything that I did differently from the description in the handbook as well as some of my personal choices and decisions.
One of the most important files is /etc/make.conf that houses the system's USE flags. The installation itself fills this file in several steps, but since it is a very usage and hardware specific setting I include it here in its entirety:
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /etc/make.conf.example for a more detailed example.
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="i686-pc-linux-gnu"
MAKEOPTS="-j2"
# USE flags
USE="aac aalib acpi alsa bzip2 cdr dbus doc dri dvd encode example fbcondecor ffmpeg flac gpm gtk2
hal icq irc libg++ mmx mmx2 ncurses nptl perl png python quicktime samba sse sse2 ssl symlink unicode
vi vim threads truetype win32codecs xorg xprint zlib -emacs -gnome -kde -qt"
# Portage overlay
PORTDIR_OVERLAY="/usr/local/portage"
# Video and input settings
VIDEO_CARDS="nvidia intel"
INPUT_DEVICES="evdev synaptics mouse keyboard"
# Gentoo mirrors
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
# Sync mirrors
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
I also included a couple of locales, since I am a “citizen of the world”:
en_US ISO-8859-1 en_US.UTF-8 UTF-8 de_DE ISO-8859-1 de_DE@euro ISO-8859-15 sk_SK ISO-8859-2 sk_SK.UTF-8 UTF-8
It is very important to not forget any part of your hardware during the kernel configuration. Mind your chipset (Intel 945GM in my case), SATA controller (Intel Corporation 82801GBM/GHM), network card (Realtek RTL8111/8168B), WLAN adapter (Atheros), as well as card bus controllers.
! app-portage/gentoolkit ??? emerge sys-apps/pciutils to get lspci, eix, module-rebuild etc.
Once you have reached the end of the Gentoo Handbook, you will want to set up your system.