Operating System - Linux
1829712 Members
1885 Online
109992 Solutions
New Discussion

Re: Kernel upgrade not bootable

 
SOLVED
Go to solution
Jeffrey S. Sims
Trusted Contributor

Kernel upgrade not bootable

Ok I will try to explain this as well as possible. I am upgrading my redhat 7.2 computer from 2.4.7-10 to 2.4.16. I downloaded the kernel source from www.kernel.org and checked the signature. I run make xconfig and save and exit. Then run the necessary commands such as
make dep
make bzImage
make modules
cp bzImage to the boot partition
make modules_install
edit the lilo.conf file and add the lines to boot from the new kernel as well as the old.
run the lilo command
reboot

when I choose the new kernel it starts to uncompress the kernel then immediately reboots. Any help or suggestions would be greatly appreciated. (I chose linux2.4.16 so I could use the lids patch and enable lids support but right now I am just trying to get the kernel to work.)

I will assign points to all helpful replies so don't be shy.
8 REPLIES 8
Jeffrey Wong
Advisor

Re: Kernel upgrade not bootable

This is an interesting problem you have here. The only thing I can think of is something in the bzImage you are using is corrupted. One thing you can do to isolate that it is the kernel image that is causing this is copy the kernel to a floppy as a disk image 'dd if=bzImage of=/dev/fd0' . This will create a bootable disk with just the kernel on it. If that disk fails to boot then I'd suggest rebuilding the kernel and trying again. If that fails, then its time to test the kernel for what is going wrong. For a test kernel, I'd recomend using loadable modules whenever possible and removing the modules from /etc/conf.modules . Also try and removing any non essential options from the kernel. The goal is to try and get a working kernel and slowly add things back in. Hopefully you'll get a usable kernel with everything you need, or find out which kernel option/module is failing.
Mark Fenton
Esteemed Contributor

Re: Kernel upgrade not bootable

Could you post whatever it logs when it reboots (or does it do so even before any file systems are mounted and kernel logging is turned on?

Did you make a new initrd for the Kernel, did you ensure that the sysmap was properly created and installed?

Mark.
Jeffrey S. Sims
Trusted Contributor

Re: Kernel upgrade not bootable

Jeffrey - The kernel is too large to fit on a single disk. I will create another tonight that is modules when possible and let you know.

Mark - I did create the initrd image (even though I am not using any scsi devices) and that went fine. The kernel doesn't log anything since it reboots after displaying the uncompressing vmlinuz-2.4.16 .............. at the beginning of the boot. As far as the sysmap goes. I ran a diff on the working kernel's sysmap.h file and the new kernel's sysmap.h file and there was no difference what-so-ever. Other than that I don't know what to run.

Don't worry, I haven't forgottoen about points, I am waiting until I get this resolved and I will assign them accordingly. Thanks for the help so far.
Charles Slivkoff
Respected Contributor
Solution

Re: Kernel upgrade not bootable

Its tough to try to diagnose kernel boot problems without some details on your hardware and some of the basic choices made in the kernel configuration. Most likely, there is a miss-match between your CPU and the CPU architecture selected in your .config.

I would suggest that you start with a RH .config file from the RH kernel-source RPM. The RH kernel source RPM includes a "configs" directory which contains the ".config"s used to build the RH kernel RPM's.

Pick the config file that matches your current kernel and architecture (see NOTE below) & copy that file to your new source directory and name it ".config". Then run "make oldconfig". This will quickly go through the existing ".config" and prompt for any new options which may have been added. Answer any new questions appropriately.

Now you can continue on with your "make *config", "make dep", etc. You should end-up with a bootable kernel.

-chuck

NOTE: I have a system to figure out exactly which config file matches the running kernel, but its too complicated to post here.

Jeffrey S. Sims
Trusted Contributor

Re: Kernel upgrade not bootable

Thanks Chuck I will try that tonight when I get home.

FYI - I tried the other suggestions with not much luck. I decided to try the most recent stable kernel 2.4.18 and that one actually starts to boot, but stops when it tried to run init. It says that there is no init found and passing init= to kernel. Any idea why this would be happening? sounds like it can't access the disk or something to me, but that is only a guess since I haven't seen this error before.

Thanks for the help so far. ( I am posting points to the first two replies since I have tried their suggestions already)
himba
Advisor

Re: Kernel upgrade not bootable

hello

sorry for dropping in like that, but..

what chuck described in his last post is what does it for me!!! i also had a problem with booting new 2.4.18 kernel, like you, jeffrey, and i followed the instructions and DONE! it was that my compiler, for no reason whatsoever, choose i686 arch for pentuim 133 - my netserver lc, instead of i586, like kernel 2.2.16 ran on!!

regards, himba
Jeffrey S. Sims
Trusted Contributor

Re: Kernel upgrade not bootable

Chuck your suggestion did work. Thanks for all the help.
Jarle Bjorgeengen
Trusted Contributor

Re: Kernel upgrade not bootable

Chuck,

could you mail some info on how to match up the running kernel with a .config file (I.e. extract the config out the kernel if possible)

Rgds Jarle