I’ve been staying updated for the latest Slackware by updating to the slackware current branch. However, I need to blacklist the kernel when it does not work for may hardware. Last night, I fix the problem by building the latest kernel against the old config that works on my hardware.
I only use packages from the official Slackware mirrors and kernels provided by Slackware. Therefore, when I say latest kernel, it does not mean the latest kernel from Linux Torvalds.
By the time of writing, the latest kernel provided by the slackware-current as of March 31, 2010 is the 220.127.116.11 and I use the huge-smp version of it. The working config so far to my old laptop is 2.6.33, the first one that was released on March 1, 2010. The rebuild of it (2.6.33) released a few days after the first release did not work anymore. So here are the steps on what I did to build those tricky kernel (actually it is not that tricky).
Here is the state of my laptop before building the current kernel:
- Upgraded to the latest slackware current except the kernel and its module
- It is using the old huge smp 2.6.33 kernel
- I don’t have the source tree (only the packages)
- The system is running stable, but I want more
So these are the things I did to upgrade to the latest kernel using the old config. The summary looks like:
- Download the source tree from slackware-current
- Install the kernel source at slackware/k directory
- Copy the old config to the kernel source
- Build the kernel
- Run slackbuild to build the kernel package
- Build the kernel modules
- Install from the built packages
So here are the details.
Since I don’t have yet the source code tree, I need to copy it from my local mirror and bring it home. After checking the /usr/src, I found out that I don’t have the 18.104.22.168 source tree there. So what I did was install them from the packages at slackware/k from the -current tree (saved somewhere on my hard drive).
Then, to make sure things won’t go wrong, I read the README.TXT for the slackbuild of the kernel. I actually tried them, but I found out that I only need the first two commands so I won’t post the rest. First, I need to copy the old working config to the source directory at /usr/src/linux-22.214.171.124/ using the old config from my /boot directory for the 2.6.33 kernel. Few days ago, I have diff it against the latest config and found out that there are only a few lines more or less 10 that has been changed, so I think that is not crucial.
After copying the config, I need to go to /usr/src/linux-126.96.36.199 and execute the following commands.
make oldconfig make bzImage
It took more or less 45 minutes to complete while watching TV. The next step was to build the package via slackbuild. It is located at the source tree at source/k/kernel-huge-smp.
The slackbuild will get the resources from /usr/src/linux-188.8.131.52 and the resulting package is saved at /tmp. The next thing was to build the kernel modules. When I tried building it via slackbuild, it fails because it does not exists at /lib/modules. So what I did was install the module from the packages tree at slackware/a.
So the modules are now at /lib/modules/184.108.40.206-smp. I still need to build it against my current kernel so I go to source tree at source/k/kernel-modules-smp and run the command:
The result is saved at /tmp. Without hesitation, I installed them via installpkg. Then checked /boot if symlinks are correct. Then I check the /etc/rc.d/rc.modules if it is using the latest. It is not so:
cd /etc/rc.d rm rc.modules ln -s rc.modules-smp-220.127.116.11-smp rc.modules
Then run lilo and rebooted. It works! So for the next update, I will not fear the kernel anymore.
Get the slackware current here: http://www.slackware.at/data/slackware-current/