LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to edit Lilo.conf? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-edit-lilo-conf-201954/)

jmr0311 07-06-2004 07:52 PM

How to edit Lilo.conf?
 
:confused: I want to add some lines to Lilo.conf file in my Mandrake linux 10.0. Apparentlly Lilo in my system is lacking some lines that are preventing him from prompting the booting screen that shows the OS systems that are booting in my computer. I have windows XP and Mandrake linux 10. I need specifics on how to change permissions to access this file, also the commands I need to execute to perform this task, also where should I perform this task within my linux system, etc. Sorry for being so annoyance, I'm a complete newbie with just hours of experience in Linux. This is how Lilo.conf looks like in my system:

/etc/lilo.conf file :

boot=/dev/hda
map=/boot/map
VGA=NORMAL # Add line to set the resolution for the booting screen
default="linux-i686-up-4GB"
keytable=/boot/us.klt
PROMPT # Add line to ask Lilo to prompt the booting screen
nowarn
TIMEOUT=100 # Add line to force a delay before Lilo loads the default system ( Linux )
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
label="linux"
root=/dev/hda5
initrd=/boot/initrd.img
append="devfs=mount acpi=ht splash=silent"
vga=788
read-only
image=/boot/vmlinuz
label="linux-nonfb"
root=/dev/hda5
initrd=/boot/initrd.img
append="devfs=mount acpi=ht"
read-only
image=/boot/vmlinuz-i686-up-4GB
label="linux-i686-up-4GB"
root=/dev/hda5
initrd=/boot/initrd-i686-up-4GB.img
append="devfs=mount acpi=ht splash=silent"
read-only
image=/boot/vmlinuz-2.6.3-7mdk
label="263-7"
root=/dev/hda5
initrd=/boot/initrd-2.6.3-7mdk.img
append="devfs=mount acpi=ht splash=silent"
read-only
image=/boot/vmlinuz
label="failsafe"
root=/dev/hda5
initrd=/boot/initrd.img
append="failsafe acpi=ht devfs=nomount"
read-only
other=/dev/hda1
label="windows"
table=/dev/hda
other=/dev/hdb1
label="windows2"
table=/dev/hdb
map-drive=0x80
to=0x81
map-drive=0x81
to=0x80
other=/dev/fd0
label="floppy"
unsafe

Any suggestions are very welcome, Thank's

Javi

Tinkster 07-06-2004 08:20 PM

I'm not sure how gracefully lilo will handle
comments behind instructions ...

Try
Code:

# Add line to ask Lilo to prompt the booting screen
PROMPT

instead of
Code:

PROMPT # Add line to ask Lilo to prompt the booting screen
That should do the trick.

You don't want to change the permissions on lilo.conf,
instead become root to do the editing. As for the choice
of editor, that's all up to your personal preferences.

Once done editing, still as root, just type
lilo<enter>




Cheers,
Tink

jrdioko 07-06-2004 08:55 PM

As for what commands to execute, go to a command prompt, type "su" to become root, then use a text editor to edit that file (e.g. "pico /etc/lilo.conf").

jmr0311 07-06-2004 09:02 PM

Sorry that I mis-lead you in my posting. I put those comments just to let everybody know what my intentions where when adding the instruction to the lilo.conf file. I'm executing the kconsole and this is what it shows on the screen, USER@dektop-home$ , then I type "su" to become a "super user = administrator", then the directory change to Root@desktop-home# is this the correct way to became a root. What is the next step, execute the editor?, How can I do it?

Javi

vectordrake 07-06-2004 09:11 PM

You're on track so far. The easiest editor that Mandrake usually has installed by default is nano, so you'd type on the #
Code:

nano -w /etc/lilo.conf
The "w" switch (read man lilo for more detail) makes it so wide lines can be edited as well. Make your change. Hit ctrl+x, say "y" for save. Type "lilo" without quotes, As Tink suggested, to make it all good.

jmr0311 07-06-2004 09:27 PM

I'm also curious to know why my lilo.conf is so long compare to other samples I saw in this forum. I know every system is different, but my system is not out of the ordinary (2 Hard drives, 1 DVD rom, 1 CDR/W, 1 floppy disk).

/etc/lilo.conf file :

++++++++++++++++++++++
boot=/dev/hda
map=/boot/map
VGA=NORMAL
default="linux-i686-up-4GB"
keytable=/boot/us.klt {This block seems to be in the majority of the lilo.conf file I saw in this forum}
PROMPT
nowarn
TIMEOUT=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
+++++++++++++++++++++++

#####################
image=/boot/vmlinuz
label="linux"
root=/dev/hda5
initrd=/boot/initrd.img
append="devfs=mount acpi=ht splash=silent"
vga=788
read-only
######################

========================
image=/boot/vmlinuz
label="linux-nonfb"
root=/dev/hda5
initrd=/boot/initrd.img
append="devfs=mount acpi=ht"
read-only
=========================

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
image=/boot/vmlinuz-i686-up-4GB
label="linux-i686-up-4GB"
root=/dev/hda5
initrd=/boot/initrd-i686-up-4GB.img
append="devfs=mount acpi=ht splash=silent"
read-only
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

%%%%%%%%%%%%%%%%%%%%%%
image=/boot/vmlinuz-2.6.3-7mdk
label="263-7"
root=/dev/hda5
initrd=/boot/initrd-2.6.3-7mdk.img
append="devfs=mount acpi=ht splash=silent"
read-only
%%%%%%%%%%%%%%%%%%%%%%

++++++++++++++++++++++++++++++++
image=/boot/vmlinuz
label="failsafe"
root=/dev/hda5
initrd=/boot/initrd.img
append="failsafe acpi=ht devfs=nomount"
read-only
++++++++++++++++++++++++++++++++

