Error When Installing LILO to the Master Boot Record (MBR)

Question:

The installation went fine, but when I tried to write the LILO information to the MBR, I got a vague error that said the installation program could not write this info to the MBR. What should I do?

Answer:

The MBR may be locked. You need to access your system's BIOS and verify that the MBR is not write-protected. Also, double-check that you do not have a virus scan enabled in the BIOS that may interfere with writing to the MBR. Depending on the system, you may already have another boot loader in the MBR that conflicts with LILO.

Once you have enabled the ability to write to your MBR, follow these steps to install LILO there:

Boot your system into Linux. (If your system cannot boot into Linux from the hard drive, boot using your boot floppy. Then, at the boot prompt, type vmlinuz root=/dev/hda5 at the LILO: prompt or the location of your Linux root partition.)

Once your system is finished booting, login as root and check your /etc/lilo.conf file to make sure everything is correct. Here is an example lilo.conf file:

boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
message=/boot/message
linear
default=linux

image=/boot/vmlinuz-2.2.17-14
 label=linux
 initrd=/boot/initrd-2.2.17-14.img
 read-only
 root=/dev/hda5

image=/boot/vmlinuz-2.2.16-22enterprise
 label=linux-2.2.16-22
 initrd=/boot/initrd-2.2.16-22.img
 read-only
 root=/dev/hda5

Type man lilo.conf for more information about configuring /etc/lilo.conf.
Once you are sure that /etc/lilo.conf is properly configured, run /sbin/lilo -v -v. If you receive any errors, stop and verify that your lilo.conf file is correctly configured. If the lilo command works correctly, type shutdown -r now to reboot your system.

These steps should install LILO to your MBR properly and allow you to boot without using a boot disk.

Quick Links:
Have a Linux Issue?
Do you have a Linux Question?

Linux Home: Linux System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.  The site www.gotothings.com is in no way affiliated with SAP AG.
Any unauthorised copying or mirroring is prohibited.