[techtalk] botched newbie kernel compile

Brian Sweeney bsweeney at physics.ucsb.edu
Tue May 8 11:30:57 EST 2001


Julia-

Check out /etc/lilo.conf.  Mine looks something like this:

delay=1
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt # I comment these
timeout=50 # lines out for security, but I'm paranoid ;-)
message=/boot/message
default=linux

image=/boot/vmlinuz-2.4.2-2
        label=linux
        read-only
        root=/dev/hda1


where it says "image=/boot/vmlinuz-2.4.2-2", yours probably just said
"image=/boot/vmlinuz"(that sym link you were referring to?).  I think the
RedHat installer does the sym-link thing so it never has to change the
lilo.conf file; you can just change the symlink when there are kernel
updates.

When you do recompile your kernel, NEVER get rid of the old boot option. (I
know, I know, little to late...).  Your best bet is, instead, to add a
second boot option like so:

image=/boot/new-linux-kernel
	label=new-linux
	read-only
	root=/dev/<root-partition-device>

I, being lazy, usually just copy and paste from the old option, and replace
the necessary text (image= and label=).

The other thing that's important is not to try and boot to the image if it's
outside of the /boot directory (in your case,
/usr/src/linux/arch/i386/boot/bzImage0).  The /boot directory is there to
make sure that your boot information stays above the 1024 cylinder limit.
Pointing to files outside of that directory can make it so your boot info is
outside this limit, which is often the cause of LI- like errors at boot
time.  Instead, copy the image into the boot directory itself and point to
it there.  I'd also rename it from bzImage0 to something more helpful, but
that's just me.

So, to sum it all up:

1) Figure out what your old vmlinuz link pointed to (it'll be the file in
/boot that's about the size of your new kernel, and probably the only thing
in there that's 1M or larger).  Edit the lilo.conf file and point the
image=/boot/<kernel> line back to it.  Label it linux.

2) Copy /usr/src/linux/arch/i386/boot/bzImage0 to /boot

3) Make a new boot entry in lilo.conf, with image=/boot/bzImage0 (or
whatever you decided to rename it), label=new-linux or any other helpful
label, and the other lines the same as the other entry.

4) Re-run lilo (I like to use the -v flag so I can see ALL of what's going
on).

5) Reboot (you should have the option of booting either of the two kernel
images.  To get a list of images lilo knows about, hit the TAB key at the
lilo prompt.)

You can do all this if you boot from that floppy drive you had.

As a side note, did you want to run make modules and make modules_install?
Check out the modules.txt file in the Documentation directory of your linux
src dir for more info.

Hope that wasn't TOO confusing! =)

-Brian




> -----Original Message-----
> From: techtalk-admin at linuxchix.org
> [mailto:techtalk-admin at linuxchix.org]On Behalf Of Julia Coolman
> Sent: Tuesday, May 08, 2001 10:27 AM
> To: techtalk at linuxchix.org
> Subject: [techtalk] botched newbie kernel compile
>
>
> Oh, what's a girl to do?
>
> After reading the kernel-HOWTO, I downloaded a 2.4.4 tarball, untarring it
> into /usr/src. Following the instructions in the HOWTO, I 'make
> xconfig'ed, 'make dep'ed, and 'make bzdisk'ed. At that point I booted
> succesfully from that floppy and unamed to verify I was running 2.4.4
> succesfully.
>
> Rebooting using the 2.2.17 that I originally had, and again following the
> HOWTO, I 'make bzImage'd, replaced /vmlinuz (which appears to have been a
> symlink to something in /boot) with /usr/src/linux/arch/i386/boot/bzImage0
> and ran lilo, then tried to reboot.
> Currently at boot, after the hardware does its thing, "LIL-" appears, then
> nothing happens.
>
> I would like to munge things so I can boot from my old 2.2.17 kernel OR my
> 2.4.4 kernel (which, since the boot disk worked, I am guessing I put in
> place wrong?), AND learn how to do it right next time.  Ugh. Help the
> newbie? Please?
>
> Julia Coolman
>
> jcoolman at gladstone.uoregon.edu
>
> "When the revolution comes, we're going to need a very big wall."
>
>
> _______________________________________________
> techtalk mailing list
> techtalk at linuxchix.org
> http://www.linux.org.uk/mailman/listinfo/techtalk
>





More information about the Techtalk mailing list