LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-19-2008, 10:15 AM   #1
lifeforce4
Member
 
Registered: May 2003
Location: 2:16:840
Distribution: Slackware, CentOS, RedHat, Xubuntu
Posts: 169
Blog Entries: 1

Rep: Reputation: 32
Why make kernel compiling so confusing?


I was reading tons trying to get an idea since this was going to be my first kernel compiling/upgrading. Why do people make it such a task to try and figure out? Are there added benefits to doing it other then the way I did below?

I edited the .config file with make menuconfig.
Compiled the kernel make
Then set the new kernel make install
The biggest part was going through the config menus trimming off what I did not need. Finally adding a GRUB boot selection in menu.lst for the new kernel.

Thanks,
Kyle
 
Old 06-19-2008, 10:32 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
Which people? There are more than a billion ways to do it other than the way you do it and each way has its benefits.
For example, some people patch the kernel because they want to add a functionality that is not present in the default vanilla one. Some other people may want to use a script like genkernel, because it's quicker. So what are you talking about exactly?
 
Old 06-19-2008, 10:43 AM   #3
ufmale
Member
 
Registered: Feb 2007
Posts: 385

Rep: Reputation: 30
There are some .config in your current linux under /boot/
I usually copy .config and extend from there.
 
Old 06-19-2008, 11:12 AM   #4
lifeforce4
Member
 
Registered: May 2003
Location: 2:16:840
Distribution: Slackware, CentOS, RedHat, Xubuntu
Posts: 169
Blog Entries: 1

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Agrouf View Post
Which people? There are more than a billion ways to do it other than the way you do it and each way has its benefits.
For example, some people patch the kernel because they want to add a functionality that is not present in the default vanilla one. Some other people may want to use a script like genkernel, because it's quicker. So what are you talking about exactly?
Yeah the patching was the next thing I was going to check out. Right now I just did a basic 2.6.25 kernel and will attempt to add the .6 patch. What I was going on about is you do a google search, read forums, do what ever and no one just said how to do a basic upgrade of a kernel. I was just really surprised it was as simple as a normal compiling and installing of another application.

I guess the whole "kernel compiling is difficult" mind set and things people say made me expect something more and go on a wild search for what was not there.

I'm glad I finally figured it out and stopped the search. :-)

Quote:
Originally Posted by ufmale
There are some .config in your current linux under /boot/
I usually copy .config and extend from there.
The setup I have is a basic debian install so the config is not fully configured. I probably could have saved some time by going though its .config instead of a new one.

Kyle
 
Old 06-19-2008, 11:26 AM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
Quote:
Are there added benefits to doing it other then the way I did below?
The advantages of having packages rather than files here and there that you forget to remove when uninstalling, handling versions,..
 
Old 06-19-2008, 11:40 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
I always start with "make oldconfig" before "make menuconfig" to start with the the options of the current running kernel. If you are compiling a newer version, you will be prompted for any newer features. Some options I might leave alone simply because I don't understand an item well enough.
 
Old 06-19-2008, 12:22 PM   #7
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
Quote:
Agrouf

Which people? There are more than a billion ways to do it other than the way you do it and each way has its benefits.

For example, some people patch the kernel because they want to add a functionality that is not present in the default vanilla one. Some other people may want to use a script like genkernel, because it's quicker.

Well you listed two ways, could you please list the other 999,999,998 ways for us.
 
Old 06-19-2008, 12:37 PM   #8
DragonM15
Member
 
Registered: Sep 2003
Location: USA
Distribution: Slackware (Multiple Versions)
Posts: 455

Rep: Reputation: 31
Quote:
Originally Posted by lifeforce4 View Post
What I was going on about is you do a google search, read forums, do what ever and no one just said how to do a basic upgrade of a kernel.
There are lots of sites that go over a basic upgrade/compiling of a kernel. It is just a little bit complicated to go over one, because you know SOMEONE is going to follow the "basic" upgrade and take it as 100% and end up compiling their kernel with an unknown config most likely for a kernel version they are most likely not using. If that makes any sense.

DragonM15
 
Old 06-19-2008, 01:44 PM   #9
lifeforce4
Member
 
Registered: May 2003
Location: 2:16:840
Distribution: Slackware, CentOS, RedHat, Xubuntu
Posts: 169
Blog Entries: 1

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by nx5000 View Post
The advantages of having packages rather than files here and there that you forget to remove when uninstalling, handling versions,..
Now that makes sense to have a cleaner way of doing it. Guess either have the latest kernel or the latest kernel package(which might be a few kernels back). Am I correct thinking this way?

