Gentoo Wiki




These pages

This page is a part of two pages regarding all I installed and configure on my laptop, a HP nc6000.

When I received the laptop, windows xp professional was installed and I could not remove it because I must use it at work.

nc6000 short description

The nc6000 I work with has the following hardware :

and personally, I use :

Before installing Gentoo

We need some hard disk free space

You have two choices :

Personnaly, I started with the internal disk, and migrated after several months on an external hard drive. All the installation will be described with these two hard drive solutions. If you could/want to afford an external usb hard drive, you have nothing to do except to plug it into your usb port, and to jump to the next section

If you decide to install on the internal drive, you have to re-partition the disk. I could not wipe the existing windows installation and I had to search a solution to re-partition without destroying the existing data.

I strongly encourage you to do a full backup of your disk before attempting to move/shrink/modify the disk partitioning. There is always a risk to loose data or to totally crash your disk and not be able to boot anymore.

I did not search a lot to find this kind of backup software because we had in the office Norton Ghost and I did a complete image of my disk.

For the partitions modification, I found two solutions :

I shrink my C: to 11,7 Gb, my D: to 1 Gb and moved the D: against the C:, so the free space is consolidated.

Despite of Partition Magic told me that no error occured during the resizing and moving of the existing partition, since the re-partitioning, my windows is horribly slow to boot (something like 5 minutes instead of 1 or 2) but I had no other annoyances.

Get the installation media

Go to the Gentoo site and download and burn the Minimal install cd or the universal install cd. I did it with the minimal one but it is not important as I won't cover all the installation steps details.

If you need some installation documentation, the Gentoo Handbook is complete (and interesting to understand what we do). If you are already used with gentoo installation, you can use the Quick installation guide which is a good reminder and does not explain all the commands you have to type.

Gentoo Installation

Preparing the disks

 fdisk /dev/hda
 mkswap /dev/hda6
 swapon /dev/hda6
 mkreiserfs /dev/hda7
 mount /dev/hda7 /mnt/gentoo/ 
 fdisk /dev/sda
 mkswap /dev/sda2
 swapon /dev/sda2
 mkreiserfs /dev/sda1
 mount /dev/sda1 /mnt/gentoo/ 

Getting a base gentoo filesystem snapshot

cd /mnt/gentoo/

choose a mirror and browse to this directory :


get the lastest release of gentoo :


browse to the portage directory :


get the lastest version of the portage tree :


quit the browser (lynks2) and uncompress the files :

cd /mnt/gentoo/
tar -xjpf stage3-*.tar.bz2
tar -xjpf -C /mnt/gentoo/usr portage-*.tar.bz2

continue to prepare your future new root directory

mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
cp -L /etc/resolv.conf /mnt/gentoo/etc/

Enter your new home and start the deco

chroot /mnt/gentoo /bin/bash
env-update && source /etc/profile
cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime
nano /etc/conf.d/hostname
nano /etc/fstab
nano /etc/rc.conf

change if you want (personally I put vim as default editor)

nano /etc/conf.d/clock

replace UTC by local

nano /etc/conf.d/keymaps

replace keymap=us by your keyboard layout choose between the layouts in /usr/share/keymaps/i386/...

Tune your compilation

File: Example /etc/make.conf
CFLAGS="-Os -march=pentium-m -pipe -fomit-frame-pointer"
INPUT_DEVICES="keyboard mouse synaptics vmmouse"
VIDEO_CARDS="fglrx radeon vmware"
LINGUAS="en fr"
USE="a52 aac acpi alsa apache2 apm arts avi bash-completion -berkdb bmp bzip2 
  cdparanoia cdr cups doc dri dvd dvdread -eds -emboss encode esd exif ffmpeg
  foomaticdb ftp gdbm gif -gnome gpm -gstreamer -gtk -gtk2 howl imagemagick
  imlib -ipv6 jpeg kde kdeenablefinal ldap -libg++ libwww mad matroska mikmod
  mmap mmx -motif mp3 mpeg nptl nptlonly nsplugin ogg opengl oss pcre pdflib
  perl png qt quicktime samba sdl spell ssl svga syslog tiff truetype udev
  unicode usb userlocales vcd verbose vorbis wifi win32codecs X xinerama
  xml -xmms xosd xv xvid"

Build your own kernel

emerge -va gentoo-sources
cd /usr/src/linux
make menuconfig

Take a tour in the menus. Here are the modifications I did comparing the default kernel configuration for basic setup. I will complete this configuration in each specific chapter (wireless, modem, power management, ...) : For each parameter, I give you the parameter name (example CONFIG_TIGON3) then, I describe where I found it in the menuconfig interface (menus and sub-menus). If the menus are not the same (when the kernel version is updated), you can always find where is this parameter (if it exists anymore) by typing "/" when you are in the menuconfig, and search for the name of the parameter without the CONFIG_ part, in our example "TIGON3".

You will see that some options are set to be able to run Gentoo natively on the laptop, and others are set to be able to run Gentoo inside vmware. They don't exclude each other; you can enable both the settings if you want to be able to boot your linux natively AND inside the vmware.

