Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > AS/ES/WS Basics > Issue <<  65 of 908 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 631
Last update: 05-11-06
Issue:
How do I modify LILO (lilo.conf) to use a new kernel?
Resolution:
In order for your system to boot to a new kernel, your boot loader needs to have an entry with the new kernel. If your using LILO, the configuration file is /etc/lilo.conf. He is an example lilo.conf file:

 
prompt
timeout=50
default=linuxASe25
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
lba32

image=/boot/vmlinuz-2.4.9-e.25
        label=linuxASe25
        initrd=/boot/initrd-2.4.9-e.25.img
        read-only
        root=/dev/hda2
   


We are going to add an entry for the 2.4.9-e.27 kernel. In order to do this, we need to make several changes. First you need to add the approriate stanzas defining the image, label, initrd, root and any additional options. The easiest way to do this is to copy the lines from image= to root= and modify the vmlinuz filename, initrd filename, and the label.

 
prompt
timeout=50
default=linuxASe25
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
lba32

image=/boot/vmlinuz-2.4.9-e.25
        label=linuxASe25
        initrd=/boot/initrd-2.4.9-e.25.img
        read-only
        root=/dev/hda2

image=/boot/vmlinuz-2.4.9-e.27
        label=linuxASe27
        initrd=/boot/initrd-2.4.9-e.27.img
        read-only
        root=/dev/hda2
   


Now that you have the lilo.conf file with the updated kernel information, you probably want to change the default boot kernel to your newly installed kernel. You can do this by modifying the default= line. In this example we change default=linuxASe25 to default=linuxASe27. Our new lilo.conf file now looks like this:

 
prompt
timeout=50
default=linuxASe27
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
lba32

image=/boot/vmlinuz-2.4.9-e.25
        label=linuxASe25
        initrd=/boot/initrd-2.4.9-e.25.img
        read-only
        root=/dev/hda2
image=/boot/vmlinuz-2.4.9-e.27
        label=linuxASe27
        initrd=/boot/initrd-2.4.9-e.27.img
        read-only
        root=/dev/hda2
   


Save the changes to lilo.conf. The last step is to run lilo to install the changes to the boot loader. A good idea is to use the -t option first to test, then run lilo -v to complete this task.


# lilo -t
Added linuxASe25
Added linuxASe27 *
The boot sector and the map file have *NOT* been altered.
# lilo -v
LILO version 21.4-4, Copyright (C) 1992-1998 Werner Almesberger
'lba32' extensions Copyright (C) 1999,2000 John Coffman

Reading boot sector from /dev/hda
Merging with /boot/boot.b
Mapping message file /boot/message
Boot image: /boot/vmlinuz-2.4.9-e.25
Mapping RAM disk /boot/initrd-2.4.9-e.25.img
Added linuxASe25
Backup copy of boot sector in /boot/boot.0300
Writing boot sector.

   


The * denotes that the linuxASe27 kernel is the default kernel. When you reboot your system, it will choose this kernel by default.


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > AS/ES/WS Basics > Issue <<   65  of  908  >>