Linux - NewbieThis 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.
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.
Distribution: RedHat v9, Mandrake v9.1, Windows 2000
Posts: 12
Rep:
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.
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.
Distribution: RedHat v9, Mandrake v9.1, Windows 2000
Posts: 12
Original Poster
Rep:
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)
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.
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.
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)
Distribution: RedHat v9, Mandrake v9.1, Windows 2000
Posts: 12
Original Poster
Rep:
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.
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.
Distribution: RedHat v9, Mandrake v9.1, Windows 2000
Posts: 12
Original Poster
Rep:
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:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.