Kernel 2.6.0-test4 on RH9

I have been a linux user for many years now. Once the 2.6.0-test series of kernels were released, I figured that it was time to upgrade my main (work) box, to something a bit more functional. Under the old 2.4.x series, I was using OSS for sound, which caused lots of problems with my soundcard, including bizarre things like having to restart X after playing Quake3. So, I decided that it was time to upgrade, and over all, I'm pretty happy with it.

Following is how I went about it...

Update: I've fixed all the dead links due to the lack of a directory index.

Update: Thanks to Chris, if the underneath looks too tricky, and you'd just like to get on with it and build the kernel, or you'd even like to just use a precompiled kernel, you can get it at http://people.redhat.com/arjanv/2.5/RPMS.kernel/

Update: 2.6.0-test5 is now working, and ALSA works really well with it. See here for details!

Update: I do not use RedHat/Fedora anymore, and the 2.4.x series of kernels are probably mainly used now in cases where upgrades to 2.6.x would be unlikely. This page is rather out of date. Please don't be surprised if something with it is now wrong. To my knowledge it's still ok, but YMMV.

Stuff To Do Before you Compile:

Get the kernel from a mirror!

Firstly, you have to compile modutils, otherwise your 'make modules' will fail with many unresolved symbol errors. You can get modutils from here, or from this local mirror. I used version 0.9.13 and it worked fine.

This is how I did it:

       
$ tar jxf module-init-tools-0.9.13.tar.bz2
$ cd module-init-tools-0.9.13
$ ./configure --prefix=/
$ make
$ su
Password: [entered my password]
# make moveold
# make install
# ./generate-modprobe.conf /etc/modprobe.conf
    

It's really important to do a "make moveold". This backs up your current modutils install by appending .old to their names. If you manage to break modutils, it's probably a good idea to have a working backup :)

After this, we're ready to start compiling...

Compiling:

It’s probably a good idea to compile USB support as modules. I’ve built sound support right into the kernel, and it appears to be working fine. (I’m on a Dell Inspiron 8100, with an ESS Maesto3).

Here’s my kernel configuration - I’d suggest that you use your own though… This one’s for a Dell Inspiron 8100 :)

After the compile:

RPM:

After upgrading to 2.6.0-test4, RPM started hanging. Thankfully, I found the solution on a page about 2.6.0-test2, which is linked to in the links section.

rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
no packages

I managed to fix this by export LD_ASSUME_KERNEL=2.2.5 If you are using a different shell, the equivalent will fix it too, of course :)

For a permanent fix, I added it to /etc/bashrc

Hotplug:

To have this working, you’ll need to edit /etc/rc.sysinit Replace all occurances of /proc/ksyms with /proc/kallsyms

SysFS:

To have SysFS working, you’ll need to do five things:

1. Create /sys

2. Edit /etc/rc.sysinit (yes, again!)

You'll need to add mount -f /sys on the line underneath mount -f /proc
After action $"Mounting proc filesystem: " mount -n -t proc /proc /proc add:
action $"Mounting sysfs filesystem: " mount -n -t sysfs /sys /sys to /etc/rc.sysinit

3. Do: echo "none /sys sysfs defaults 0 0" >> /etc/fstab

4. Find the function halt_get_remaining in /etc/init.d/halt, and change

awk '$2 ~ /^\/$|^\/proc|^\/dev/{next}

into

awk '$2 ~ /^\/$|^\/proc|^\/sys|^\/dev/{next}

USB:

As I compiled USB support into the kernel, I just commented out the USB module loading section in /etc/rc.sysinit However, if you'd like to use modules, which would probably be best, I suggest that you see Thomer Gil's 2.6.0-test2 page

Sound:

As I also compiled this into the kernel, I created a /etc/aumixrc file, containing the following:

vol:75:75:P
pcm:75:75:P
speaker:75:75:P
line:75:75:P
mic:75:75:R
cd:75:75:P
igain:75:75:P
line1:75:75:P
phin:75:75:P
video:75:75:P

Obviously, customise to your own liking. I created this file so that RedHat wouldn't keep overwriting it with 0 volume, as the do to /etc/.aumixrc

You then need to add the following to /etc/rc.local to have sound load on startup.

/bin/aumix-minimal -f /etc/aumixrc -L >/dev/null 2>&1;

VMWare:

You'll need to edit /usr/bin/vmware-config.pl

  1. Replace all occurances of /proc/ksyms with /proc/kallsyms
  2. Untar vmnet.tar in /usr/lib/vmware/modules/source
    • Edit bridge.c
    • On line 368, change: atomic_add(skb->truesize, &sk->wmem_alloc); into atomic_add(skb->truesize, &sk->sk_wmem_alloc);<
    • On line 618, change protinfo into sk_protinfo
    • Likewise, on line 817, change protinfo into sk_protinfo
  3. Tar the vmnet directory, and replace vmnet.tar
  4. Run /usr/bin/vmware-config.pl - it should run without a problem.

NVIDIA Drivers:

The NVIDIA Drivers caused the biggest problem that I had. I had to patch the source and recompile them manually. Download the latest NVIDIA drivers from www.nvidia.com, and grab the patch from www.minion.de or from a local mirror here.

I then needed to do the following:


    $ sh NVIDIA-Linux-x86-1.0-4496-pkg2.run --extract-only
    $ cd NVIDIA-Linux-x86-1.0-4496-pkg2/usr/src/nv
    $ patch ../../../../NVIDIA_kernel-1.0-4496-2.6.diff
    $ ln -s Makefile.kbuild Makefile
    $ cd ../../..
    $ su
    Password: [enter password here]
    # make install

After compiling the drivers, you'll need to manually add them to /etc/rc.local To do this, do echo "/sbin/modprobe nvidia" >> /etc/rc.local

After adding that last line, it's all done, and you're ready to go! So far, I haven't had any crashes with 2.6.0-test4, and am really happy.

Links: