943,860 Members | Top Members by Rank

Ad:
Aug 7th, 2009
0

The basics about kernel compiling?

Expand Post »
I've been running a linux box with a quad core for nearly a year now. I've managed to make work most of everything I set my mind to except for one very important thing: the four cores. As I gather, I would need to compile my kernel with "the right options" and then I could avoid seeing my computer hang with only 26-27% CPU usage... So I wonder what those right options are, and where do I find them, and what do I need to know to find them. I basically need someone to point me in the right direction so I can avoid destroying my OS, since its a risk to take if I try to compile. I hear a lot about tweaking, but haven't found anything really clear on that topic either.

Thanks in advance.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Garrosh is offline Offline
5 posts
since Apr 2009
Aug 7th, 2009
0

Re: The basics about kernel compiling?

There is a chance that your kernel along with all your libraries are running in "i686" mode, so when you have build your new kernel your libs would not work (properly)
Do you have a /lib64 ?
maybe you like to have fun with linux and learn a few bits: www.linuxfromscratch.org
Reputation Points: 11
Solved Threads: 1
Newbie Poster
UndiFineD is offline Offline
15 posts
since Jun 2009
Aug 9th, 2009
0

Re: The basics about kernel compiling?

I am running a 64 bit OS since my chip is native 64 bit. Its AMD, by the way. So I do have a /lib64, and a very smal /lib. What I currently have running is some pretty standard Mandriva setup, I guess. I've started to read that link you gave me, and I am really impressed. It seems that the task of using my four cores is more complex than I expected, but building from scratch would let me do this and streamline my system as well, wich is awesome. Thanks!

It might be important to specify that due to issues with SATA2 and DVDs (i could elaborate) I installed a very basic install from a dual arch CD. It was the only way I could find to install a 64 bit system on my box. I then proceeded to insall everything I need, including KDE 4. I am fairly satisfied with what I've done so far since everything works as I like, but for my 3 other cores. I will probably build from scratch to remove all the spam my explorations may have put on my hard drive, but I would like confirmation that I can't just install something or run a script that would just fix everything
Last edited by Garrosh; Aug 9th, 2009 at 4:08 pm. Reason: Aditionnal information
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Garrosh is offline Offline
5 posts
since Apr 2009
Aug 9th, 2009
0

Re: The basics about kernel compiling?

well it is good to hear you like it. lfs is a great way to expand your knowledge.
but in your case a different kernel would solve your immediate issue.

in a shell type 'uname -a' to get your current running kernel info

download the following kernel package that is the same as your current kernel:
http://www.kernel.org/pub/linux/kern...6.30.4.tar.bz2
is the current latest 'stable'
you may need a new copy of linux-headers too.

/usr/src/linux is a symlink to your kernel source tree.
if not there? 'ln -s linux-source-2.6.30 linux'
go there and type: 'make mrproper'

copy your current running kernel config file /boot/config* to /usr/src/linux
rename the copied config* file to /usr/src/linux//.config

and follow the guide: README
Reputation Points: 11
Solved Threads: 1
Newbie Poster
UndiFineD is offline Offline
15 posts
since Jun 2009
Aug 10th, 2009
0

Re: The basics about kernel compiling?

So a kernel update would fix my problem you think? I do have 2.6.29.6 running, and checked my .config file, and its apparently setup to use all four... Oh, wait, I think I get it. What you just gave me are the few simple steps to compile the newest kernel on my system, right? So it doesn't need fancy options and I just have to carry over my .config file?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Garrosh is offline Offline
5 posts
since Apr 2009
Aug 10th, 2009
0

Re: The basics about kernel compiling?

well, this way you can check if all the kernel settings are right,
if you need changes you can make them,
if you want to upgrade the kernel, be my guest.
maybe there are patches floating around the internet you may need, etc
processor tweaks, ramdisk size, better support for your hardware,
network stack, etc

and the lfs part can be done in a virtual machine like qemu :-)
Reputation Points: 11
Solved Threads: 1
Newbie Poster
UndiFineD is offline Offline
15 posts
since Jun 2009
Aug 10th, 2009
0

Re: The basics about kernel compiling?

When you say I can check if all the kernel settings are right, do you mean by trial and error? Because there sure are lots of them in the .config file. I have no idea some of them mean, but I guess I could figure it out. The patches you mentionned, are they kernel patches? If so would one be required to get my 4 cores working? I'm asking this because I've never compiled my kernel, see. I've only installed the precompiled versions for AMD x86_64 architectures. I'm starting to get the feeling the precompiled stuff is far from perfect, so LSF would allow me to make it so. However, would it resolve my outstanding issue if I just compile my kernel? From what you tell me, it might. And from what you also told me, compiling the kernel isn't anything really fancy, I just have to make sure I carry over my old .config file, then make changes to it as needed. Did I understand everything? If yes, then this situation is solved!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Garrosh is offline Offline
5 posts
since Apr 2009
Aug 11th, 2009
0

Re: The basics about kernel compiling?

the guide is in
/usr/src/linux/README
if you taken the steps I showed you before
all you have to type now is
'make menuconfig'

patches can be found on the ftp of kernel.org
but the kernel image by itself is usually good enough
it may be that mandrake / mandriva added a couple of patches of themselves
but even those end up in the kernel eventually
(when those patches are good enough)
Last edited by UndiFineD; Aug 11th, 2009 at 7:26 am.
Reputation Points: 11
Solved Threads: 1
Newbie Poster
UndiFineD is offline Offline
15 posts
since Jun 2009
Aug 12th, 2009
0

Re: The basics about kernel compiling?

All right, I did the make menuconfig thing, and there a quite a lot of kernel options to swich through. I don't know if I can sort through all of them, but slowly I'll work my way through them. The LSF site is very helpful to get me the information I need to pick the right options. Thanks a bunch!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Garrosh is offline Offline
5 posts
since Apr 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Linux Kernel and Hardware Setup Forum Timeline: Home directory not found
Next Thread in Linux Kernel and Hardware Setup Forum Timeline: How to connect Internet Using USB CDMA modem in Ubuntu





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC