LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-04-2003, 12:26 AM   #1
clearh20
LQ Newbie
 
Registered: May 2003
Location: Florida
Distribution: RedHat v9, Mandrake v9.1, Windows 2000
Posts: 12

Rep: Reputation: 0
Angry LILO / lilo.conf - can't change the config


Ok, this one is driving me nuts. Most of the time I mess with it until I get it right, but this time I'm flat out of ideas.

I did all the updates and such for RH v9, and now I got the new kernel in the /boot directory. At the end of the installtion it said "LILO test configuration failed" (or something very similar to that). No big deal, I jump into the shell and see that lilo.conf has been updated and all looks well.

Now, for the past few days, I've been trying to get the options on the LILO menu to just represent RH and Win2k. I don't need to bother with any BOOT kernels..and don't even want them on the list.

Enter lilo.conf. I edited out the stuff I didn't want, and left in the two OS's I wanted listed. The computer still brings up LILO fine - but none of the changes I made show up.

So I do some reading, and find out I need to run /sbin/lilo to write the changes. I try, and I get a "cannot execute binary" error.

RH is on /dev/hda7, and Win2k is /dev/hda1. I have System Commander booting up right after POST, and from there I normally pick RH and then LILO comes up. (Ok, so I don't need both - but I got them!) Technically, I don't want LILO on my MBR, but I *do* want it on the first sector (?) of the RH partition.

How do I get the changes in lilo.conf to take w/o writing over my MBR that is using System Commander? Everything was fine with how LILO was configured under RH v8, but now that I'm using v9, I'm having headaches.

Help, or possibly a beer, would be nice....

Believe it or not, I'm honestly trying to learn Linux....and I'm getting better - I'm just not good enough yet to figure out simple problems.

If this makes no sense, I apologize. I'm tired and ticked. I'll try to explain more after getting some rest.


Thanks again.
 
Old 06-04-2003, 05:35 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
if your boot= line says hda then it will hit the mbr, if it says hda1 then the first partition and so forth. but you must rerun lilo for the changes to taje effect. what are you actually doing to get that "unable to execute" message? the program might be corrupted.
 
Old 06-04-2003, 09:13 AM   #3
clearh20
LQ Newbie
 
Registered: May 2003
Location: Florida
Distribution: RedHat v9, Mandrake v9.1, Windows 2000
Posts: 12

Original Poster
Rep: Reputation: 0
acid_kewpie,

Here's my current lilo.conf (originally auto generated by the RHv9 install, then an attempt at updating it after last nights RHN kernel update (to 2.4.20-18.9)

prompt
timeout=50
default=2.4.20-18.9
boot=/dev/hda7
map=/boot/map
install=/boot/boot.b
message=/boot/message
lba32

image=/boot/vmlinuz-2.4.20-18.9
label=RedHat Linux v9.0
append="hdc=ide-scsi root=LABEL=/"
read-only
initrd=/boot/initrd-2.4.20-13.9.img

other=/dev/hda1
optional
label=Windows 2000
---------------------------------------------------------------------

Quote:
what are you actually doing to get that "unable to execute" message? the program might be corrupted.
Now, to get the "cannot execute binary" message, I'm going into /sbin and trying to run the "lilo" command. I read that it's supposed to update itself from data containted in lilo.conf. So, that's what I try. I try to type "lilo", I get "command not found". I cd to /usr/sbin/ and type "lilo", I get "command not found". I go back into /sbin and now I try "sh lilo" (with a few arguments), and I get "cannot execute binary". I do the same in /usr/sbin.

I'm almost positive the file I need to get working is in /sbin not /usr/sbin - But I figured I'd try anyway.

The information I'm using is coming from:
http://www.die.net/doc/linux/man/man8/lilo.8.html
http://gd.tuwien.ac.at/opsys/linux/L...nux-fdisk.html

(On the second link, it's just the part about editing lilo.conf, obviously )

If it's corrupted, how do I go about fixing it?

THANKS!

Last edited by clearh20; 06-04-2003 at 09:15 AM.
 
Old 06-04-2003, 09:24 AM   #4
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
/sbin/lilo
 
Old 06-04-2003, 09:41 AM   #5
clearh20
LQ Newbie
 
Registered: May 2003
Location: Florida
Distribution: RedHat v9, Mandrake v9.1, Windows 2000
Posts: 12

Original Poster
Rep: Reputation: 0
That's what I've been trying to run, and it's not working.
 
Old 06-04-2003, 09:45 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
no, what you say you've been doing is "cd /sbin; lilo" which is not the same. if /sbin is not on your path then it will say command not found. as for "can not execute" you're trying to run a binary program through sh, which is expecting a script file. your equivalent there would be "sh -c lilo" or something, but this is not what you should be doing. run "/sbin/lilo" completely and it should work fine.
 
Old 06-04-2003, 11:43 AM   #7
0x4B
Member
 
Registered: May 2003
Location: Nashville TN, USA
Distribution: Debian (I'm unstable)
Posts: 117

Rep: Reputation: 15
you also will need to be root (and /sbin should be in root's path). if you're in the directory of an executable, prepend it with ./ to specify the local path (e.g. cd /sbin; ./lilo)

Last edited by 0x4B; 06-04-2003 at 11:44 AM.
 
Old 06-04-2003, 05:24 PM   #8
clearh20
LQ Newbie
 
Registered: May 2003
Location: Florida
Distribution: RedHat v9, Mandrake v9.1, Windows 2000
Posts: 12

Original Poster
Rep: Reputation: 0
Hrm..well you're right! running /sbin/lilo works. I'm still used to going to a specific directory to execute a program... I'll remember the ./ trick.

Running /sbin/lilo seemed to work -
Though, I get an 'error on line 12'. But from what I see, it looks fine. The response also says "Added RedHat Linux".

Problem is, on reboot...all of the options I got rid of are *still* there, and the *new* kernel isn't showing up in the list.

I've got to be doing something stupid. My boot loader cmoes up as a screen w/ a RH picture, and a list of available options on the right. You scroll through them w/ a keyboard. That's LILO, right? I always thought GRUB was just a black screen with options (nothing fancy) - but I guess I could be wrong.

Either way, I checked /boot/grub/grub.conf and /boot/grub/menu.lst and they're all ok.

When I do a uname -a I get told I'm still running the 2.4.20-13.9 kernel...when I can plainly see the 2.4.20-18.9 is in /boot as well. The new kernel is also referenced in lilo.conf (see post above), but of course, I don't have that option.

Any suggestions?


Last edited by clearh20; 06-04-2003 at 05:27 PM.
 
Old 06-05-2003, 12:00 PM   #9
0x4B
Member
 
Registered: May 2003
Location: Nashville TN, USA
Distribution: Debian (I'm unstable)
Posts: 117

Rep: Reputation: 15
when lilo states "added" blah, it doesn't mean that its a new addition, just that it placed the option in the boot record. each time it runs, it should "add" each boot option. chances are that it failed (at line 12) to add the new one. is line 12 the read-only statement?

I've actually never used GRUB, but lilo used to be just a couple text options but there are versions that look more like a menu system with multiple columns. if you do a google search for grub boot loader with the images option, you can get some idea of what grub looks like.
 
Old 06-05-2003, 03:33 PM   #10
Wolfie
LQ Newbie
 
Registered: Jul 2001
Location: Vancouver, Canada
Distribution: RH 9.0 MDK 9.2, 10 Knoppix 3.4 SW 9.1 Debian 3.0, Gentoo, Peanut 9.5, PCLOS 2k4r7, Mepis
Posts: 18

Rep: Reputation: 0
try taking the space out of your line"label=Windows 2000" I have found redhat does not like spaces
 
Old 06-05-2003, 04:14 PM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,806

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
I agree it could be the spaces also your default=<label> needs to match one of the actual labels and 2.4.20 doesn't match.

Also if there are any error messages I don't lilo will actually write a boot record.
 
Old 06-05-2003, 06:15 PM   #12
clearh20
LQ Newbie
 
Registered: May 2003
Location: Florida
Distribution: RedHat v9, Mandrake v9.1, Windows 2000
Posts: 12

Original Poster
Rep: Reputation: 0
Thumbs up You guys rock!

You guys ROCK!

Ok, so I took out the spaces, and changed the label of the kernel I wanted to use so it matched the default= statement. The spaces caused a Syntax error when I ran /sbin/lilo, but after I took them out - all was well.

It was failing on line #12 before because of the labeling issue. As soon as I changed it to "2.4.20-18.9", it worked fine! It makes much more sense to me now, now that I've worked through this problem.

Oh yah, I also had to match up the .img file to the CORRECT kernel version - that was my goof (tired + vi = stupid mistake).

My one, final question (for now) is: can i just delete all of the old kernel versions? I can see keeping one & it's "BOOT" version, but the rest just seem to be excess. Yes? No.

THANK YOU FOR YOUR HELP!


=========================================

In case anyone is interested for future reference, this is what the *NEW* (WORKING) lilo.conf looks like:

prompt
timeout=50
default=2.4.20-18.9
boot=/dev/hda7
map=/boot/map
install=/boot/boot.b
message=/boot/message
lba32

image=/boot/vmlinuz-2.4.20-18.9
label=2.4.20-18.9
append="hdc=ide-scsi root=LABEL=/"
read-only
initrd=/boot/initrd-2.4.20-18.9.img

other=/dev/hda1
optional
label=Windows2000


===========================

Last edited by clearh20; 06-05-2003 at 06:21 PM.
 
Old 06-05-2003, 06:58 PM   #13
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
delete away. they're in /boot/
the modules are in /lib/modules under the kernel version.
be careful dangit.
 
Old 06-05-2003, 08:44 PM   #14
clearh20
LQ Newbie
 
Registered: May 2003
Location: Florida
Distribution: RedHat v9, Mandrake v9.1, Windows 2000
Posts: 12

Original Poster
Rep: Reputation: 0
Smile

done!

/lib/modules

This is a complete guess on my part, but is that the area I'd be working in if I ever go the guts to recompile my own kernel?

Just curious.

Thanks.
 
Old 06-05-2003, 09:20 PM   #15
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
no, thats just where the modules go. i think they
should go in boot, but they don't.
 
  


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
Upgraded kernel, lilo.conf, didn't run /sbin/lilo dtashima Linux - Newbie 4 10-18-2004 11:21 AM
lilo.conf and lilo.conf.anaconda difference blackzone Linux - General 1 07-06-2004 03:15 AM
How do I change the Default in LILO.CONF timmy toad Linux - Newbie 3 09-26-2003 01:28 PM
Problem with Lilo not updating (yes I ran lilo after changing the conf) webguy Linux - General 2 06-24-2001 07:12 PM


All times are GMT -5. The time now is 12:09 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration