LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-06-2004, 07:52 PM   #1
jmr0311
Member
 
Registered: Jul 2004
Location: Texas
Distribution: Mandriva 2006
Posts: 97

Rep: Reputation: 15
How to edit Lilo.conf?


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

Last edited by jmr0311; 07-06-2004 at 07:55 PM.
 
Old 07-06-2004, 08:20 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 07-06-2004, 08:55 PM   #3
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
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").
 
Old 07-06-2004, 09:02 PM   #4
jmr0311
Member
 
Registered: Jul 2004
Location: Texas
Distribution: Mandriva 2006
Posts: 97

Original Poster
Rep: Reputation: 15
Unhappy

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
 
Old 07-06-2004, 09:11 PM   #5
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
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.
 
Old 07-06-2004, 09:27 PM   #6
jmr0311
Member
 
Registered: Jul 2004
Location: Texas
Distribution: Mandriva 2006
Posts: 97

Original Poster
Rep: Reputation: 15
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
 
Old 07-06-2004, 09:37 PM   #7
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
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.

Last edited by vectordrake; 07-06-2004 at 09:57 PM.
 
Old 07-06-2004, 10:32 PM   #8
jmr0311
Member
 
Registered: Jul 2004
Location: Texas
Distribution: Mandriva 2006
Posts: 97

Original Poster
Rep: Reputation: 15
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
 
Old 07-06-2004, 10:44 PM   #9
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
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).
 
Old 07-06-2004, 10:53 PM   #10
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
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?
 
Old 07-06-2004, 11:10 PM   #11
jmr0311
Member
 
Registered: Jul 2004
Location: Texas
Distribution: Mandriva 2006
Posts: 97

Original Poster
Rep: Reputation: 15
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
 
Old 07-06-2004, 11:21 PM   #12
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
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.
 
Old 07-06-2004, 11:48 PM   #13
jmr0311
Member
 
Registered: Jul 2004
Location: Texas
Distribution: Mandriva 2006
Posts: 97

Original Poster
Rep: Reputation: 15
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
 
Old 07-07-2004, 12:00 AM   #14
jmr0311
Member
 
Registered: Jul 2004
Location: Texas
Distribution: Mandriva 2006
Posts: 97

Original Poster
Rep: Reputation: 15
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
 
Old 07-07-2004, 12:01 AM   #15
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Switching from grub to lilo, messed up Lilo.conf, rescuing via Knoppix. SonicGT Debian 2 08-21-2005 01:15 PM
lilo.conf and lilo.conf.anaconda difference blackzone Linux - General 1 07-06-2004 03:15 AM
lilo.conf.anaconda v. lilo.conf rbaird2001 Red Hat 1 04-01-2004 12:16 PM
create lilo.conf or grub.conf through commands newpenguin Linux - Software 1 11-28-2003 08:22 PM
lilo.conf and grub.conf no read access shanenin Linux - Software 1 10-02-2003 03:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration