-   Linux - Newbie (
-   -   Compiling the Kernel, config hell. (

dataangel 09-05-2004 01:19 AM

Compiling the Kernel, config hell.
I've now tried to compile the kernel several times across several distros. Despite following instructions to the letter it never ever ever works correctly. It always compiles, but something always goes wrong when booting -- it can't mount the root fileystem (even though it's compiled directly into the kernel), or it can't use DMA mode (even though my chipset and DMA support are both compiled into the kernel), or it can't load certain modules (sometimes that I've told it compile and sometimes that I haven't).

I'm chalking this up to the instructions being old. All of the guides on the net for example have told me to "make dep" which when I do the kernel tells me is no longer needed, so I'm guessing what I'm looking at is out of date.

Now here's the strange thing -- I can copy the config file from the /boot folder that comes with the distro, and use it without any modifications and I still get boatloads of problems (even though the exact same kernel should be produced!).

Where can I find an up to date guide for compiling the kernel? Where can I find one up to date specifically for my distribution (FC2)?

amosf 09-05-2004 01:47 AM

Are you talking a 2.6 kernel? You have the latest modutils?

If so, the 2.6 kernel (to me) is a breeze. Easier than 2.4 kernels. Make dep is no longer needed.

make xconfig
make bzImage
make modules
make modules_install
copy the kernel to /boot, edit lilo, etc

Like you say, you want the root filesystems compiled into the kernel. Read every option in the config carefully. I make light kernels with just the stuff I need.

Obviously the config stage is the key one and sometimes it's trial and error til you get a feel for it. Look out for things like automatic module loading, filesystems, nls & codepages, scsi support (for usb devices), and so forth.

btmiller 09-05-2004 02:22 AM

Hmmm ... are you using an initrd and not getting that set up right. If you are compiling support for everything directly in, you shouldn't need one (but this perhaps is why you are having trouble with distro config files -- a lot of distros use initrds). I've never had that many problems following the procedure amosf followed, even with rc or mm kernels with weird stuff turned on, it all seems to work OK. It would help if you tried again and posted exact problems.

amosf 09-05-2004 03:12 AM

I'm currently runing 2.6.9-rc1-bk6 and been switching to 2.6.9-rc1-mm3 for some testing and there is some weird stuff there but they compile and run okay - so you 'shouldn't' have too many problems compiling a kernel, esp a stable one like 2.6.7 or

But as above I don't use any initrd, so maybe that is a prob in your case...

dataangel 09-05-2004 10:24 PM

How would I set things up so I didn't need initrd? Which distributions don't rely on it out of the box?

All times are GMT -5. The time now is 04:25 PM.