Getting the Kernel Source

Just install the source package like any other. You want one of the "kernel-source" packages. Do a little reading and determine what version you want. I got one of the 2.4 kernels. While you are at it, you want to get a few other packages that do all the work for you. Here's the list:

I use dselect as my package manager. It's so easy to manage the text file /etc/apt-sources.list and run dselect, I've never bothered to install aptitude. What could be easier than:

  1. Get a root prompt
  2. type dselect
  3. chose update
  4. chose select
  5. hit "/" to find the package you are interested in by searching for a name or the thing you want done.
  6. Press + go select packages for install. This might call up a dependency resolution screen which shows packages that the one you just selected depends on and other packages which might be useful.
  7. When you are finished selecting your packages, press enter and then install.
  8. The scripts should walk you through the install process.

Got those packages? Cool. Dselect can be a little hairy the first time you use it, so don't try to do it in a hurry. Take your time, read the instruction pages and look at the screen to figure things out.

Now we need to put the source where we can play with it without system damage. We will make a directory that belongs to a normal user and unpack the source there. You are still root now.

  1. type, "ls -lh /usr/src", and see your nice new kernel source.
  2. type, "mkdir /usr/local/src/my_kernels"
  3. type, "chown my_user /usr/local/src/my_kernels" I was lazy and just made the whole /usr/local/src dircetory mine.

Now get out of that scary root user and get into your kernel directory and unpack your source:

  1. type, "exit"
  2. type, "cd /usr/local/src/my_kernels"
  3. type, "tar xjf /usr/src/kernel-source-2.use_tab_complete_to_get_your_numbers"

That's it, you should have a nice new directory that your normal user owns with the kernel source you want in it.

Next, compile