Linux Kernel and Config – Slackware Current

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 2.6.33.1 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:

  1. Upgraded to the latest slackware current except the kernel and its module
  2. It is using the old huge smp 2.6.33 kernel
  3. I don’t have the source tree (only the packages)
  4. 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:

  1. Download the source tree from slackware-current
  2. Install the kernel source at slackware/k directory
  3. Copy the old config to the kernel source
  4. Build the kernel
  5. Run slackbuild to build the kernel package
  6. Build the kernel modules
  7. 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 2.6.33.1 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-2.6.33.1/ 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-2.6.33.1 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.

./kernel-huge-smp.SlackBuild

The slackbuild will get the resources from /usr/src/linux-2.6.33.1 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.

installpkg kernel-modules-smp-2.6.33.1_smp-i686-1.txz

So the modules are now at /lib/modules/2.6.33.1-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:

./kernel-modules-smp.SlackBuild

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-2.6.33.1-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/

This entry was posted in Linux, Slackware and tagged , , , , . Bookmark the permalink.

Related Posts

One Response to Linux Kernel and Config – Slackware Current

  1. Pingback: Compiling Linux Kernel and Modules | Lysender

Leave a Reply

Your email address will not be published. Required fields are marked *