Kernel Recompile. PC not reboots after lilo selects the new kernel.

This is a continued question from this post:

I have recompiled the 2.6.8 kernel and now the pc continuously reboots after lilo loads.

Info From Previous Question :
I copied the bzImage to /boot/vmlinuz-2.6.8-default and changed the sym link vmlinuz to reference it. Edited lilo.conf and added an entry for it. Ran lilo -v successfully. When I reboot and choose the 2.6.8 kernel the pc will continuously reboot. Lilo starts, and starts to boot the kerenl, I gives a message about the BIOS (i really need to start writing this down), and then reboots. Getting closer.  -- Intreeg

You might have some underlying CMOS setting issues. There's really no reason a system would spontaneously reboot like that unless something is seriously wrong.

My suspicion is that it's set to a graphical mode that is out of range, or perhaps the CMOS needs to be set to Non-PlugNPlay OS, or has some interrupt conflicts.

It would be helpful if you could post us the error message. Additionally if you could boot from the Linux CD in rescue mode, mount the system, and read the output of /var/log/messages and/or dmesg.

If the system will boot from the kernel on the OS disk, it would stand to reason that a selection is wrong in the kernel compile, or similar. Usually if one kernel boots, and another doesn't it's incompatablity in the base.

Please provide any clues you can, I'm about at the limit of what I can do without further clues, sorry...

~K Black


I kind of figured that would be the case, was basically posting to see if there was a common missed setting that would cause this behavior. I will try to post more info when I get home this evening.  --Intreeg


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi again intreeg,
Provide us with error messages, and let's fix the whole thing once and for all :)
Really, there is no need to split your problem in 2 or 3 questions - the most people are here to help, not to collect points.
intreegAuthor Commented:
I understand about the points, I was extremely "interested" (for lack of a better term in your comment in the other post) and truly feel that you deserve the points and recognition. Good deeds should not go unrewarded. In addition, this may help the index of the questions for searches done by other users.

Here is my question about the getting the info from /var/log/messages... Do I have to boot to the cd or can I use the old kernel or "failsafe" option through lilo?

In regard to "Usually if one kernel boots, and another doesn't it's incompatablity in the base."

I have no problem booting back to the 2.4.21 kernel.
intreegAuthor Commented:
Maybe it was too late the last time I messed with this. I rebooted the PC to the 2.6.8 kernel, and instead of immediately rebooting it locks up after displaying "Loading Linux (15 ...)"

When I went back to the 2.4.21 kernel and looked at /var/log/messages there is no entry for the reboot to the new kernel. I am going to try to reconfigure it again and see what happens. I am hoping I missed something obvious in the config.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

intreegAuthor Commented:
OK I have spent a lot of time reconfiguring / recompiling the 2.6.8 kernel. I have finally got it to boot but will the PCMCIA services always fail. I am currently loaing SuSE 9.1 on the pc. Which install with a 2.6 kernel. However, I am sure I will have to recompile it to support IPSec anyway. Make question is now what is the exact process I need to complete in order to recompile this kernel?

1. download and unzip/untar the 2.6.X
2. change to that dir
3. run make mrproper
3. run make menuconfig - choose option - save and exit
4. make bzImage
5. make clean

6.... here is where I become unclear

I copy the bzImage to /boot and redirect the vmlinuz link to the new image
Add entry for previous kernel (in case of config failure)
Run lilo -v

Do I need to copy a new and initrd to /boot? If so where do I find them or do I have to create them myself?
What I do is simply postpend the lilo.conf file with a new entry matching the old entries, except potined to the new kernel.

Then type 'lilo' as root...that should give you a prompt when you boot which will allow you to load the test kernel from there.
Later if you like it, you can name it under the "default" kernel line in lilo.conf, and it will be the primary kernel after running lilo yet again.

Let me know where you are on this, I'll try to help.

Sorry for the wait, I didn't get the emails from EE :(


~K Black
Also in make menuconfig make sure there's support for PCMCIA slots by the manufacturer of your card.

Note that compiling kernels for use on laptops is ugly business in my experience. You might find a default hi-mem
enabled kernel for your distro at

Good luck

~K Black
Irvine, Ca.
intreegAuthor Commented:
Response to your first post today:
I just want to make sure i am clear, after everything is compiled and cleaned, simply copy and paste a copy of the default lilo entry and just change the path to the bzImage located under the src dir? Then if everything works you could do a make install and erase the test entry?

I will look into the hi-mem kernel option. The only issue I am having (it appears) is the PCMCIA stuff, which I make sure to select ALL manufacturers the last time just to make sure I had them all. Would that create an issue?
intreegAuthor Commented:
This was my final solution:

