Jump to content
Compatible Support Forums
Sign in to follow this  
shadowmatrix

Lilo

Recommended Posts

I need to edit my Lilo entries and remove one of them. Could some one give a quick how to on this please? Appreciate it.

Share this post


Link to post

Sure. The first thing that you do is back-up your current /etc/lilo file to a safe place.

 

Open into a file manager in superuser mode, navigate to /etc/lilo and double click to open it. You may elect to use any editor that you choose, as well. Kate or gedit work fine.

 

 

Edit the file as you wish. I always just place a hash mark at the beginning of any line that I want lilo to ignore, assuming you know what entries that you want to ignore, or delete.

 

Save the file.

 

Run, as superuser console (root console);

 

/sbin/lilo

 

If the console processes your entires without any error, you are set. If there is a problem, it will show you the line that has an error.

 

NOTE: if you have more than one distro on the system, you must edit the lilo from within the distro that you installed lilo from. For example, if you have both Mandake and Debian on your system, and you installed Mandrake last, telling Mandrake to use lilo at the MBR (usually /dev/hda1), you must edit in Mandrake, as this is the active lilo entry to the mbr. Otherwise, the lilo from whatever distro you are in will over-write with it's own lilo. You may or may not want this.

 

When editing Lilo, you need to remove all the releventlines for the distro that you want to remove, generally 4 or 5 lines of text, belonging to the distro you want to remove.

 

For example, you want to remove the Debian entry;

 

boot=/dev/hda

map=/boot/map

vga=normal

default="windows"

keytable=/boot/us.klt

prompt

nowarn

timeout=100

message=/boot/message

menu-scheme=wb:bw:wb:bw

image=/boot/vmlinuz

label="linux"

root=/dev/hda5

initrd=/boot/initrd.img

append="quiet devfs=mount acpi=off"

read-only

image=/boot/vmlinuz

label="Debian"

root=/dev/hda6

initrd=/boot/initrd.img

append="failsafe devfs=nomount acpi=off"

read-only

 

 

The bold entries would need to be removed. The Label= part of the indented entry tells you which distro that these lines belong to. Of course, the label entry depends on what lilo assigned to it, unless you custom added it yourself.

 

You MUST run /sbin/lilo, or in some systems, just lilo in the console, after the edit and save, or you may render the distro/system unbootable.

 

In other words, be sure of the items that you want to delete, make sure you get no errors after running /sbin/lilo.

 

If you really screw up, just replace the edited lilo with the backup file and run lilo again.

 

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×