Gentoo Linux Hints and Tips
I have worked with Gentoo Linux now for a few years, see: http://www.gentoo.org/doc/en/handbook/index.xml
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: http://www.gentoo.org/doc/en/list.xml
Some more Linux things here: http://www.ibm.com/developerworks/linux/library/l-10sysadtips/?cmp=dw&cpb=dwlin&ct=dwnew&cr=dwnen&ccy=zz&csr=010512
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
It is also advisable to run ntpd. Note that ntp-client is now deprecated. See http://en.gentoo-wiki.com/wiki/NTP
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.
- 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:
- add user to cdrom, cdrw and hotplug groups
- add apci to USE flags in /etc/make.conf
- emerge and update hald
- emerge and update dbus; /etc/init.d/dbus restart - this also restarts hald
- 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:
or to use LinuxThreads without floating stacks (older):
You can also disable it permanently system-wide, by adding the following to /etc/initscript and then reboot your system.
To verify that it works, you can use the following command:
See also http://en.wikipedia.org/wiki/NPTL
Current installations I have are:
Click on the above links for information about these installations.