1. I installed SuSE 9.1
2. Downloaded (unzipped and untared) Kernel 2.6.9
3. tar-ed and zipped /boot and /lib/modules and stored them in home directory
4. make mrproper
5. make oldconfig
6. make
7. make modules_install
8. make install

It works fine with PCMCIA etc. Not exactly what I was looking for but IPSec is enabled. I am going to try to recompile using make menuconfig and trim down the kernel manualy. I was wondering now that I have compiled a kernel, when i do make menuconfig will it display the config as it is currently set from the previous compile? If not, is there any way to do a make oldconfig equivelant using a menu to select/deselect options but have the current config displayed? Thanks to everyone for their input up to this point!

make mrproper should give you a parsable config based on current system state.

I think what you might want to do is run make xconfig from within xwindows (type startx)
and then use the shell prompt to type "make xconfig" and use the configurator dialog.

Hope this helps.

~K Black
Irvine, Ca.
Note on 2.4.6 kernels and higher, make modules and make modules install is ignored/dangerous.

Try running it without, and let it find the dependencies on it's own at boot.

~K Black
intreegAuthor Commented:
Cool! I had considered using x-config... and probably will. I would eventually like to get away for x-windows for kernel recompiles. Mainly because I would prefer not install x-windows on a would-be server. I am chalking this up to laptop's are not server (though they do make excellent routers ;^) ) and will need to be treated a bit different. As I have learned the kernel is very tricky on laptops. I will try the xconfig and post back.
intreegAuthor Commented:
I thought I had read that somewhere, the INSTALL or README in teh 2.6.9 kernel recommends doing a modules_install. I was confused, and finally just decided to go with the README or INSTALL(no sure which at the moment). If you do not do a modules_install when or how is the /lib/modules created? What is the process that occurs in the make install?
intreegAuthor Commented:
I have tried to recompile using xconfig and get the same kernel panic i believe at the resiers mounting, are you sure you do not need the make modules_install. It appears that the kernel cannot find the resiers module and panics. I assumed since I was recompiling the same version of kernel that there would be no problem find the modules.
This line is from official kernel-2.6.9 README:
' - If you configured any of the parts of the kernel as `modules', you
   will also have to do "make modules_install".'
So you MUST do 'make modules_install', and this is not dangerous but normal procedure.

If your file system is reiserfs, you should make kernel image with built-in reiserfs support, do not compile it as module. Otherwise, you'll get kernel panic errors.
intreegAuthor Commented:
Finally an answer I understand! I believe I compile the kernel with "natural" or built-in support of resisers... I will double check and post the dmseg.

Two questions though,
1. When doing a menuconfig or xconfig does it use the current kerenl config for its defaults?
2. How would you bypass the make install step? In other words what is the process that the install script preforms... copy the bzImage to /boot but what else?

1. When you do menuconfig/xconfig, the make script searches config files in 2 places (I will assume that you have 2.6.9 kernel source):
- in /usr/src/linux-2.6.9 , it searches for '.config'
- if /usr/src/linux-2.6.9/.config doesnt exists, it will search for /boot/config-2.6.9
If none of these are exist, script will go with the default config which is located in /usr/src/linux-2.6.9/arch/i386/defconfig

2. Tipically, the algorithm of installing new kernel is quite simple. The proper sequence of commands is:
 'make modules_install'
 'make install'

The 'make install' copies bzimage and in your /boot and alter grub/lilo config files (depends on what boot loader you use). This procedure works well for me.

If you want to do it manually, after 'make modules_install' do:
 'cd /usr/src/linux-2.6.9'
 'cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.9'
 'cp /boot/'

and optionally

'cp .config /boot/config-2.6.9'

After this you should make changes in /boot/grub/grub.conf or in /etc/lilo.conf and create new entry for booting 2.6.9 kernel. Just take a look in these two config files, it is pretty easy and straightforward how to do this.
And of course, in a case of lilo, after you modified /etc/lilo.conf you must do '/sbin/lilo' to make new mbr; in grub case, you dont need anything than editing and saving grub.conf.

Hope this will help :)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
intreegAuthor Commented:
That is freakin beautiful! Why is that not posted somewhere in the man pages etc?!? I have found only bits in pieces of that info scattered about but no source that lays it out like that. All of the mystery to the whole process is now cleared up and A LOT of the issues I have had now make sense and I feel confident in avoiding them in the future. You have definatley gotten the points and this description should be posted all of the linux doc community! Thanks for all the help and patience! I plan to recompile as soon as I get back to the PC, hopefully tonight. I do not anticipate any problems, not that I have a full understanding of the overall process! I will post back the final product. Thanks again for all of your help!
intreegAuthor Commented:
I am still receiving an error but I am pretty close to getting the kernel set exacttly how I want it. I appreciate all of your time and help!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.