old-fashioned kernel upgrading

I keep the kernel on my Linux box fairly up to date. With more or less every point release, after my distro, Gentoo, has released a fairly ‘mature’ patched version, I upgrade. However, I’m thinking that I’m using some pretty old fashioned technqiues in doing so. For example I manually configure the kernel, my boot loader is LILO, and I do not use any of the distro’s helpers.

My usual procedure is:

copy the old config direct from /PROC and using the ‘oldconfig’ option update the config with all new options for the new kernel. Since I rarely leave this more than 1 version difference there’s generally only 20 or so differences:

cp /proc/config.gz
gunzip config.gz
cp config /usr/src/NEWKERNEL/.config
cd /usr/src/NEWKERNEL
make oldconfig

Once that’s done I compile the kernel using the bzImage image, and compile the modules and install them at the same time.

make bzImage && make modules && make modules_install

Incidentally that double ampersand is a cool shortcut. If the previous command ends with an error it does not run.

Once compiled, I change the /usr/src/linux link to the new kernel, copy it to the boot folder, add the new kernel to the lilo.conf file, run lilo, n reboot with prayer to whatever humanist non-deity you don’t believe in!

rm /usr/src/linux
ln -s /usr/src/NEWKERNEL linux
vi /etc/lilo.conf
lilo
reboot

Incidentally if you use a distro that stores the Linux headers, or rather iuses the kernel ones, in /usr/src/linux, then be careful changing this link. Luckily the distro I use stores these in another place, so you can upgrade kernels willy nilly, without affecting what glibc is compiled with.

This entry was posted in trivial shennanigans and tagged . Bookmark the permalink.

3 Responses to old-fashioned kernel upgrading

  1. pandammonium says:

    I have no idea what any of that means 🙂
    I occasionally do sudo apt-get upgrade or sudo apt-get update. Is that the same thing?

  2. ferg says:

    apt-get upgrade could upgrade the kernel, but that’s Debian specific. I just like compiling kernels by hand. Saddoe!

  3. pandammonium says:

    I’m not disagreeing! 😉

Comments are closed.