LILO is a versatile boot loader for Linux. It does not depend on a specific file system, can boot Linux kernel images from floppy disks and hard disks, and can even boot other operating systems. One of up to sixteen differernt images can be selected at boot time. Various parameters, such as the root device, can be set indepenantly for each kernel. LILO can even be used as the master boot record.This slide will talk about using LILO as the master boot record.
The master boot record is the first sector of your hard disk. This is where your computer's BIOS will look for instuctions on how to load an operating system. If you just had Win95 or DOS installed it would just be an instruction to load that one OS. As stated above, LILO gives us the versitility to load more then one OS.
You can configure LILO by manually editing the lilo.conf file. We'll take a look at my lilo.conf and see what each line does.
# LILO configuration file # for copper.isdn.uiuc.eduThese are just comments for anyone who would look at the file. All lines that start with # are ignored by your lilo.conf.
# Start LILO global section boot = /dev/hda # The boot device. In this case, the first harddrive delay = 50 # Delay in tenths of seconds between LILO prompt # and loading of default image. vga = normal # Force sane state of video. (80x25) ramdisk = 0 # Paranoia setting (We don't need one so we'll make sure # one isn't created. Only if using distrib boot disks.) read-only # All Linux filesystems should be read-only for the fsck # at boot time. root = /dev/hdc1 # Everytime I boot Linux it will be on the same root # filesystem. # End LILO global sectionThese are global settings that will go over all of the various kernel images. You can override settings by putting a replacement line in the individual kernel parameters.
# Linux default bootable partition config begins image = /vmlinuz.2.0.24 label = linux # Linux bootable partition config ends # Linux old kernel partition config begins image = /vmlinuz.2.0.23 label = old # Linux old kernel bootable partition config endsHere's where the real important things happen. These are two different kernel images. When I recompile a kernel I usually make my new one the default and keep the old one around and bootable just in case. (There was a time when Linux was famous for being unstable.)
For each one image is the list of the kernel image that you are to load and label is what it will be called. Label is important so you can load other kernels/OS's from the LILO: prompt.
# Win95 bootable partition config begins other = /dev/hda1 label = win95 table = /dev/hda # Win95 bootable partition config endsThis is what I use to boot, when needed (for games mostly), to Win95. This will work for DOS as well, since they use approxamtely the same boot loader. In this case table = tells LILO where to look for the partition table information. This is important if the other OS to be loaded needs to have information about which partition it was booted off of. (DOS does not need this information, but I usually present it as a matter of form.)
It is important to note that the first image = or other = that is in the lilo.conf will be the default OS/kernel image to be loaded. In the case of this lilo.conf linux is the default image to be used, and therefor Linux is the default OS. If you wanted DOS or Win95 to be the default OS
To get Linux to be happy with stuff such as WinNT come by a LUG meeting or mail email@example.com to get in touch with the Linux Buddies.
root ttyp2 ~ :lilo Added linux * Added old Added win95 root ttyp2 ~ :The * next to the first item (linux) signifies the image that will be booted at boot time.
If there is an error in your lilo.conf it will show up here. And you can go in and re-edit your lilo.conf, to fix the problems. Luckily Linux takes mere moments to boot, so even if you do something to your lilo.conf that you don't like, you can fix it in a matter of minutes instead of hours.
C:\STUFF>fdisk /mbrUnfortunately, fdisk doesn't give you any output to tell you it did it correctly. Just reboot and you'll go straight into DOS/Win95, with lilo all removed.