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 installer could not write this info to the MBR. What should I do?
Answer:
The MBR may be locked. You may need to go into 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 cleared up your MBR to be written to, here's what you do to install LILO:
First, boot with the boot disk. Then, at the boot prompt, type:
vmlinuz root=/dev/hda5
(or whatever your Linux root partition is).
This should boot you to the Linux installation. Then check your /etc/lilo.conf file to make sure it's okay. Here's an example:
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
image=/boot/vmlinux-2.2.12-20
label=linux
root=/dev/hda5 (or whatever your root directory is)
read-only
Then, when you're sure it's okay, run /sbin/lilo -v -v and then type
shutdown -r now to reboot your system. This should install LILO to your
MBR properly and allow you to boot without using a boot disk.
Question:
I have installed Linux to dual boot along side of Windows. My first drive, /dev/hda is Linux, and my second drive is my Windows drive. Windows worked fine until after I installed Linux. Now, when I select "dos" from the LILO prompt to boot to Windows, all I get is "Starting...." and then my machine locks, up. My entry for Windows in my lilo.conf file looks like this:
other=/dev/hdb1
label=dos
table=/dev/hdb
Why is this happening and how can I work around it?
Answer:
Windows is expecting to be the first disk in your computer, and does not know what to do when you try to boot is as the second drive. In order to work around this, you must modify your lilo.conf file so that the entry for Windows looks like this:
other=/dev/hdb1
label=dos
table=/dev/hdb
map-drive = 0x80
to = 0x81
map-drive = 0x81
to = 0x80
Once you have done this, you must re-run LILO so that your changes take
effect. To do this, type /sbin/lilo
What this does is fool DOS/Windows into believing that it is the first drive in your system.
Question:
When my machine boots, all it says is 'LI' and then it freezes. What is the problem?
Answer:
This means that LILO (the Linux bootloader) is having problems
bootstrapping itself to the system. There are a couple of things
that may be causing this. You may have installed LILO above the
1024th cylinder. The kernel needs to reside entirely below the
1023rd cylinder on the drive. If this is the case, you need to create a
/boot partition that resides in these limits and
reinstall LILO. You may also need to go into your system's BIOS
and make certain that LBA mode is enabled. If LBA was off, you will
need to repartition and reinstall.
Question:
When do I need to use loadlin?
Answer:
You will need an alternative to LILO if you can not install the Linux kernel to where the BIOS can reach it or you do not wish to use it. The BIOS may not be able to reach it for one of the following reasons:
You will probably need to use the Loadlin boot loader that is provided on the CD-ROM in \dosutils. You will need to copy this directory over to your DOS hard drive partition and edit the autoboot.bat file to point to its new position and removing the initrd= line. If your system is a SCSI system, you will need to go into rescue mode and copy the /mnt/boot/initrd.img from the hard drive over to the DOS partition, and use it for booting.
Question:
I installed LILO fine and can boot to either OS. How can I change the default OS that it boots to?
Answer:
To change the default OS that Linux boots into, you will need to edit the /etc/lilo.conf file and change the order of the OSes that LILO looks at. In the following example we change the order of booting so that DOS gets booted by default instead of Linux:
pico /etc/lilo.conf
here is the old version:
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
image=/boot/vmlinux-2.2.12-20
label=linux
root=/dev/hda2
read-only
other = /dev/hda1
label = dos
table = /dev/hda
You would then change it to the following:
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
other = /dev/hda1
label = dos
table = /dev/hda
image=/boot/vmlinux-2.2.12-20
label=linux
root=/dev/hda2
read-only
Save your changes to the file. At the shell prompt, run the command:
/sbin/lilo -v
and the updated LILO will be written to the boot device. On a reboot the machine will boot into DOS now instead of Linux.
Question:
How can I remove the LILO information from my master boot record (MBR)?
Answer:
There are several methods to removing LILO from the master boot record of the machine. Inside of Linux, you can replace the MBR with an earlier saved version of the MBR using the /sbin/lilo command:
/sbin/lilo -u
In DOS, NT, and Windows 95 you can use the fdisk command to create a new MBR with the "undocumented" flag /mbr. This will ONLY rewrite the MBR to boot the primary DOS partition:
fdisk /mbr