Linux Kernel Configuration: Basic
Loadable module support  --->
  (These one is to be able to run gentoo inside vmware)
  [*] Enable loadable module support
  [*]   Module unloading
  [*]     Forced module unloading
  [*]   Automatic kernel module loading
Processor type and features  --->
  Processor family  --->
    (X) Pentium M
Device Drivers --->
  (These inside SCSI are set to run gentoo inside vmware)
  SCSI device support  --->
    <*>   SCSI disk support
    <*>   SCSI generic support
          SCSI low-level drivers  --->
            <*> BusLogic SCSI support
  Network device support --->
    <*> Universal TUN/TAP device driver support
        (This one is to run gentoo inside vmware)
        Ethernet (10 or 100Mbit)  --->
          [*] EISA, VLB, PCI and on board controllers
          <*>   AMD PCnet32 PCI support
        (This one is to run gentoo natively on the laptop)
        Ethernet (1000 Mbit)  --->
          <*> Broadcom Tigon3 support
  Sound  --->
    <*> Sound card support
        Advanced Linux Sound Architecture  --->
          <*> Advanced Linux Sound Architecture
              PCI devices  --->
                (This one is to run gentoo natively on the laptop)
                <*> Intel/SiS/nVidia/AMD/ALi AC97 Controller
                (This one is to run gentoo inside vmware)
                <*> (Creative) Ensoniq AudioPCI 1371/1373
  USB support  --->
    <*> Support for Host-side USB
    [*]   USB device filesystem
    <*>   EHCI HCD (USB 2.0) support
    <*>   OHCI HCD support
    <*>   UHCI HCD (most Intel and VIA) support
    <*> USB Mass Storage support
    <*> USB Human Interface Device (full HID) support