Quote:
Originally Posted by jschiwal View Post
I always start with "make oldconfig" before "make menuconfig" to start with the the options of the current running kernel. If you are compiling a newer version, you will be prompted for any newer features. Some options I might leave alone simply because I don't understand an item well enough.
Thats what I thought oldconfig did but was not sure since I just did a standard install and never really configured the kernel before. From now on I will. :-)



Quote:
Originally Posted by DragonM15 View Post
There are lots of sites that go over a basic upgrade/compiling of a kernel. It is just a little bit complicated to go over one, because you know SOMEONE is going to follow the "basic" upgrade and take it as 100% and end up compiling their kernel with an unknown config most likely for a kernel version they are most likely not using. If that makes any sense.

DragonM15
Sorry you kind of lost me on that... you mean they compiling 2.6.25 from a .config that was setup for say 2.6.18? If thats what you mean I guess I understood lol other wise, I probably am just like everyone your talking about. ;-)

Thanks for the replies,
Kyle
 
Old 06-19-2008, 02:31 PM   #10
DragonM15
Member
 
Registered: Sep 2003
Location: USA
Distribution: Slackware (Multiple Versions)
Posts: 455

Rep: Reputation: 31
Quote:
Originally Posted by lifeforce4 View Post
Sorry you kind of lost me on that... you mean they compiling 2.6.25 from a .config that was setup for say 2.6.18? If thats what you mean I guess I understood lol other wise, I probably am just like everyone your talking about. ;-)
Yeah, that was exactly what I meant. Sorry, I'm kinda tired.

DragonM15
 
Old 06-20-2008, 02:42 AM   #11
lifeforce4
Member
 
Registered: May 2003
Location: 2:16:840
Distribution: Slackware, CentOS, RedHat, Xubuntu
Posts: 169
Blog Entries: 1

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by DragonM15 View Post
Yeah, that was exactly what I meant. Sorry, I'm kinda tired.

DragonM15
Ok glad to clear that up. :-) thanks for the pointer on why things are the way they are.
 
Old 06-20-2008, 03:21 AM   #12
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
Quote:
Guess either have the latest kernel or the latest kernel package(which might be a few kernels back).
Package everything. I got so used to it that now, I really hate "make install" which usually doesn't have a make uninstall. A bit like on windows where you end up with so many dlls in system32 and you have no clue where they come from.

My comment was more general, for the kernel it's easier as it should only install in seperate directories.

For debian, latest kernel packages:
2.6.26-rc6
Last one has been packaged today (a week after kernel.org release).
http://wiki.debian.org/DebianKernel
 
Old 06-20-2008, 04:33 AM   #13
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
Quote:
Originally Posted by nx5000 View Post
Package everything. I got so used to it that now, I really hate "make install" which usually doesn't have a make uninstall. A bit like on windows where you end up with so many dlls in system32 and you have no clue where they come from.
Not only that, but you can also overwrite files that belongs to other packages and suppress them with make uninstall when you should not, or you can uninstall that is a dependancy for another package and make the other package no longer work correctly. The package manager is definitely a better way to manage your packages.
One or two packages installed by make install is no great pain, especially the kernel and provide more flexibility, but it should be an exception and the rule should be to use the package manager. To get the best of both worlds, just get yourself a distro that has portage, which is the best package manager I've ever seen in my life for linux.
 
Old 06-20-2008, 05:21 AM   #14
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Each one has his/her own ways.

I, for one, maintain it in my home, because I find that having to be logged as root to compile your kernel is just stupid, unnecessary, and a pain. Additionally, this allow me to:
  1. download only the patchlevels, which means 7kb vs. 40-50mb, do you want more?
  2. ease to handle my custom patches, I don't have to put manually stuff on system folder
  3. I can configure and compile as user, I only need to be root to "make install modules_install", which is why su -c exists
  4. I don't idiotically add fragmentation to my root filesystem, the kernel tree is not an easy piece of cake in which regards fragmentation

For those having a binary distro, probably this would be a hassle. For me it's just perfect.
 
  


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
Cannot make bzImage after compiling 2.6.20.1 kernel athenian200 Linux - Kernel 3 03-03-2007 04:40 AM
Compiling Kernel for Dazuko - make error timmywo Linux - General 2 03-28-2005 04:55 PM
Problems compiling kernel 2.6.8.1 (make bzImage) omegaworks Linux - General 3 08-18-2004 07:54 PM
stuck compiling kernel: make modules_install arpi Linux - General 2 03-20-2004 10:52 PM
make errors while compiling a kernel naild2thefloor *BSD 4 02-28-2004 04:43 PM


All times are GMT -5. The time now is 08:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration