January 23rd, 2003, 04:01 PM
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:
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:
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:
Any changes or additions are welcomed