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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
07-06-2004, 07:52 PM
|
#1
|
Member
Registered: Jul 2004
Location: Texas
Distribution: Mandriva 2006
Posts: 97
Rep:
|
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.
|
|
|
07-06-2004, 08:20 PM
|
#2
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
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
|
|
|
07-06-2004, 08:55 PM
|
#3
|
Member
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944
Rep:
|
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").
|
|
|
07-06-2004, 09:02 PM
|
#4
|
Member
Registered: Jul 2004
Location: Texas
Distribution: Mandriva 2006
Posts: 97
Original Poster
Rep:
|
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
|
|
|
07-06-2004, 09:11 PM
|
#5
|
Senior Member
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Rep:
|
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.
|
|
|
07-06-2004, 09:27 PM
|
#6
|
Member
Registered: Jul 2004
Location: Texas
Distribution: Mandriva 2006
Posts: 97
Original Poster
Rep:
|
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
|
|
|
07-06-2004, 09:37 PM
|
#7
|
Senior Member
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Rep:
|
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.
|
|
|
07-06-2004, 10:32 PM
|
#8
|
Member
Registered: Jul 2004
Location: Texas
Distribution: Mandriva 2006
Posts: 97
Original Poster
Rep:
|
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
|
|
|
07-06-2004, 10:44 PM
|
#9
|
Member
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944
Rep:
|
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).
|
|
|
07-06-2004, 10:53 PM
|
#10
|
Senior Member
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Rep:
|
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?
|
|
|
07-06-2004, 11:10 PM
|
#11
|
Member
Registered: Jul 2004
Location: Texas
Distribution: Mandriva 2006
Posts: 97
Original Poster
Rep:
|
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
|
|
|
07-06-2004, 11:21 PM
|
#12
|
Senior Member
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Rep:
|
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.
|
|
|
07-06-2004, 11:48 PM
|
#13
|
Member
Registered: Jul 2004
Location: Texas
Distribution: Mandriva 2006
Posts: 97
Original Poster
Rep:
|
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
|
|
|
07-07-2004, 12:00 AM
|
#14
|
Member
Registered: Jul 2004
Location: Texas
Distribution: Mandriva 2006
Posts: 97
Original Poster
Rep:
|
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
|
|
|
07-07-2004, 12:01 AM
|
#15
|
Senior Member
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Rep:
|
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 05:33 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|