LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-22-2004, 06:03 PM   #1
tek1024
Member
 
Registered: Sep 2003
Posts: 49

Rep: Reputation: 15
Question Kernel compile trouble


mkinitrd tells me that I haven't compiled a certain module in when, in fact, I have, and I have no idea what to do about it or where to go from here. This is my first time compiling a kernel by hand, so help me find any errors in my methods here. Going on the information in Digital Kermit's Kernel-Build-HOWTO, I performed the following:

Downloaded "linux-2.6.8.1.tar.bz2", "patch-2.6.9-rc2.bz2", "patch-2.6.9-rc2-bk7.bz2" from kernel.org.

$ tar jxf linux-2.6.8.1.tar.bz2
$ cd linux-2.6.8.1

[moved patches to linux-* dir, bunzip2'd them]

$ patch -p1 <../patch-2.6.9-rc2
$ patch -p1 <../patch-2.6.9-rc2-bk7

This, I suspect, may be part of the problem: I don't know the difference between a prepatch and a snapshot for purposes of kernel compilation, and specifically whether or not to use one or the other, or both.
[working directory now /home/mike/linux-2.6.8.1]

$ make mrproper
$ make xconfig

Now, here I configured everything as I thought it should have been. I can post my "./.config" file for you if need be, but specifically, note that it ends up with the following lines specifically enabled:

Code:
#
# SCSI low-level drivers
#
CONFIG_BLK_DEV_3W_XXXX_RAID=m
CONFIG_SCSI_3W_9XXX=m
CONFIG_SCSI_ACARD=m
CONFIG_SCSI_AACRAID=m
CONFIG_SCSI_SATA=y
CONFIG_SCSI_SATA_VIA=y
CONFIG_SCSI_QLA2XXX=y
Notice especially the second-to-last: SATA_VIA is set, but is not compiled as a module ('m').

$ make bzImage && make modules
# make modules_install
# /sbin/mkinitrd initrd-2.6.8.1.img 2.6.8.1
No module sata_via found for kernel 2.6.8.1, aborting.

So. I can compile a kernel, and its modules, and everything goes off without a hitch even installing everything, but I cannot create a RAMdisk for the life of me. Any ideas?

Thanks for your time,
Michael
 
Old 09-22-2004, 06:57 PM   #2
amosf
Senior Member
 
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672

Rep: Reputation: 46
you wrote:
-------------------------------------------------
$ make bzImage && make modules
# make modules_install
# /sbin/mkinitrd initrd-2.6.8.1.img 2.6.8.1
No module sata_via found for kernel 2.6.8.1, aborting.
-------------------------------------------------

Okay, you have patched this kernel, therefore it is no longer 2.6.8.1 it is now 2.6.9-rc2-bk7
A patch changes the kernel from one versio to another...
also 2.6.9-rc2 is patched against 2.6.8 (due to an error in 2.6.8 - confusing huh) so you should download the 2.6.8.1 patch and do a very small reverse patch ie:

$ patch -Rp1 <../patch-2.6.8.1

So the full patch would be:

$ patch -Rp1 <../patch-2.6.8.1
$ patch -p1 <../patch-2.6.9-rc2
$ patch -p1 <../patch-2.6.9-rc2-bk7

when finished it is a 2.6.9-rc2-bk7 kernel and the modules will be in

/lib/modules/2.6.9-rc2-bk7

I usually rename the main source directory to the correct name as well so I don't get confused so rename /usr/src/2.6.8.1 to /usr/src/2.6.9-rc2-bk7 and so forth

the mkintrd line would have to be

# /sbin/mkinitrd initrd-2.6.9-rc2-bk7.img 2.6.9-rc2-bk7

as that's what the modules are now known as... That should be right for you, I think

I'm running 2.6.9-rc2 BTW and haven't used any of the rc2-bk kernels yet...

Last edited by amosf; 09-22-2004 at 07:00 PM.
 
Old 09-22-2004, 07:17 PM   #3
amosf
Senior Member
 
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672

Rep: Reputation: 46
Just re-reading the post and thinking... Maybe it's more than this, but let us know how you go... Also if you don't specifically need bk7 you could try the straight rc2 or other snapshots as at time the various snapshots can be broken...

The way it works is that 2.6.9-rc2 is a release candidate, and then any errors or improvements are added to that and each day a bk release is automatically generated to give the 2.6.9-rc2-bk7 etc.

then you may get a new release candidate like 2.6.9-rc3 and eventually the full 2.6.9 kernel will be released.

the rc2 and rc3 and 2.6.9 kernel will be batched against 2.6.8 (not 2.6.8.1) and the bk patches are against the particular rc patch - so you got that bit right

Also you don't HAVE to have an initrd. Since I compile and change kernel so much I don't usually use one and just compile all the root filesystems and such into the kernel...

Have you tried actually booting this kernel? Do you have the filesystems comiled in or as modules?
 
Old 09-23-2004, 02:30 AM   #4
tek1024
Member
 
Registered: Sep 2003
Posts: 49

Original Poster
Rep: Reputation: 15
Thank you for your help! And so timely! Very good. I did what you said, from scratch, this time using *-bk8 instead of 7.

Quote:
Maybe it's more than this, but let us know how you go...
I recompiled it and everything was allright except I got the same problem, so I did a Google for the exact command line error ("No module sata_via found for kernel") and, just when I was ready to give up, I found a post about 50 down on RedHat's Bugzilla server (#118000)* in which Jeremy Katz gave the advice to a person in a similar situation to pass "--omit-scsi-modules" to mkinitrd. I did so, and it worked fine. I installed (copied) bzImage and initrd, as well as System.map (renaming it) to /boot, then rebooted.

Quote:
Also you don't HAVE to have an initrd.
This is, admittedly, news to me.

Quote:
Since I compile and change kernel so much I don't usually use one and just compile all the root filesystems and such into the kernel...

Have you tried actually booting this kernel? Do you have the filesystems comiled in or as modules?
Do you mean that you can mount filesystems natively? See, I'm really not clear on why one needs a RAMdisk at all, unless you have a catch-22 situation. I have ext3 (and ext2) compiled in the kernel, is that what you're asking?

My only problem now is that when I booted up, I couldn't get sound working; since this is a Realtek AC'97 audio thing (via_82xx, I believe is the module), I compiled in VIA chipsets and (now on the second run of the day) am loading EVERYTHING else under ALSA as a module (I had deselected them so I wouldn't have to worry with them at all).

I'll post here to say how it went.

* That link is here.
 
Old 09-23-2004, 02:49 AM   #5
tek1024
Member
 
Registered: Sep 2003
Posts: 49

Original Poster
Rep: Reputation: 15
Well, that didn't work to enable the sound, I don't know what else to try but it's ten till four in the morning here, and I've class in the morning. It was, nonetheless, a great learning experience, and I'm sure it's something that will improve as time goes on (I'll chalk it up to new hardware, IOW). Still, if there's any ideas:

$ alsamixer
No mixer elems found

Be well,
Michael
 
Old 09-26-2004, 05:12 PM   #6
tek1024
Member
 
Registered: Sep 2003
Posts: 49

Original Poster
Rep: Reputation: 15
Possible Solution!

Taking a cue from this site (http://alsa.opensrc.org/index.php?page=TroubleShooting), I compiled ALSA and SATA_VIA drivers as modules instead of into the kernel. Went off without a hitch with 2.6.9-rc2-bk12. So there we go. Trying this next.

Last edited by tek1024; 09-26-2004 at 05:20 PM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
compile error for kernel 2.6.11.7 on slack 10.1 nvidia trouble salviadud Slackware 20 04-19-2005 05:39 AM
2.6.10 compile trouble sh4d0w331 Slackware 6 02-20-2005 05:10 PM
compile trouble with vanilla kernel. zaicheke Linux - General 1 12-24-2004 03:46 PM
Trouble with newb kernel compile vortical Linux - General 5 03-02-2004 10:23 AM
Webcam compile trouble lazerh Linux - General 1 10-31-2001 08:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:29 PM.

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