Hey All,

I've noticed that many newbies come to this site searching for answers on how to remove this little booter from their main boot sector. We have many treads with words like "help, lilo" and whatnot. While searching the tutorial files, I noticed that there isn't any mention of how to remove the lilo booter, just how to install linux and so forth. So I figured I'd write a quick tutorial on the many options for removing or reinstalling the default lilo.

How to remove LILO

First off, LILO is (LInux LOader), and while most believe it resides on the main boot record, it's actually only part of it. (as in not the complete LILO package)

To remove lilo from Windows/DOS, go to the prompt (Start>Run>Command *Enter*) and type:
C:\>fdisk /mbr
This will remove lilo and place back the old Dos booter (single OS)
(For WinXP machines, I believe there's a command called fixmbr? Just type that at the recovery console)

If you have other OSs in place (say Win98 & Win2k) use a bootloader like Bootmagic (part of the PartitionMagic bundle) from Powerquest


In Dr.DOS (If anyone is using it) use fdisk like normal (fdisk.exe) and choose the re-write maser boot record option.

To remove lilo from Linux (if you converted), go to the shell and type:
lilo -u

To restore the default lilo, type this:
lilo -u /dev/hda (keep in mind that your device path might be different, ie:hda1,hdb...)
This will replace the old lilo with the default one saved at /boot/boot.0300 (I think)(if it was hda1, it would be /boot.0301)

If you need to remove the MBR completely from Linux, enter this command
# dd if=/dev/zero of=/dev/HDX bs=512 count=1
(note: hardrive will be unaccessible until a bootdisk is entered and an OS is installed)

*Note: Bios's with AntiVirus enabled may not let you write to the MBR, so disable this before you try this.

**Note: Formatting the Harddisk will NOT remove the main boot record. So don't attempt this. (low-level will but writing 0 all over your hardrive will take a whole day)

Some treads concerning Lilo at AO:
http://www.antionline.com/showthread...hreadid=238877
http://www.antionline.com/showthread...hreadid=238418
http://www.antionline.com/showthread...hreadid=236546
http://www.antionline.com/showthread...hreadid=235131

Any changes or additions are welcomed