Gentoo Linux Hints and Tips

I have worked with Gentoo Linux now for a few years, see:

Whilst I am not exactly a "newbie" I don't do this often enough to remember all the tricks. Therefore I will post some information here in case it helps others to get their systems running as they want them. I have always used UNIX, from the mid 1980s. I have worked with SunOS, Solaris, AIX, Linux, and many other flavours. Since my fiends and I built own first PCs in the mid 1970s and moved onto scientific supercomputing at work, this is perhaps understandable.

Several people in my software development group started using Gentoo Linux. It is less known than the "popular" distros, but also very popular. Its great strength is that everything, yes everything, is configurable. You can have all or nothing!

Many of the issues addressed here are related to installation problems. In this respect each distro is different, but stick wich the one you prefer. Linux is evolving rapidly and what is a problem today may not appear in these pages in future. Typically, if you find something doesn't work first time and there are lots of blogs about it, then it must be new and not yet fully supported. Be patient, either work around it like I have, or wait for a stable solution from your distro supplier.

Gentoo is no different from other Linux distros in this respect. It is in my opinion fun to use and a fantastic learning experience. A working Gentoo distribution also appears to be totally stable in my experience on both desktop and laptop systems.

The current set of Gentoo documentation is here:

Some more Linux things here:

Setting the data and time

I keep forgetting how to do this, so here are some notes. To set the system time and date do:

date -s "yyyy-mm-dd hh:mm:ss"

To sync the hardware clock to this system time do

hwclock --systohc

It is also advisable to run ntpd. Note that ntp-client is now deprecated. See


The last few Gentoo 2008.0 installs I did had an odd problem. The Grub menu does not show and the screen goes "crinkly". This is fixed by hashing out the splashimage line in the grub.conf file.

Older systems might have /boot as an ext2 file system. Don't forget to enable ext2 support if updating the kernel or you would not be able to save the boot image and edit grub.conf.

Hardware Testing

  • to test the memory, get a memtest disk and boot it.
  • use fsck to test the disk systems
  • use smartmontools to check for disk problems
  • try lm_sensors to monitor system parameters, including temperature

Maintaining File Systems

See IBM Linux 101

Problems with Devices

I had a problem with 2.6.31 where k3b could not find an optical disk writer. Eventually after trawling the Web I solved this problem as follows:

  1. add user to cdrom, cdrw and hotplug groups
  2. add apci to USE flags in /etc/make.conf
  3. emerge and update hald
  4. emerge and update dbus; /etc/init.d/dbus restart - this also restarts hald
  5. emerge and update k3b

Problems with Devices 2

If you update xorg-server and find that mouse and kbd no longer work your /var/log/Xorg.0.log may say something like "module ABI major version (14) doesn't match the server's version (13)".

You will probably also have to update all the x11-drivers like this

emerge -1 $(qlist -IC x11-drivers)

Native POSIX Thread Library (NPTL) settings

Applies to RHEL3+ and Fedora Core.

Native POSIX Thread Library (NPTL), a new implementation of POSIX threads for Linux, provides performance improvements and increased scalability.

This thread library is designed to be binary compatible with the old LinuxThreads implementation; however, applications that rely on the places where the LinuxThreads implementation deviates from the POSIX standard will need to be fixed.

To disable NPTL and enable the older LinuxThreads behaviour one time on a per process basis, you can prefix the command by the following environment variable: LD_ASSUME_KERNEL=2.4.19 cmd

or to use LinuxThreads without floating stacks (older): LD_ASSUME_KERNEL=2.2.5 cmd

You can also disable it permanently system-wide, by adding the following to /etc/initscript and then reboot your system. export LD_ASSUME_KERNEL=2.4.19

To verify that it works, you can use the following command: getconf GNU_LIBPTHREAD_VERSION

See also or initscript(5)


Current installations I have are:

Click on the above links for information about these installations.

Special Topics

Topic revision: r24 - 20 May 2014 - 13:02:34 - RobAllan
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback