Click to See Complete Forum and Search --> : make mrproper after every change?


cybertron
05-23-2004, 03:38 PM
Should I be having to do a "make mrproper" after every time I try to change an option in .config? I'm trying to compile my own 2.6.6 kernel and I've managed to get a couple of them to boot but never without a few problems. Every time that I change something to try to get rid of the problems I have to do make mrproper and completely recompile. If I don't it just hangs after I select the new kernel from lilo. It doesn't matter if I only changed one setting and even put it back so that the config is the same as the one that booted.

This of course takes a really long time and I'm naturally very unhappy when my changes don't work 45 minutes later. Is this supposed to happen and if so is there a way that I can do something other than make mrproper or clean to fix it?

Thanks.

gehidore
05-23-2004, 04:03 PM
did you install the utilities that you need for the 2.6 kernels?

threadhead
05-23-2004, 05:24 PM
if you want to completely remove all precompiled files do a


make clean

cybertron
05-24-2004, 09:04 AM
It turns out the make mrproper thing was just a coincidence. The problem was that I forgot that you need to run lilo after every recompile or it can't find the kernel you're trying to boot. At least I assume that's what was going on from my basic knowledge of bootloaders.

Running my nice shiny 2.6.6 kernel now and even though there are a couple of errors on boot I haven't found anything that doesn't work, yet;) I can't test my network though because I had to change dorm rooms for the summer and my cable isn't long enough to reach across the new one:rolleyes:

Actually, on second thought there is one thing that doesn't work. It hangs on "Stopping ALSA" when I shut down. Have to see if I can get that to stop, but now that it doesn't take an hour to find out if my changes work it won't be so bad:)

threadhead
05-24-2004, 11:30 AM
yes, running lilo after you have altered /etc/lilo.conf
is required by lilo itself to see the change you made.

have fun with 2.6. ;)

cybertron
05-24-2004, 12:07 PM
That's the funny thing though, I didn't make any changes to lilo.conf. I think the problem might be that lilo points to an absolute location on disk because the filesystem hasn't been loaded yet, so when you overwrite the old kernel if it doesn't happen to be in exactly the same location on the disk lilo can't find it, even if it's the same file according to the filesystem. I could be completely wrong about that though:)

bwkaz
05-24-2004, 09:05 PM
Nope, that's basically right.

BTW, overwriting the old kernel is a really bad idea -- what would happen if your new kernel didn't boot? Oops, now nothing will work. ;)

Always add another lilo.conf stanza for each new kernel you compile. After you're satisfied that your old kernel will no longer be required, remove its stanza. And rerun lilo each time.

Or, you could just use grub. Then you don't have to reinstall it every time (it understands most Linux filesystems enough to find the kernel at boot time) -- though you still shouldn't overwrite your old kernel with a new one.

cybertron
05-24-2004, 10:43 PM
Yeah, the stock 2.6.3 kernel is still there and has an entry in lilo.conf. I was overwriting the failed 2.6.6 ones because they didn't work anyway:) Not quite ready to get rid of the old one yet though because I'm having trouble getting the new one to shut down cleanly, but that's in another thread.

CaptainPinko
05-27-2004, 06:35 PM
Running Lilo everytime is why I use GRUB. Just food for thought.

JohnT
05-27-2004, 07:03 PM
Originally posted by CaptainPinko
Running Lilo everytime is why I use GRUB. Just food for thought.
Grub..food..he,he.:D

(merriam-webster)
Main Entry: grub
Function: noun
Etymology: Middle English grubbe, from grubben
1 : FOOD

micro
06-02-2004, 04:47 PM
As I have experienced, lilo has to run even after the same kernel is compiled again, therefore even if /etc/lilo.conf doesn't change.

bwkaz
06-02-2004, 05:42 PM
lilo has to be run every time the absolute starting block number of the kernel image file gets changed.

This will happen if you:

(1) move it to another directory,

(2) copy bzImage to bzImage2, delete bzImage, then rename bzImage2 to bzImage (for example), or

(3) recompile it and copy the new bzImage over top of the old one

There may be other times when it's necessary to rerun lilo. Which is why I like grub better, myself (but whatever).

cybertron
06-02-2004, 06:02 PM
Originally posted by bwkaz
lilo has to be run every time the absolute starting block number of the kernel image file gets changed.

This will happen if you:

(1) move it to another directory,

(2) copy bzImage to bzImage2, delete bzImage, then rename bzImage2 to bzImage (for example), or

(3) recompile it and copy the new bzImage over top of the old one

There may be other times when it's necessary to rerun lilo. Which is why I like grub better, myself (but whatever).

I'd probably give Grub a try, but lilo is the default in Mandrake and for 95% of the time it works great. As long as I remember how it works I'm okay:).

bwkaz
06-02-2004, 09:32 PM
That's why the "(but whatever)". Use whatever you like; that's just my opinion. ;)

CaptainPinko
06-03-2004, 12:37 AM
the gentoo docs have great information for the use of GRUB and setting it up. Even though I hate the distro I keep a copy of the manual around for reference in situation that might otherwise have been FUBAR.