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

This is a continued question from this post:
http://www.experts-exchange.com/Operating_Systems/Linux/Q_21173323.html#12382892

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

-------------------------------------------------

LVL 5
intreegAsked:
Who is Participating?
 
AleksandarSConnect With a Mentor Commented:
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'
 'make modules_install'
 'make install'

The 'make install' copies bzimage and System.map 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 System.map /boot/System.map-2.6.9'

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 :)
Cheers
0
 
AleksandarSCommented:
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.
0
 
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.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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.
0
 
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 System.map and initrd to /boot? If so where do I find them or do I have to create them myself?
0
 
ITG-SSNACommented:
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 :(

Regards,

~K Black
Irvine,Ca.
0
 
ITG-SSNACommented:
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 http://www.kernel.org

Good luck

~K Black
Irvine, Ca.
0
 
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?

Second:
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?
0
 
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!

0
 
ITG-SSNAConnect With a Mentor Commented:
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.
0
 
ITG-SSNACommented:
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.

Regards..
~K Black
0
 
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.
0
 
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?
0
 
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.
0
 
AleksandarSCommented:
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.
0
 
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?

Thanks!
0
 
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!
0
 
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!
0
All Courses

From novice to tech pro — start learning today.