Lots of errors can occur if you do not update your kernel properly I will go through it step by step and talk about possible errors on the way Common errors are the system coming up with no output or just getting LI instead of LILO Step 1. First backup your kernel .config The kernel holds all its current settings in a file called .config backup this file first. Now if you have deleted all the .config files on your system there is a backup /boot/config. I usually backup my .config file to the /usr/src directory as this is convenient but you may want to put a master backup on your system. You can put the backup in /boot as a convenient place. #cd /usr/src/linux #cp .config /boot Now your working .config is backed up make a temporary backup #cp .config .. This puts .config in your /usr/src directory. Step 2. Backup your working kernel First use the makebootdisk program to back up the working kernel to a lilo boot disk. This makes recovery very easy as you can just boot your old kernel and system with just the disk. You don't even need to give it special parameters. #makebootdisk Next I use lilo to boot and you can boot more than one kernel with lilo so I make the current kernel a safe kernel to boot by moving it and adding it to the lilo boot file. I currently have kernel 2.4.16 pre 1, I can find this out by looking at a non logged in console like ALT-F5. So lets backup the kernel #cd / #cp vmlinuz /boot/safe-2.4.16-pre1 Notice I named it safe followed by it's version so I don't get lost. I also put it in the /boot directory as this is often a seperate partition that is below 1024 cylinders on the disk so the system can boot. Next we backup the current lilo.conf and then add our safe kernel to it. #cd /etc #cp lilo.conf lilo.conf.bak #$editor$ lilo.conf $editor$ isn't a program just swap that with your favorite editor most people use vi. make sure that the end of your lilo.conf looks something like this # Linux bootable partition config begins image = /vmlinuz root = /dev/hda2 label = linux read-only # Non-UMSDOS filesystems should be mounted read-only for checking image = /boot/safe-2.4.16-pre1 root = /dev/hda2 label = safe read-only # Non-UMSDOS filesystems should be mounted read-only for checking # Linux bootable partition config ends All I have done is copied the image, root, label, and read-only lines and edited the new image line to point to my safe kernel also the label line has been changed to read safe. The label is what lilo will display if you Now we must check that the edited lilo works. #lilo Added dos * Added linux Added safe # Note that dos,linux and safe are from lilo.conf you may have other entries and you may not have dos but you should have linux and safe. Those added lines show that it is working. If you get some errors try: #lilo -v -v -v Which makes lilo spew out tonnes of info. You should reboot and try out the safe kernel just to be sure it works. If you get something like LI or no Lilo at all then boot with the bootdisk you made. These problems can come up if Lilo is not installed to a primary partition or Lilo is not installed to the Master Boot Record MBR Lilo does not install properly Linux is not installed to a primary partition Linux or Lilo are installed on /dev/hdb hdc hde hdf etc You have installed another operating system over LILO This is an example of a disks partition to help. +--------------------+ | Master Boot Record | +--------------------+ +--------------------------------------------------------------------+ | boot sector | Extended 1 | | |----------------------------------------------------| | | | | | primary 1 | Logical 1 | Logical 2 | | | | | +--------------------------------------------------------------------+ It is best to install LILO to the MBR and add other operating systems into lilo.conf. Step 3. Prepare the directory I have about 6 kernels installed in /usr/src that I play with. I wish to get the latest stable kernel. Stable kernels are versioned this way x.y.z where y is an even number so 1.3.9 is unstable 2.4.5 is stable and 2.2.19 is stable. Before I download and install the kernel I need to prepare my /usr/src directory. This is because when you unpack a kernel it puts itself in /usr/src/linux which is where my current kernel is. So i have a link from linux to the kernel i.e. linux->/usr/src/linux-2.4.15. I will now delete that symlink. #cd /usr/src #rm linux Now I will download my new kernel source and put it /usr/src #lynx www.kernel.org #tar -yxvf linux-2.4.18.tar.bz2 From kernel.org choose a local mirror to download from. You can probably bookmark it to save you going back to kernel.org. this step also assumes your networking is working and mine isn't so I will copy from windows instead. The download takes some time so do something useful like measure the cats tail my cat has a 24cm tail. #cd /usr/src #cp /dos/Windows/Desktop/linux-2.4.18.tar.bz2 ./ Note that dos is where I have windows mounted it is probably different on your system. #tar -yxvf linux-2.4.18.tar.bz2 Now this extracts into the linux directory so move the kernel and make a symlink to the directory. This is so we don't stuff up next time we upgrade because if you unpack 2 kernels they will both go into linux and you will get nowhere. If you do this delete the linux directory and unpack again. #mv linux linux-2.4.18 #ln -s /usr/src/linux-2.4.18 linux Step 4 Setup the new kernel compile and install it Ok go into the linux directory and copy in your old .config then make oldconfig to load it in. Note make mrproper deletes .config and you will have to start from scratch or copy .config from your backups. #cd linux #cp ../.config ./ #make oldconfig When you run make oldconfig it may ask to select some new info just select no or n and enter if you don't want to compile it into your kernel. Because I have a 2.4.x kernel It tells me to make dep next so I will. #make dep Now you can either setup your new kernel or compile and install it. I will check the setup with make menuconfig #make menuconfig One thing you should always check is Console Drivers-->vga text console as not having this selected will make the screen blank when you reboot. You don't really need to change any kernel options as you have it setup with your old .config I can now compile the kernel I could use make install but I will go through each step. #make bzImage Wait a long time. #make modules #make modules_install #cp /usr/src/linux/arch/i386/boot/bzImage /vmlinuz #lilo Added dos * Added linux Added safe Now reboot and check that the kernel boots. If it doesn't use your safe kernel to boot or your bootdisk. Because I turned off vga_text_console my system didn't boot, well it did but I couldn't read anything so I hit CTRL-ALT-DELETE and rebooted with the safe kernel. If you are satisfied with the way your kernel boots you may after a few days or a week back it up as well. To floppy to /boot and save .config in /boot and /usr/src.