Episode: 33
Title: HPR0033: Linux Boot Process Part 2a - LILO
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0033/hpr0033.mp3
Transcribed: 2025-10-07 10:30:54

---

Good day. Welcome to Hacker Public Radio episode number 33 Valentine's Day 2008. Will you please be my Valentine? Pretty please.
My Valentine. Anyway, just kidding. My name is Dan Washco. I am bringing you Hacker Public Radio episode 33. This is part two of the Linux startup process and I'm going to be talking about bootloader today.
Lilo originally and you'll have to forgive me because at times I can be a procrastinator and this time prove to be true that I procrastinated a little too much and real life got in the way and while I wanted to record and set all this up this weekend I kind of ran out of time with other things going on and lo and behold here it is.
I have a bunch of notes but for only one bootloader which is Lilo so if you will forgive me this time for not being prepared enough as much as I wanted to I'm going to split this up into two parts and I promise you before my next scheduled Hacker Public Radio episode I will submit the second part of this to fill in for somebody who may have missed or not been able to get their show out.
And hopefully it will be put into play before my third part to the Linux boot process. So what I'm going to actually do is kind of cheat and call this part to a Lilo.
Now last time that we spoke together I provided a overview of the Linux boot process or the startup process and discussed a bit of the differences between system 5 and BSD style systems with regards to how they are configured and the boot process and their configuration files being one of the big differences between distributions.
The other one of course is a package manager but in a nutshell the boot process is a system goes through post post hands off to the bootloader the bootloader kicks the kernel of the image that you want to run your operating system that you want to run that recognizes all the hardware and begins the process called init which initializes the system startup services be it the BSD style or system 5.
The process is what run level you're on starts the application that you want and then passes it off the login that's very simple by top down overview and like I said I'm not necessarily going to go in any particular order but it tickled me to talk about Linux bootloaders next particularly Lilo.
I don't want to say I'm a big fan of Lilo other than the fact that Lilo was the distribution or the bootloader of the distribution that I first started with that bootloader being sorry the distribution that I first tried was red hat and then Susa and then of course suddenly on Slackware for a very long time.
Lilo was the bootloader of choice on most distributions back then and has in a sense fallen out of favor for grub which stands for the grand unified bootloader GNU grub of course and so distributions I still ship with Lilo includes Slackware Arch Linux and Slackware Arch Linux I'm not sure if any other distribution ship with Lilo by default.
Gen 2 has the option of installing Lilo but by and large the other distributions all have defaulted to grub.
Now Lilo stands for Linux loader and it's a fairly straightforward configuration and installation of Lilo.
Most of you will probably never mess around with Linux bootloader initialization or installation that gets taken care of during your installation of your distribution
of choice and you will come to the end of the installation and you might see it remarked you know.
Do you want to install a bootloader where do you want to install it and do you want to edit any images so and so add some stuff to ask you to look over the configuration and probably 95% of the time.
If you're new to Linux you probably don't know exactly what they're talking about and the standard installation of the bootloader should work just fine.
Typically you get asked where you want to install the bootloader it be it in the master boot record or in the root or boot partition of your distribution and by and large.
I have pretty much stuck with installing in the master boot record.
I have never had a problem installing my bootloader into the master boot record even though there are warnings all over the installation process of the bootloader that say
we'll be careful installing it in the master boot record you might enable your disable your system from being able to boot properly never ever my time using Linux and lilo have I ever had any kind of problem.
So as far as I'm concerned it's safe now of course there's probably two or three you out there that are going to hem and haul and say whoa whoa whoa whoa whoa wait a minute.
I remember when installing a lilo into the master boot record host my system and I was I had to throw away the hard disk.
I'd be very surprised if that happened and you know come to think about it is so easy to put a bootloader into master boot record inside or outside of your typical operating system using rescue disks or boot floppies or whatever.
Now being able to understand how to do that will come in handy which I'll explain later if you are a person who likes to boot multiple operating systems and you decide to install the latest version of windows who says that regardless of what your settings are I'm going to overwrite your master boot record
with my bootloader itself. Now lilo Linux loader even though it's a Linux based bootloader it has a capability of launching or booting various distributions of Linux of BSD, BOS, windows and pretty much any other operating system that you can throw on to a computer out there.
Now primarily I'm going to be talking about XADX 6 systems running off of a hard disk or you know BID or SCSI the concepts are pretty similar to flash and CD ROM or other types of boot media or other operating architectures I'll cover those at a later date but for now we're going to basically stick with the general generic old XADX hardware and hard disks and ID and SCSI devices.
So lilo can hold up to 16 images or could boot up to 16 images and like I said it can be placed in the master boot record or in the root partition. Now by and large if lilo is installed on your system you will be able to configure it using the Etsy lilo dot com file.
Okay so lilo dot com file any Etsy directory again upon installation of your distribution of choice you might have the opportunity to edit or manipulate this file so far I've had pretty good success rate not having to do anything but we'll cover some of the stuff that you'll find in the lilo conf section there are two two general general sections of the lilo dot com.
The first one is the global and the second one we'll call the image section now the global provides of course global settings that apply generally to lilo itself some of the boot information and then it passes off to the image section where you can specify your operating system variables in each individual image that you plan the boot.
So to start off with the lilo conf one of the main things you'll find in there off the bat is a boot equals parameter now the boot equals is what specifies your boot device.
For instance if you had a hard disk or an ID hard disk in there your boot device might be dev hard drive a or hda scusy device might be dev sda now you notice that I am not necessarily saying that it is a specific partition or anything to that matter I'm not providing any partitions I'm just talking about what the boot device is.
So the boot device or the boot parameter points to the boot device that has the master boot record on it if you omit this it defaults to being the boot device that holds the root partition of the system that you currently booted so you're looking at something like hard drive a or scusy drive a as your boot device now you might see some other options in there of course another one that is probably key is something called delay delay.
And it is a number in tenths of a second so for instance if it's delay equals 50 that means 50 tenths of a second or five seconds so when the boot process starts when lilo comes up it'll give you five second delay before the boots the default image that provides you the opportunity to stop the boot process choose a different image or pass parameters to the image that you want to boot.
Another one is read only now that tells the of I low to pass on to the operating system particularly Linux in this case that to mount the Linux file systems is read only at boot time and after the initialization of the kernel and the services it remounts before logging it remounts the file systems as read write or whatever specified in the Etsy F tab configuration file.
Another option in the lilo.conf is default equals and the default image the name of the default image which leads us right into the image section.
Now the image section is where you would list your different operating systems that you want to boot in the style that is typically the image equals which is the location of the kernel in case of Linux or BSD.
For example on my slackware or arch Linux systems I keep all my kernels in my slash boot directory so the image says equals slash boot slash VM li and use the VM Linus.
Now that is a compressed image now VM Linus is actually a simlink to the kernel full kernel name which is something like arch dash kernel 26-13-24 whatever diversion of the kernel is or however I named it.
The advantage of boot pointing it towards VM Linus and creating a simlink is if you ever update the system or update the kernel and all you have to do is just rerun lilo again not have to worry too much about editing that lilo.conf file because you've left the kernel name the same you just changed a simlink that points VM Linus that points to your kernel name.
In addition, particularly for Linux, you're going to provide a label for that image which is label equals and the name of your image and for instance I might call mine arch Linux label equals arch Linux so when the lilo menu or options come up at the boot time I can specify the image that I want to boot the operating system that I want to boot be of label or choose it in a list, a menu list of label up there.
So it makes it pretty simple you can name the label anything you want keep it standard numbers and character alphabetical characters no spaces in there dashes and I think underscores are permitted so you know label label is something meaningful particularly if you're booting multiple distributions and operating system something you're actually going to know what it is.
It does not have to match the kernel name your label does not have to match the kernel name it could be called anything you want it to be.
Now of course then the root equals is for the Linux partition or Linux operating system are going to be booting root equals and that's the path to your root partition in some cases it might be slash dv slash hda one for first partition on hard drive a or could be SDA.
Or SDB one for the first partition on your second scuzzy device or whatever it is.
And finally there could be an in it RD which is a path to the in it RD or in it RAM disk part to image that gets pulled in when booting the kernel recall last time that I talked a little bit about an in it RD file or image in conjunction with booting the kernel a lot of kernels these days are modular set of monolithic.
On thus they don't have all the required device drivers or modules built into them instead they're loaded dynamically as they are needed that case when you boot the kernel a lot of kernels because our modular probably don't have the devices compiled into kernel to initialize the hardware on your system thus the need for initialization RAM disk.
And that contains a handful of modules to cover the most basic hardware and file systems for instance ID drivers scuzzy drivers file systems like a EXT file system riser file system XFS file system so that you'll be able to recognize your mount your partition device your disk drives your disk interface your disk device.
And then be able to read the file system that contains the root partition so that as the process continues the kernel can then mount the root file system get access to the necessary modules and then unload the initializing RAM disk and use the modules that are part of your operating system on hand.
At a later date I'll probably talk about how to create the initializing RAM disk it's very simple and pretty handy thing to have as the opposite the other way you could do this you could for go the initializing RAM disk but in that case you either one have to have a very monolithic kernel that has everything compiled into it or two you have to compile your own kernel and knowing what hardware you have you need to make sure that you have compiled enough of the device modules into the kernel to get your system to the point.
Where it can access the root partition and access the modules on that root partition and be able to load in the rest of the modules that it needs if you don't have a single monolithic kernel with everything compiled into it.
So just be aware of that it's pretty easy to render a system unbutable if you compile your own kernel and don't have enough of the devices in there if you're doing a modular kernel install without an initializing RAM disk.
Anyway that being said let's continue on. Now the image section can be used to boot other operating systems. For instance if you want to boot windows you would specify other equals and the partition that windows is installed on.
Now of course windows wants to be installed on the first partition of the first hard drive so it'll be DEV, HDA1 if that's where it's installed and you can provide it label equals windows.
Now for further information on other tweaks and stuff for different operating systems just go see the lilo how to or man pages discuss that in further detail.
I'm not too concerned about booting windows because I never use it so I personally don't really care. Take that for whatever it's worth.
Okay anyway let's take a moment here before I start discussing some other things in the lilo.conf file other options that might hold your interest and one of the limitations discuss one of limitations about lilo.
lilo is not dynamic unlike grub which is a dynamic bootloader lilo requires that you initialize it before it can be utilized.
Thus for people who like to compile their own kernels or if you're running a distribution like slackware or arch Linux that's require a little more hands on of the operating system that when you install a new kernel in those operating systems you need to re-initialize lilo, the bootloader lilo if that's your bootloader of choice to be able to boot that new kernel.
Back when I first started using arch Linux one of the problems that one of the issues with arch because it's on bleeding edge there's constant updates to the kernel and a new kernel was pretty much installed every single time that I would do an update once a week maybe.
And in conjunction with that is they were switching from the initializing ram disk to initializing to using ramFS and all sorts of different ways.
They were changing the way devices were labeled what they were using for what was it the dev file system to debust and each time an update occurred with that you had to pay very close attention to what your how your lilo.conf file was configured to make sure that it was pointing to the right path.
They were pointing to the right device so that when it would install properly and that the kernel name was proper and the in it our DMH was proper if it was using the in it ramFS that that was proper.
So you had to be careful to to make those changes every time and if you didn't make those changes to lilo.conf and then run lilo you ended up with a system that would not boot because it couldn't find the old kernel that was no longer there.
Same thing with people who like to try out compiling their own kernels you need to be very careful when you compile your own kernel that you keep a backup or you make that new kernel a test kernel and retain your original kernel to ensure that you can get back into your your distribution should that new kernel fail or you forget to run lilo on that new kernel.
To that end make sure you keep an old kernel laying around in case something happens with a newer kernel so that you can boot into that older kernel and at least have if not a 100% fully functional system enough to get you up to repairing what may have been damaged with the new kernel.
It's just common practice is almost like having a backup is always good to have a backup kernel and since lilo can hold up to 16 images and 17 different kernels are operating systems.
It's really not it's a no brainer because I don't know anybody who's ever too many people who who boot 16 are more operating systems and they're kind of the exception than the case so to speak so you know make sure you retain a backup is very simple.
That's where the default option in the lilo.conf can come in handy you can keep a pending or you can append a new kernel that you want to try to the top of your kernel list and
relieve the default at your old kernel and if you don't do anything or if something calls your attention way and it reboots is going to default to the old kernel where you can manually choose what kernel you want during the boot process.
If you don't specify that default option it chooses the first image so just be aware of that if you don't have a default equals and then label the default is going to choose the first image it finds so just be aware of that.
In conjunction with that say you do screw something up you install a new kernel you don't run lilo to initialize something or something happens during the process it doesn't get run and you find yourself with an unbutable system well the beauty of linux is very very easy to fix with a system restore disk I rescue disk a live CD or whatever anything that gets you to a linux system that will boot a kernel.
And then when you get to the point of your bootloader grub or lilo on the rescue CD or whatever you pass the parameter to it root equals and the path to your root partition be a dv slash hda123 whatever and it will boot the kernel off the rescue CD the rescue the live CD the rescue disk and it will mount your existing root partition on this the image.
That has been rendered useless because lilo isn't working and allow you to go in and fix the problem with very easily so that you could just run lilo again and initialize it and you'll be good to go or change your lilo dot com that you didn't edit in the first place and be back to running a system that fast and that's a good tip for if you are installing multiple operating systems you reinstall windows and windows wipes out your master boot record and you have no way to boot your your linux operating systems anymore.
Just boot with a rescue CD a live CD or a rescue disk or whatever and run that amount your root partition pass the root partition parameter through the bootloader and rerun lilo and you'll be good to go or initialize grub again and reinstall grub into the master record you'll be good to go anyway I don't want to get too much into grub because we're going to cover that in the next topic is grub is fantastic you're going to love it as much as I do.
But anyway let's finish up with lilo some of the other stuff in the lilo dot com file that you can pass is a VGA mode and again this is primarily for linux. VGA equals and a mode now there's ask which will ask you at boot which you want to do or go to a standard mode of 640 by 480 I think it is 80 columns by 80 columns wide by 25 columns high.
That's also considered normal and extended is 80 columns wide by 50 columns high I believe it is smaller text number is a text mode and that is provides you with a color depth and a resolution be a 640 by 480 100 by 600 1024 by 768 or 1280 by 1024.
There's a little chart which you can go to the notes in my on my thing odds it's in a gen 2 documentation have a link to it the VGA modes it's by passing a number something like number 790 if you pass that is a color depth of 32000 or 15 bit color depth at 1024 by 768 which will give you a virtual terminal like that.
Okay another option that you can pass is install equals and that defines the type of interface that you're going to see when lilo comes up when you after post there's a text only interface which pretty much doesn't show you anything except the prompt now if you just hit enter it's going to boot your default image if you hit tab twice or tab at the text interface it'll pop up a little list of what images are available the boot and then you can type in the image that you want.
There's a menu interface which is a lot of distributions had defaulted to for a while when you boot it up you get this like red and whites menu type screen it looks kind of nice and at least the the images that you have on the labels of your images it has a little asterisks next to the default one and usually highlighted on the default one you can just use a mouse key not a mouse key the up and down arrows to move between with label you want to boot or it'll put your default after the time out.
There's a BMP which uses an image I've never really used that and or you can specify a file to use for the interface by a path to the file which is what the old version of install used to equal anyway by large text and menus seem to be the easiest things to configure and that's probably all you'll ever need now on a side note there.
You can pass a bunch of different parameters to the boot image through lilo or grub or whatever you're using at the point there when you're at the option to boot the image in any of the install types text menu or or graphical image you usually get an option before you load it to you select the image you want and then you can pass
parameters on there like no dash ACPI or ACPI equals no different parameters that you'll pass to the kernel at boot time used to be that you would have to pass the IO and IRQ addresses to Ethernet cards or the Ethernet card module during the boot process if you had we're setting up a router and have more than one Ethernet card
of the same type in there that's an example you can go to the linux boot prompt how to and it'll has in depth discussion of what options that you can pass to the kernel upon the boot loader boot time okay fine let's go to prompt prompt is another one if you specify prompt in there it will not auto boots unless there is a delay which a delay will will wait for a specific time out and it will kick into the
default image but if there's no delay or no time out specified a prompt will not auto boot the kernel after a specific time or automatically auto boot the kernel it will just wait until you specify which image that you want to boot
that pretty much covers a lot of lilo right there again I want to stress that one of the disadvantages of lilo is that it's not dynamic so if you make an update to the kernel
and you do not run lilo you're going to end up with an unbeatable system if you've wiped out the old kernel may changes that way given that there's not much else to say there are different boot parameters or initialization parameters that you can pass the lilo when you run it lilo is going to be found in the S-bin directory so S-bin lilo so it's to initialize lilo it's just as simple as typing lilo is root you can pass the option to switch dash B
which specifies the boot device that's handy if you are booted in from a live CD and you make some changes you can mount your devices or specify lilo.com file and specify a different device other than the one that you currently mounted as root or might be specified in your lilo.com directory
you can specify a path to a separate lilo.com that's not in the Etsy directory with the capital dash C or dash capital C
for more information again see the man lilo for what you can pass on the boot on the initialization line last thing I want to cover with lilo is when you are booting off a lilo
the lilo will provide a little bit of a status as to how far it's proceeding generally it'll kick off the initialization of lilo and you'll see it say lilo on there and continue loading your kernel image.
now should there be a problem with lilo it'll stop at whatever letter that it had a problem that which signifies a stage if you don't have any lilo letters there's no L on the page
okay it means that it's not installed or the petition which the boot sector is located is an active or you cannot probably not devote booted from the current device or there's a faulty problem there's a problem with the device that you're booting from
if you get an L and nothing else that means the first stage the boot loader is loaded but it can't load the second stage it might specify an error code for you
this usually indicates the problem with the media bad disc parameters in the bios if it does li that's the first stage was loaded second stage was able to be loaded but it failed to execute it could be bad disc parameters in the bios
then you might have lil which is the second stage has been started but it can't load the descriptor table from the map file this is again this is caused by a media failure or bad disc parameters in the bios
there could be an lil with a question mark which means that the second stage loader has loaded at an incorrect address which is caused typically by bad disc parameters in the bios and lil dash which is the descriptor table is corrupt again caused by bad disc parameters in the bios
and lil you see that means everything's loaded properly so it's a handy little way to get a better idea of where things are screwed up if it doesn't able to boot your kernel
if it can't boot the kernel it will tell you that no kernel image was found
lilo is a handy tool to know and use but like it said it's been phased out by a lot of distributions in favor of grub which we will talk about next time
i thank you for listening to agropublic radio please provide feedback to not just my episodes but anybody else's episode check out the website keep up the date on what's going on
and thank you very much again for listening and have a happy valentine's day and be listening on the lookout for part to be grub coming soon to agropublic radio episode have happy
thank you for listening to agropublic radio, hpr is sponsored by caro.net so head on over to caro.nct for all of us need
you
you
