Recompiling the Kernel

Place to discuss Slackware
Post Reply
shuiend
scripter
scripter
Posts: 91
Joined: Mon Apr 28, 2003 8:05 pm

Recompiling the Kernel

Post by shuiend » Mon Jan 05, 2004 4:38 pm

I decided that i wanted to try kernel 2.6. So i went on to your redhat tips void where you show how to recompile the kernel. So i follow all your steps with no problem and they all seem to work. You say it automatically adds things to your lilo config file so i just rebooted figuring that it would work like it does in red hat lo and behold still only one option and its for my old kernel. So once i am up i look in the /boot directory and see no files form my 2.6 compile. So now i am lost as to what to do next. I am not sure what i need to do to copy the right files to the /boot firectory or what to add to my lillo config file. So what do i do next.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Jan 05, 2004 4:52 pm

Yeah, in Slackware you'll probably have to copy the kernel to your /boot directory manually and update the lilo.conf manually (like you used to have to do on all distros). Here is a thread on Slackware and kernel compiling:

http://www.linuxquestions.org/questions ... adid=49035

You probably want to look closely at the last post on the first page on how to create a compressed kernel and where to copy it from. There are also examples for the lilo.conf in that thread. Let me know if you need more specific help (actually a current Slackware user could probably help more on the subject (m0r comes to mind)). It's not really distro specific when it comes right down to it though. There is also a Kernel HOWTO on TLDP that appears to be off-line at the moment (there are surely copies of it out there if googled for).

But the best advice I can probably give you is to read the README included with the kernel source. You will find it in the root directory of the extracted kernel directory tree. It's short and really is a must read to also make sure you have all the other required packages up to the proper levels.

shuiend
scripter
scripter
Posts: 91
Joined: Mon Apr 28, 2003 8:05 pm

Post by shuiend » Tue Jan 06, 2004 5:50 pm

Ok i followed all the steps in that guide u gave me and it still dosent work. I backed up my old kernel and that boots fine. After i reboot and try what should be the new kernel after doing the make install i check cat /proc/version and it still shows up as 2.4.22. So would you have any clue where i went wrong. I have checked arch/i386/boot and everything seems to be there but i am not sure what to copy to /boot or i would do it manually.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Jan 06, 2004 6:28 pm

Did you read the README file in the kernel source root directory? If you built the kernel with "make bzImage" then there should be a file called "bzImage". Copy that to /boot and add a LILO entry for it in /etc/lilo.conf and rerun lilo:

Code: Select all

# /sbin/lilo
The bzImage file *is* the kernel (along with it's associated module files if you built it as a modular kernel and did a "make modules_install"). You can actually rename the kernel to anything you want when you put it in /boot as long as it matches what you have in your lilo.conf. Just use your existing configuration entry as an example, ending up with two kernel sections. One for your old kernel and one for your new kernel. Give them each a different label and type the label name at the LILO prompt to boot whichever one you want.

shuiend
scripter
scripter
Posts: 91
Joined: Mon Apr 28, 2003 8:05 pm

Post by shuiend » Tue Jan 06, 2004 7:27 pm

Ok thanks that helped me out alot. Thats all i ended up having to do. I didnt know that it could be named anything.

shuiend
scripter
scripter
Posts: 91
Joined: Mon Apr 28, 2003 8:05 pm

Post by shuiend » Tue Jan 06, 2004 7:37 pm

well i just tried it and it did not worked. I had copied ovwer the bzImage and added it to my lilo.conf and upon reboot it just kinda hung. I selected that boot and it start and instead of everything loadning i just got a blank screen. So i am going to try to recompile tommorow when i get soem more free time. Also wheres the edit button? Or can you not edit i wanted to edit my previous post and could not figure out how

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Jan 06, 2004 7:52 pm

The edit button should be right at the top right corner of each message (it is for me). Do you get any messages at all when it tries to boot the new kernel? Did you read the README file in the kernel source root directory?

shuiend
scripter
scripter
Posts: 91
Joined: Mon Apr 28, 2003 8:05 pm

Post by shuiend » Mon Jan 12, 2004 8:31 pm

Ok i followed all the instructions again and recompiled the kernel. I copied the bzImage and added the approriate lines to my lilo.conf file so it would boot off the new image. When i restart and slect the 2.6 kernel is says starting slack2.6 then just stops there. I know it aint booting b/c i tried it before i left for fencing and when i got home it had not moved. So i have no clue whats going on. If any one has a generic 2.6 kernel allready compiled i would like to just try that if it is possible. I just want to see what better about it before i actually upgrade to it and use it full time.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Jan 12, 2004 8:46 pm

When you say you followed all the directions, which directions are you referring to? My kernel compile directions on my site are for 2.4.18/19. If you copy a config file from a 2.4 kernel and use it for a 2.6 kernel I can somewhat expect trouble. I would start with a default config like what the kernel comes with.

It really sounds like you have a misconfigured LILO though and not a bad kernel. You should at least get *some* messages from the kernel. The only place I know of that has precompiled 2.6 kernels is here:

http://people.redhat.com/arjanv/2.5/RPMS.kernel/

Of course you would have to extract the kernel and the modules from the RPM and place in the proper locations (doable).

I think what you are really looking for though is this:
http://kerneltrap.org/node/view/799

shuiend
scripter
scripter
Posts: 91
Joined: Mon Apr 28, 2003 8:05 pm

Post by shuiend » Tue Jan 13, 2004 5:37 am

That sire is nice and i will follow those instructions tonight. I was refering to the other site you gave me though about which instructions i followed. I am hesitant to try again because on that site it seemed to say nvidia drivers dont workl yet. As i do alot of gaming if my vid drivers aint there, their is no reaosn for me to upgrade.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Jan 13, 2004 11:43 am

Sounds to me like you really don't have any good reason to switch to 2.6 at the moment. I only upgraded on one of my machines. My main desktop and laptop are not going to get an upgrade until Fedora includes 2.6 in the distro and there are nVidia drivers for it.

Post Reply