************************************
other=/dev/hda1
label="windows"
table=/dev/hda
other=/dev/hdb1
label="windows2"
table=/dev/hdb
map-drive=0x80
to=0x81
map-drive=0x81
to=0x80
************************************
other=/dev/fd0
label="floppy"
unsafe

I just don't want to have something in lilo.conf that could become a liability if I by accident selected a wrong application in the lilo boot up screen. Any commenmts are very welcome.

Javi

vectordrake 07-06-2004 09:37 PM

Every time you add a new kernel, Mandrake enters it twice. Don't know why, but you'll notice that you have:
Code:

image=/boot/vmlinuz
label="linux"

and it'll point to which ever of the two kernels that you have installed last, likely (ls -l /boot will tell you by showing the symbolic link).

The
Code:

image=/boot/vmlinuz
label="linux-nonfb"

and
Code:

image=/boot/vmlinuz
label="failsafe"

are almost redundant. You can get rid of the "nonfb" one, as the failsafe will do the job.

Try commenting out the stanza and re-running lilo. You'll see what I mean.

By the way, having all those entries is not detrimental to your booting. It just confuses things and doesn't look pretty. You'll only be using one most of the time anyways. :D

jmr0311 07-06-2004 10:32 PM

Hi Vectordrake, I was able to do the changes to my Lilo.conf successfully, thank's for your kind help. I saw for the first time the Lilo boot up screen and it doesn't look pretty. It shows all of this entries in the screen:

linux-i686-up-4GB ( apparently this one is to boot Mandrake Linux partition)
linux
linux nonfb
263-7
failsafe
windows ( Apparently this one is to boot Windows XP partition)
windows2
floppy

Do I need all this mess in that screen, or there is anything I can do to prevent Lilo from showing this entries in the booting screen. Also, Can I change the name Lilo display in this screen to make it more friendly to the user. The only ones I will like to keep is the ones for mandrake linux partiton and windows XP partition.

Javi

jrdioko 07-06-2004 10:44 PM

I don't see any reason you need all those entries. You can comment out (put a # in front of each line) all the sections you don't want to use. Also, feel free to change the text after label= to whatever you want (mine say Linux and Windows).

vectordrake 07-06-2004 10:53 PM

Agreed. The only thing that I noticed about the entries that would make any real difference would be whether you want a nice framebuffer bootup or a plain ole text bootup. Right now, you get the text, I guess. The "linux" image has that extra vga=788 line, which would boot a pretty framebuffer instead of the text (which you can do with the other lines as well).

Do you have more than 933mb ram, btw? Is that why you have a large memory kernel at boot?

jmr0311 07-06-2004 11:10 PM

If I put this ( # ) in front of all the lines, that's not going to affect how lilo boot all those entries. Or should I put this ( # ) only in front of the line that says label= " x " to prevent them fro showing. I have 1 GB of ram memory in my system and I don't know why I have 4GB for kernel memory. What do you mean with framebuffer bootup or text bootup, the screen that pops is blue showing all the names and all I do is scrolling to the name I want to execute and then press enter. Which entries do you recommend I should keep and How can I get that nice framebuffer type of booting screen your talking about.

Javi

vectordrake 07-06-2004 11:21 PM

Every entry you put a hash (#) in front of, gets "ignored". So, you should comment out the whole stanza. If you have 1G of ram, that's the right kernel, for large memory (more than 933mb), so you want to boot it, as usual. Put the hash in front of all the stanzas except that one and the first windows one, then. You'll have 2 entries left the next boot. If you want to have the framebuffer enabled, ad dthe "vga=788" line to
Code:

image=/boot/vmlinuz-i686-up-4GB
label="linux-i686-up-4GB"
root=/dev/hda5
initrd=/boot/initrd-i686-up-4GB.img
append="devfs=mount acpi=ht splash=silent"
read-only

to make
Code:

image=/boot/vmlinuz-i686-up-4GB
label="linux-i686-up-4GB"
root=/dev/hda5
initrd=/boot/initrd-i686-up-4GB.img
append="devfs=mount acpi=ht splash=silent"
vga=788
read-only

Leave in the linux-failsafe stanza just in case, as its just a wise thing to do.

jmr0311 07-06-2004 11:48 PM

Hi Vectordrake,
If follow yoour advise and comment out almost everything. After I edit lilo.conf I type liloin the root and this is what it says;
[root@home-desktop jmr0311]# lilo
Added MandrakeLinux
Added failsafe
Added WindowsXP
Fatal: Default image doesn't exist.

Can you comment on this to see if everything is okay or I have a problem with that weird message. Thank's.

Javi

jmr0311 07-07-2004 12:00 AM

I found what the error message was all about. It all happen because I edit this stanza:

image=/boot/vmlinuz-i686-up-4GB
label="linux-i686-up-4GB" <------ ( Change the label to MandrakeLinux )
root=/dev/hda5
initrd=/boot/initrd-i686-up-4GB.img
append="devfs=mount acpi=ht splash=silent"
vga=788
read-only

but I forgot to do the same in this command line;

boot=/dev/hda
map=/boot/map
vga=normal
default="linux-i686-up-4GB" <----- ( Change the label to MandrakeLinux )
keytable=/boot/us.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw

vectordrake 07-07-2004 12:01 AM

Did you change the title of the "linux-i686-up-4GB" linux stanza to "MandrakeLinux"?

If that's it, you must also change
Code:

default="linux-i686-up-4GB"
to
Code:

default="MandrakeLinux"
The "default=" line determines what image is the one to boot by default (pretty easy). If you specify what doesn't exist, you'll get that error.


All times are GMT -5. The time now is 10:34 PM.