@#$^*(&% Gentoo!!!1

A record of how to get a functioning Gentoo installation on a Toshiba Satellite M15, my ancient and venerable laptop that just will not die no matter how much I want a shiny new Tablet.

I abandoned Gentoo in 2006 because of its constant state of brokenness. Over the past few years I'd randomly attempt to put it back in, but had no luck due to various install failures. Unfortunately, my laptop has aged out of being supported by any other distro without just as much trouble as using Gentoo, so I tried again.

And what do you know? It worked flawlessly. Well, flawlessly for Gentoo.


Once you get the install CD booted, there is nothing to it. Just follow the stage 3 steps and you have the barest of bare bones system, but probably not what anyone apart from command line purists would call usable.

However, getting the install CD booted is a hassle. It seems to be a common problem with the minimal CD, pata_qdi fails and locks the whole thing up, but the error message will have long since scrolled by the time it happens.

There is a simple solution. Boot with:

   gentoo noload=pata_qdi

This will be useful to remember two days later when you are editing the grub.conf and you can't remember what module it was that you blocked to get a successful boot. Also it may make you start taking careful notes about what you else you did to get up and running.

You add the option to the end of the kernel line in grub.conf.

  title=Gentoo Linux (2.6.30-gentoo-r3)
  root (hd0,0)
  kernel /boot/kernel-genkernel-x86-2.6.30-gentoo-r3 root=/dev/ram0 real_root=/dev/hda3 noload=pata_qdi
  initrd /boot/initramfs-genkernel-x86-2.6.30-gentoo-r3

Make Options

Gently suggest that GCC build packages with the following options:

  CFLAGS="-march=pentium-m -mtune=pentium-m -pipe -O3 -fomit-frame-pointer"

I have never been crazy with the optimizations and have noticed that sometimes the ebuild guys would quietly disable them anyway when you weren't paying attention. Particularly for SPARC.

Configure Wireless

Support for my wireless card isn't built into the install CD kernel, so I need to emerge ipw2100-firmware. The configuration is simple, but the existing documentation is both wrong and outdated. /etc/conf.d/wireless is deprecated, and the kernel will complain mightly if you try to use it, but the instructions are sitting in /etc/conf.d/wireless.example and haven't been told about how much the kernel doesn't like it when you do it that way.

The wireless card was assigned to eth1, so edit /etc/conf.d/net:

and rc-update it if you want it to start at boot.

The devs decided to make wpa-supplicant default because it really is better. And for those of us that still need the hoary old wireless-tools and are stuck with less than secure WEP, this is why we returned to Gentoo. Add a line to /etc/conf.d/net telling it to use wireless-tools.

    modules=( "iwconfig" )


Worked fine at first, and then evdev got me. No more input anymore!

  1. Since I'll be stuck with it now, put the evdev use flag in make.conf, and rebuild x11-server.
  2. Remove the input sections, kbd and mouse, from xorg.conf. I am not brave enough to let evdev have the touchpad too, because I want to be able to at least click my way to an escape if the new stuff doesn't work.
  3. Look for a likely policy to steal or write your own. I followed the instructions, and looked in /usr/share/doc/hal* and found something I could hack into functioning. You then have to

    bzcat file.bz >> properly-named-hal-file
    and do the hacking. I came up with:
       <?xml version="1.0" encoding="UTF-8"?>
       <deviceinfo version="0.2">
           <match key="info.capabilities" contains="input.keyboard">
               <merge key="input.X11_driver" type="string">evdev</merge>
               <merge key="input.X11_options.XkbRules" type="string">xorg</merge>
               <merge key="input.X11_options.XkbModel" type="string">pc101</merge>
               <merge key="input.X11_options.XkbLayout" type="string">us</merge>
    Which worked, but was incredibly stupid, because as we know, the documentation is sketchy at best and the new configuration is in XML. XML is my candidate for the worst idea ever in computing.

    Looking for a policy to borrow is much better. They are sitting in /usr/share/hal/fdi/policy/10osvendor. And look, there is a synaptics one there too. Just grab 10-x11-input.fdi and copy it to /etc/hal/fdi/policy. No dealing with bz or XML at all.

  4. Don't forget to restart HAL and avoid saying, "But this last fix should have changed something!"
       /etc/init.d/hald restart
  5. Make sure hald is added with rc-update

If all this hadn't been quite enough, some genius decided that touchpad tapping should be disabled by default. Back into xorg.conf and add the option to synaptics:

   Option  "TapButton1" "1"

Nvidia Drivers

The graphics card is an Nvidia GeForce 4 Go, which pushes me back into the legacy drivers. I am duly grateful that I am not in the legacy-old drivers. To keep the latest and greatest from installing and breaking everything, we have to edit /etc/portage/package.mask and add:


Change the driver in xorg.conf from nv to nvidia and reboot into a black screen. The magic option for nvidia in xorg.conf is:

    Option "UseDisplayDevice" "DFP"


No sound. Fortunately, the Gentoo Alsa Guide has instructions on getting the Intel AC'97 stuff working. The kernel configuration menus move around, but otherwise, all is good.

Quick and Dirty Genkernel Upgrade

Almost guaranteed to not quite work because of incompatibilities with the oldconfig, but it'll drag most stuff along and update your grub.conf too.

  genkernel all --bootloader=grub 

You need the symlink use flag.

June 7, 2009