File systems  --->
  (Choose the file system(s) you use to format your disk)
  (Don't compile them as module (M) but as included (*))
  <*> Second extended fs support
  <*> Ext3 journalling file system support
  <*> Reiserfs support
  <*> JFS filesystem support
  <*> XFS filesystem support
Note: Perhaps I miss some other parameters important for the kernel to boot or to recognize basic hardware proprely. Don't hesitate to update this configuration or to submit me some questions or modifications

Build your kernel :

make && make modules_install
cp arch/i386/boot/bzImage /boot/kernel-2.6.17-gentoo-r7

Change the kernel name if needed

cp .config /boot/config-2.6.17-gentoo-r7

I always keep the config files for each kernel I keep in /boot, so I can always put an horrible mess in my kernel config to test some strange stuff and go back to a secure and known situation afterwards.

Configure the boot loader

Install some interesting tools for your first boot. Personnaly I use grub, but you can also use lilo.

emerge -tva syslog-ng vixie-cron reiserfsprogs dhcpcd grub
nano /boot/grub/grub.conf

title=Gentoo 2.6.16 r9
root (hd0,0)
kernel /boot/kernel-2.6.16-gentoo-r9 root=/dev/hda7

title=Gentoo 2.6.17 r7 test
root (hd0,0)
kernel /boot/kernel-2.6.17-gentoo-r7 root=/dev/hda7

title=Gentoo 2.6.16 r9
root (hd0,0)
kernel /boot/kernel-2.6.16-gentoo-r9 root=/dev/sda1 rootdelay=10

title=Gentoo 2.6.17 r7 test
root (hd0,0)
kernel /boot/kernel-2.6.17-gentoo-r7 root=/dev/sda1 rootdelay=10
(inside grub) root (hd0,6)
(inside grub) setup (hd0)
(inside grub) root (hd1,0)
(inside grub) setup (hd1)
(inside grub) quit

Cross your fingers and reboot your system

init 6

Welcome in your own brand new Gentoo

... Or perhaps do you encounter some boot problems ?

Here is a quick way to solve the most current errors encountered for your very first boot.

Grub is not loading

You miss something during the installation of grub on the master boot record. Check again the section Configure the boot loader and especially the part when you are "inside" grub.

Grub is ok, but kernel does not load

If you see some messages from grub, but your kernel does not load (you don't see plenty of screens filled by kernel messages), check these points :

Check the following line in your grub.conf file and be sure that the hard disk and partition you define are correct (see the section Configure the boot loader)

File: /boot/grub/grub.conf
root (hd0,0)

Check the following line in your grub.conf file and be sure that the kernel filename is correct

File: /boot/grub/grub.conf
kernel /boot/kernel-2.6.17-gentoo-r7 ...

Check that inside your boot directory, you have a symbolic link named boot pointing on the directory itself, if not, create it

ls -l /boot
lrwxrwxrwx 1 root root       1 Aug  3 14:42 boot -> .

if it does not exist, type this command :

cd /boot
ln -s . boot

Grub and kernel are ok, but the kernel cannot mount /

Check the following line in your grub.conf file and be sure that the / filesystem location is correctly defined :

File: /boot/grub/grub.conf
 kernel /boot/kernel-2.6.17-gentoo-r7 root=/dev/hda7 

Check that / device is also correctly defined with the correct filesystem type in the /etc/fstab file :

File: /etc/fstab
 /dev/hda7    /    reiserfs    noatime   0 1 

Check that your kernel supports natively (not as module) this filesystem type (see the kernel configuration section)

Linux Kernel Configuration: File systems
File systems  --->
  (Choose the file system(s) you use to format your disk)
  (Don't compile them as module (M) but as native (*))
  <*> Second extended fs support
  <*> Ext3 journalling file system support
  <*> Reiserfs support
  <*> JFS filesystem support
  <*> XFS filesystem support

If you installed Gentoo on an usb hard drive, check that you did not forget the "rootdelay" parameter so the kernel waits for the disk to be recognized before trying to mount it

File: /boot/grub/grub.conf
 kernel /boot/kernel-2.6.17-gentoo-r7 root=/dev/sda1 rootdelay=10 

Google is your friend

If you did not find how to resolve your problem in these few advises, check the error message you have into google, browse gentoo forums, they have some boot errors collections and solutions and don't forget that Gentoo has a fantastic community that will help you.

Update your system to the last minute

Warning: From here, I do not describe ALL the steps of the installation, but only what I did that is specific to my laptop and what I decide to install. Use the Gentoo installation manual (see the links on the beginning of this page) and "complete" it by my notes if needed.

Note: A good example of things that I don't cover here : portage mirrors configuration before doing the first emerge

At this point, your network should work if you are using a wired connection.

Note: If you want to use your wireless connection or your modem, you can jump to the section which talk about your wireless card configuration or your modem configuration to the one describing but you will need a wire at least to install the wireless or modem packages.

Synchronize and update your system :

emerge --sync
emerge -va portage
emerge -Dve system

Create your normal user

As my grandmother always said :

Warning: Never Never Never work with root as standard user !!!
useradd your_user
passwd your_user
mkdir /home/your_user
chown your_user:users /home/your_user/
gpasswd -a your_user wheel
gpasswd -a your_user users
gpasswd -a your_user audio
gpasswd -a your_user video
gpasswd -a your_user cdrom

Install your Windows Manager and/or your Desktop Environment

Personnaly, I installed KDE :

emerge -Dva kde-meta
su - your_user
echo exec startkde > .xinitrc 

Start your first X session

Normally, all the X automatic detection mechanism will be ok (without 3D acceleration yet)


It's time to fill you disk !


Code: lspci
 02:04.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)

See Atheros 5xxx

Cpu throttle

This will make your nc6000 behave in the following way:

AC on: Full throttle

AC off:

CPU To Hot: Will override the rules above and will force CPU to lowest frequency

Install the cpu frequency tools with: emerge -av cpufreqd

Modify configfile /etc/cpufreqd.conf:

File: Example /etc/cpufreqd.conf

name=Performance High

name=Powersave Low

name=Conservative High

name=Conservative Low

name=AC Rule
profile=Performance High
name=AC Off - Low Battery
profile=Powersave Low

name=AC Off - Medium Battery
profile=Conservative Low

name=AC Off - High Power
profile=Conservative High

name=CPU Too Hot
profile=Powersave Low

Add cpufreqd to default runlevel: rc-update -a cpufreqd boot

NB: Make sure that the kernel is configured with speedstep and has the correct scaling governors:

Linux Kernel Configuration: Frequency Scaling
	[*] CPU Frequency scaling
	[ ]   Enable CPUfreq debugging
	<*>   CPU frequency translation statistics
	[ ]     CPU frequency translation statistics details
		 Default CPUFreq governor (userspace)  --->
	<M>   'performance' governor
	<M>   'powersave' governor
	---   'userspace' governor for userspace frequency scaling
	<M>   'ondemand' cpufreq policy governor
	<M>   'conservative' cpufreq governor
	---   CPUFreq processor drivers
	< >   ACPI Processor P-States driver
	< >   AMD Mobile K6-2/K6-3 PowerNow!
	< >   AMD Mobile Athlon/Duron PowerNow!
	< >   AMD Opteron/Athlon64 PowerNow!
	< >   Cyrix MediaGX/NatSemi Geode Suspend Modulation
	<*>   Intel Enhanced SpeedStep
	[*]     Use ACPI tables to decode valid frequency/voltage pairs
	[ ]     Built-in tables for Banias CPUs
	< >   Intel Speedstep on ICH-M chipsets (ioport interface)
	< >   Intel SpeedStep on 440BX/ZX/MX chipsets (SMI interface)
	< >   Intel Pentium 4 clock modulation
	< >   nVidia nForce2 FSB changing
	< >   Transmeta LongRun
	---   shared options
	[ ]   /proc/acpi/processor/../performance interface (deprecated)

Make sure that the scaling governors are loaded during boot. Add the folowing lines to /etc/modules.autoload.d/kernel-2.6

File: /etc/modules.autoload.d/kernel-2.6

Finally start the service: /etc/init.d/cpufreqd start

Check cpufreq status with: cpufreq-info

Retrieved from ""

Last modified: Thu, 28 Aug 2008 22:44:00 +0000 Hits: 13,046