Configuring and Building a secure, optimized Kernels
Making an emergency boot floppy
The first pre-install step is to make an emergency boot floppy. Linux has a small utility named “mkbootdisk” to simply do this. The first step is to find out what kernel version, you are currently using. Check out your “/etc/lilo.conf file and see which image was booted from and from this image we can find the kernel version we need to make our emergency boot floppy. In my example, I have the following in the “lilo.conf” file.
[root@deep /]# cat /etc/lilo.conf
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
image=/boot/vmlinuz-2.2.12-20 <- the kernel version
label=linux <- the image we booted from
root=/dev/sda6
initrd=/boot/initrd-2.2.12-20.img
read-only
Now you’ll need to find the image that you booted from. On a standard new first install, it will be the one-labeled linux. In the above example we show that the machine booted using the 7boot/vmlinuz-2.2.12-20″ original kernel version of the system. Now we simply need to put a formatted 1.44 floppy in our system and execute the following command as root:
[root@deep f\# mkbootdisk -device /dev/fdO 2.2.12-20
Insert a disk in /dev/fdO. Any information on the disk will be lost. Press <Enter> to continue or AC to abort:
Following these guidelines, you will now have a boot floppy with a known working kernel in case of problems with the upgrade. I recommend rebooting the system with the floppy to make sure that the floppy works correctly.
Uninstallation & Optimization