LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 09-30-2003, 06:46 AM   #1
twinkers
Member
 
Registered: Aug 2003
Distribution: Debian Sid
Posts: 153

Rep: Reputation: 30
What use does recompiling the kernel have?


I'm reading about recompiling quite a lot. I'm running 2.4.22-1-386 on my old PI Sid box (which you all have seen me fighting with ) and I'm wondering what use it would have to recompile it (or on any system) This old box is mainly for learning and finding out solutions for problems where I will run in when migrating to my main box. I like to learn it, but learning something with no use is pointless I guess. Is it something you have to do?

And if so, does anyone have the link to the step-by-step recomiling thread I read a few days ago? I can't find it anymore using search (it wasn't debian specific I think, does that matter?)
 
Old 09-30-2003, 06:55 AM   #2
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
recompiling the kernel has it's uses, like removing everything you don't need. (I don't use firewire -> no support for firewire in my kernel). It gets smaller that way and loads faster. Also, I don't use modules, so when I compile linux I can have it exactly the way I want it to be.
 
Old 09-30-2003, 07:03 AM   #3
guygriffiths
Member
 
Registered: Jun 2003
Location: Reading, UK
Distribution: Debian 3.0, LFS
Posts: 524

Rep: Reputation: 37
You generally only need to recompile the kernel for specific reasons. If you don't know if you need to do it, then you probably don't.
The kernel needs recompiling to enable extra features into it. As an example, the reasons I have recompiled mine are:
To add USB support
To use DRI, which is basically hardware support for 3D cards
To add support for a dial-up modem
To optimise it for my CPU (Athlon)
To get automounting on CDROM and floppy drives
To upgrade to a new kernel version
Having said that, you will probably run into some reason to recompile it sooner or later, but until then, there's no real point.

It doesn't matter which distro you are using, recompiling the kernel is pretty much the same wherever you are.

There should be a step by step guide to installing the kernel in the INSTALL, or README file in the kernel source directory.
It's fairly straightforward - the tricky bit is choosing which options you need to make it work. ALWAYS back up your original kernel, or even better, don't write over the old one.
Once you've compiled a kernel, there will be file named arch/i386/boot/bzImage, which you copy to /boot/vmlinuz (normally). I recommend that you copy it to a different name, such as /boot/vmlinuz.dri (for example if you were compiling a new kernel with dri support) and add a new entry to /etc/lilo.conf (you can copy the old entry, and change the label and the path to vmlinuz). Then run lilo and reboot. Then if it all goes wrong, you can simply pick the old kernel and start again.
Hope that helps
Guy
 
Old 09-30-2003, 07:03 AM   #4
twinkers
Member
 
Registered: Aug 2003
Distribution: Debian Sid
Posts: 153

Original Poster
Rep: Reputation: 30
Well I guess on my PI a lot of stuff can be cut out. Where to start?
 
Old 09-30-2003, 07:21 AM   #5
m9dhatter
LQ Newbie
 
Registered: Jun 2003
Posts: 20

Rep: Reputation: 1
kernel how-to

http://www.tldp.org/HOWTO/Kernel-HOWTO/

everything you need to know and more.
 
Old 09-30-2003, 07:43 AM   #6
twinkers
Member
 
Registered: Aug 2003
Distribution: Debian Sid
Posts: 153

Original Poster
Rep: Reputation: 30
Thanx, the extra label is a very good pointer. I'm trying to get as much out as I can so having one that will work is probabl needed!
So will can it vmlinuz.lite and have an extra lilo option created.

Regards
 
Old 09-30-2003, 08:59 AM   #7
guygriffiths
Member
 
Registered: Jun 2003
Location: Reading, UK
Distribution: Debian 3.0, LFS
Posts: 524

Rep: Reputation: 37
Yep, but you NEED to run lilo as root before restarting, otherwise it just won't work
 
Old 10-04-2003, 12:20 PM   #8
Kroenecker
Member
 
Registered: May 2003
Location: The States
Distribution: Gentoo
Posts: 245

Rep: Reputation: 30
I think this is what you want

http://www.osnews.com/story.php?news_id=2949

By the way by using google and the words debian kernel compile, I was able to find it

Good luck. Not hard to do at all!
 
Old 10-06-2003, 10:46 AM   #9
pe2338
Member
 
Registered: Dec 2002
Location: Bucharest,RO
Distribution: debian etch, sarge and sid
Posts: 407

Rep: Reputation: 30
Talking smarter

If you are using debian there is a goodie : make-kpkg

I made about 5 versions of 2.4.21 kernel just for the kicks of using it.....

You could say I am screwed up and you might be right....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
recompiling kernel DaveyB Linux - Newbie 3 08-10-2004 09:45 AM
can i compile just one kernel module whithout recompiling the whole kernel? edman007 Linux - Software 3 02-17-2004 03:05 PM
What does recompiling the kernel do? direwolf20 Linux - Newbie 2 10-08-2003 12:06 AM
Recompiling kernel ina Linux - General 1 03-05-2003 10:52 AM
recompiling kernel slacknewbie Linux - General 3 05-08-2002 10:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration