November 22nd, 2002, 09:37 PM
How to Config Lilo
I noticed that there wasn't a tutorial for Lilo. Most tutorials mention about Grub or Bootmagic, but not Lilo. Also, I know the newer installements of Linux has a program where you can config the lilo (Like Bootmagic Manager) but figured I'd write a tutorial "old school" way
--*=Lilo (LInux LOader) Editing=*--------------------------
Lilo is what most Linux flavours have as a boot manager in your main boot sector. This is what you tell if you have Linux and Windows on one computer and which one is default. This tool is useful to have to tell your computer how many OS's you have in your box, as well as what can and cannot be accessed. However, Lilo is starting to get a little old and weak, as well as useless due to today's newer harddrives, but Lilo is still the default loader. Here are some of the commands for Lilo and how to take full control of the loader.
There are three ways to edit Lilo: /etc/lilo.conf, lilo command and boot prompt. The best way however is to edit lilo.conf in the /etc directory with a text editor. This file is very
simple to understand, even for newbies! Before you edit lilo.conf, you'd be best to make a floppy back-up as well as a Linux boot floppy. Most parameters are equations, meaning the is a setting with an = sign waiting for a command or path.
There are three groups in Lilo (called stanzas): Global, Kernel and Non-Linux. Global
holds parameters that are general to booting, like timeout. Kernel is strickly dedicated to the
Linux partition. Non-Linux is where you tell Lilo that Windows or Dos is on the computer as well.
Here's a breakdown of Lilo:
boot -lilo's location (ie: /etc/lilo.conf)
map= -path to lilo's map (ie: /boot/map)
default= -defines which OS is default
timeout= -how much time lilo waits before loading default OS. (50 = 5 seconds, 0/1)
image= -path to the kernel (linux partition location) (ie: /vmlinuz or /boot/vmlinuz)
label= -name of the OS - up to 12 characters but no spaces (ie: Linux)
other= -path to the other OS (windows or other partition location) (ie: /dev/hda1)
label= -name of OS - up to 12 characters, no spaces (ie: Windows98, WindowsNT4)
table= -hard drive that the other OS is on (ie: /dev/hda)
--Lilo Extra Commands--
Want to add a message when lilo boots? It will be above the lilo menu or lilo prompt. Just write whatever you want in a text editor and save the file. Then put a "message=" string with the location of the file and the end of the = sign in the global stanza.
Hope that helps someone!
November 23rd, 2002, 02:08 AM
Thank you for this...
I could have used it about 2 months ago...but I have saved it to text and will refer to it just as soon as I load Linux again (I always have a way of screwing up the bootloader)
November 23rd, 2002, 07:52 AM
Uhm, sorry for taking so long (I guess ) Well at least now you have something to work with?
A few people asked me my preference/suggestion on what loader to use, here's my response. If there are any errors, please, by all means, correct me!
Choosing a bootmanager more or less depends on what your default OS is as well as your preference on GUI.
If you will have Windows as default, go with something like Partition Magics Bootmanager/Magic.
If your default is Linux, it depends between your preference.
Lilo is basic text with more options
Grub is GUI based (has a background) and is limited in it's functions (when you go advanced in Grub, I'm not sure if you remain in Grub or drop to Lilo?)
Hope that helps a bit, any other questions, shoot em' my way
November 23rd, 2002, 11:59 AM
Lilo on Mandrake comes preconfigured with a horrible background image. Do you know how to change/remove it?
November 23rd, 2002, 02:02 PM
Proactive, try here
Tyger_Claw, good post but if I may suggest a few more options:
Just for those that might not be aware, prompt is used to prompt us for whichever operating system we want to use. Obviously if this box is a linux web server box you'll only have one OS so it might be better to skip that option and just have the system boot up.
Within lilo we can add two security options:
password -- this will add a password to the image in question. And is used by putting the line
I am going to assume that you have externally locked lilo by chmod'ng it to 600
restricted -- prevents shell commands from being passed to it blindly. This will require root's password e.g. linux init=/bin/bash
Last security fix for boot up is for inittab. Placing the line su:s:wait:/sbin/sulogin in the inittab forces a password requirement on single-user mode.
Now, for some differences. For those wanting to configure GRUB I found some info from Red Hat that might help. Alternatively, GNU's Grub site might be a good place to check out. I think that Grub's security is a little better than lilo's..
November 23rd, 2002, 02:19 PM
MsMittens, do you know what file format is used on the page you pointed me to? It's called .msg and can't be opened in the Gimp.
November 23rd, 2002, 04:07 PM
Hrmmm. I didn't even check the images as I thought they were in tiff or gif format. I have to admit to never seeing a .msg extension except for mail programs like Outlook. Maybe this one will be of better use.
November 23rd, 2002, 05:29 PM
Thanks for the info MsMittens!
As for the .msg extention, the reason is that Lilo 2.2.x places it's images in the /message directory, and uses that extention as if though it was a message file. (I guess a new type of compression?)
November 23rd, 2002, 08:24 PM
I think it was .pcx... at least that worked for me all the time, but watch out with the palatte... the thing uses colours based on your pictures palatte for it's tekst ( don't remember what numbers) so you'r teskt may appear another colour...
December 14th, 2003, 03:55 PM
can u show a example how to set the windows OS as a default os to load each time