LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-01-2004, 03:58 PM   #1
0ddba11
Member
 
Registered: Nov 2004
Location: Derby - UK
Distribution: Ubuntu at Home, RedHat Enterprise at Work
Posts: 46

Rep: Reputation: 15
Question Problems recompiling 2.6.8 kernel in sarge


Hello all!

I'm ruunung sarge with 2.6.8-1 kernel and I'm still trying to cook a new kernel for my Dell X300, but it seems every time I cook one and install it, I always get FATAL errors on boot and it's always because it can't find modules, the latest one only complains that it can't find ide_generic (and one other which I think was sr_mod) and sure enough it isn't in /lib/modules/KERNELVERSION/kernel/drivers/ide

Why is it that even though I am telling it to compile generic ide support the modules aren't there???

To build my kernel I'm doing:

cd /usr/src/linux
make-kpkg clean
make xconfig
make-kpkg -rev=x300-a04-1 kernel_image

Then I install my new kernel package and cd to /boot and do a mkinitrd IMAGENAME

I check grub is happy and try booting into the new kernel and when it tries to load any modules it complains that the path or file name doesn't exist, am I missing something REALLY stupidly obvious?

Still trying though!

Thanks,
 
Old 12-01-2004, 05:25 PM   #2
Ninja Cow
Member
 
Registered: May 2003
Location: Pensacola, Florida
Distribution: Debian, Slackware, Amigo, Ubuntu
Posts: 221

Rep: Reputation: 30
From what I understand here you need to make an initrd.

Code:
make-kpkg --initrd --append-to-version=-mykernelname kernel_image
 
Old 12-02-2004, 04:04 AM   #3
0ddba11
Member
 
Registered: Nov 2004
Location: Derby - UK
Distribution: Ubuntu at Home, RedHat Enterprise at Work
Posts: 46

Original Poster
Rep: Reputation: 15
I have been making an initrd.img.

I THINK, I may have sussed the problem, I'm cooking one as I type, will let you know the outcome.
 
Old 12-03-2004, 02:28 AM   #4
TLV
Member
 
Registered: Jun 2004
Distribution: Ubuntu
Posts: 185

Rep: Reputation: 30
I think you are forgetting to actually compile the modules:

Code:
make-kpkg --initrd --revision=something-0.1 kernel_image modules_image
/TLV
 
Old 12-03-2004, 04:57 PM   #5
0ddba11
Member
 
Registered: Nov 2004
Location: Derby - UK
Distribution: Ubuntu at Home, RedHat Enterprise at Work
Posts: 46

Original Poster
Rep: Reputation: 15
It's strange because I was compiling generic ide support into the kernel rather than having it as a module. I finished cooking one where I specified generic ide support as a module instead and it worked, but then still got fatal errors on sr_mod (which I understand is SCSI cdrom support) so I cooked another specifying SCSI cdrom support as a module but wasn't so lucky this time, it still failed.

I'm just wondering whether this is some kind of bug, since why would it be looking to load the generic_ide module when I compiled it directly into the kernel?

None of the kernel compile guides for Debian mention the modules_image option, and a bit of googling suggests that is only needed for external modules

Anyway, I will try your modules_image option and see what happens

Thanks for the help so far though!

Last edited by 0ddba11; 12-03-2004 at 05:03 PM.
 
Old 12-03-2004, 05:54 PM   #6
0ddba11
Member
 
Registered: Nov 2004
Location: Derby - UK
Distribution: Ubuntu at Home, RedHat Enterprise at Work
Posts: 46

Original Poster
Rep: Reputation: 15
Well, I'm afraid that didn't work, it did however compile my ipw2100 module (once I'd enabled crypto support)

So what I'm doing right now (to test that I'm not going completely mad is compiling a kernel from the config file of my current working kernel using the command:

make-kpkg --initrd --append-to-version=tester kernel_image

And if this doesn't work then theres something very wrong somewhere because it's the same kernel!

More later...
 
Old 12-03-2004, 08:47 PM   #7
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,248

Rep: Reputation: 79
The modules should be created without the "modules_image" option. After you create the kernel deb package with the "initrd" option, you should not have to run "mkinitrd" manually either. When you install the kernel deb package you create, it automatically creates the initrd image and modules directories for the new kernel.

Last edited by m_yates; 12-04-2004 at 08:14 AM.
 
Old 12-04-2004, 02:06 AM   #8
TLV
Member
 
Registered: Jun 2004
Distribution: Ubuntu
Posts: 185

Rep: Reputation: 30
Are you using the vanilla 2.6.8.1 kernel or the Debian source? If you're using the Debian source, have you tried to compile it with the supplied .config (using the command I proposed - it always works for me)? Does it work?

/TLV
 
Old 12-04-2004, 08:22 AM   #9
0ddba11
Member
 
Registered: Nov 2004
Location: Derby - UK
Distribution: Ubuntu at Home, RedHat Enterprise at Work
Posts: 46

Original Poster
Rep: Reputation: 15
Update

First to answer your question, I am using debian source.

I started from the beginning using the working kernel which worked fine.

Then I changed the CPU Type to Pentium M which still worked.

Then I trimmed down the Ethernet drivers and some file system drivers and got the following:

"Kernel panic: VFS: Unable to mount root fs on xxx"

So clearly I'm removing something I should be

I've read somewhere that this can be caused by devfs in PSEUDO file system types, but I think that may only apply to 2.4 kernels as I belive devfs is now gone (but could be very wrong!)

Bottom line is, I think I have to be patient and not take out too many options at once, but it's so tempting to try and reduce compile time.

So, I'm off to give my laptop another work out and compile yet another kernel, perhaps this time I'll just concertrate on my CPU and ACPI stuff which is what I originally set out to acheive.

More later
 
Old 12-04-2004, 12:01 PM   #10
shmonkey
Member
 
Registered: Nov 2004
Location: UK
Distribution: Ubuntu
Posts: 118

Rep: Reputation: 15
The kernel panic you mentioned is because you did not have your root file system compiled into your kernel.
e.g. if your root fs is reiserfs make sure you have reiserfs supoort in the kernel.

You can have it compiled as modules if you use initrd, personally I do not see much point in using initrd if you are compiling your own kernel.

Regards

Shmonkey
 
Old 12-04-2004, 04:28 PM   #11
TLV
Member
 
Registered: Jun 2004
Distribution: Ubuntu
Posts: 185

Rep: Reputation: 30
Quote:
Originally posted by shmonkey
The kernel panic you mentioned is because you did not have your root file system compiled into your kernel.
e.g. if your root fs is reiserfs make sure you have reiserfs supoort in the kernel.
I agree. Search this forum (e.g. for initrd) to find several threads regarding this issue.

/TLV
 
  


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
Problems recompiling kernel in SUSE lalo_5_2000 Linux - Newbie 2 12-31-2004 09:36 PM
problems after recompiling the kernel hubabuba Linux - General 13 09-29-2004 07:54 PM
Problems recompiling kernel after success on other systems snl54 Linux - General 8 08-12-2004 11:06 AM
kernel 2.6.5 recompiling problems c31c Slackware 20 04-29-2004 04:56 PM
Problems recompiling a new kernel Soma Debian 3 09-20-2003 09:46 PM

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

All times are GMT -5. The time now is 04:48 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