For the first time in history, I performed a remote kernel upgrade on the server that was previously cracked (goodbye local root exploit) and it actually worked when I rebooted the box in the middle of the night.
As a devoted Debian user, here's what I did...
Get New Kernel Source, Unpack It, Make Symlink
# apt-get install kernel-source-2.4.27 # cd /usr/src # bunzip -c kernel-source-2.4.27.tar.bz2 | tar -xvf - # rm linux # ln -s kernel-source-2.4.27 linux
Copy Old Kernel Config, Update It
# cd linux # cp ../kernel-source-2.4.23/.config . # make oldconfig (answer No to everything)
Compile Kernel, Build Debian Package, Install
This particular machine uses a non-initrd kernel, so I do this:
# make-kpkg clean # make-kpkg kernel_image
Otherwise I'd do this to get an initrd-based kernel package:
# make-kpkg clean # make-kpkg --initrd kernel-image
In either case, installation of the new kernel is trivial, thanks to Debian's kernel-package:
# cd .. # dpkg -i kernel-image-VERSION_i386.deb
That populates everything needed in the /boot directory and moves the necessary symlink to make the current kernel image the backup (old) kernel image. It then will offer to make a boot floppy and run lilo.
Cross Fingers, Reboot
After I double checked that everything looked right in the / and /boot directories and that /etc/lilo.conf was reasonable, I did asked for a reboot and crossed my fingers.
And left a command running in another window:
$ ping family2.zawodny.com
When it started returning pings again, I knew things were in decent shape. Twenty seconds later I was able to ssh in and verify that things were all happy:
jzawodn@family2:~$ uname -a Linux family2 2.4.27 #1 SMP Sat Feb 12 01:03:32 PST 2005 i686 GNU/Linux
Now I can start moving everything back off the 3.5 year old backup machine onto this much faster box.
Posted by jzawodn at February 12, 2005 12:32 PM