LinuxQuestions.org
Visit Jeremy's Blog.
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 05-02-2007, 02:45 PM   #1
PaulyWally
Member
 
Registered: Jun 2006
Distribution: Ubuntu
Posts: 31

Rep: Reputation: 15
Question Compiling Kernel - No module image


This is my very first time compiling a kernel. So I'm surprised I made it this far.

Debian Sarge - Going from 2.4.27 to 2.6.21.

Everything seemed fine through the menuconfig. I compiled it using:

Code:
time make-kpkg -revision 2.6.21.1 kernel_image kernel_headers modules_image
I am only left with a headers image and an image image.

Aren't I supposed to have a modules image?
 
Old 05-02-2007, 02:53 PM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
You didn't specify kpkg to build you one
 
Old 05-02-2007, 02:58 PM   #3
PaulyWally
Member
 
Registered: Jun 2006
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Dutch Master
You didn't specify kpkg to build you one
Hmmmmmm... I thought that's what the modules_image option did at the end of my make-kpkg statement.

OK... back to the docs.
 
Old 05-02-2007, 03:05 PM   #4
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Hold it, search for the image in the /usr/src/modules dir. Or maybe somewhere else...
 
Old 05-02-2007, 03:14 PM   #5
PaulyWally
Member
 
Registered: Jun 2006
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Dutch Master
Hold it, search for the image in the /usr/src/modules dir. Or maybe somewhere else...
I have no /usr/src/modules dir. And the file is nowhere on the hard drive.

Now I'm confused. Is my make-kpkg correct?
 
Old 05-02-2007, 03:18 PM   #6
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Hmmm, I'm starting to doubt myself...
 
Old 05-02-2007, 03:21 PM   #7
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by PaulyWally
I have no /usr/src/modules dir. And the file is nowhere on the hard drive.

Now I'm confused. Is my make-kpkg correct?
Leave of the modules_image then you have none to compile if you did they would be in the missing /usr/src/modules directory.
 
Old 05-02-2007, 03:35 PM   #8
PaulyWally
Member
 
Registered: Jun 2006
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by HappyTux
Leave of the modules_image then you have none to compile if you did they would be in the missing /usr/src/modules directory.
I know I selected some module support... so that didn't quite sound right to me. But I figured, what the heck. So I installed the kernel anyway.

(besides, the 2.4 kernel is still installed)

When I select the 2.6 kernel in grub, I get a nasty error during boot:

Code:
kernel panic = not syncing: VFS: Unable to mount root fs on unknown-blank(0,0)
I did a quick google, and it seems like that error is due to selected modules not loading.

Surprise, surprise.

Back to the docs again...
 
Old 05-02-2007, 03:38 PM   #9
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Installed the kernel-package and read the man-page. I wasn't wrong, the modules_image image should be present in the /usr/src/modules dir. If the dir isn't there, the modules_image wasn't build. Try building the images with the --append-to-version option.
 
Old 05-02-2007, 03:47 PM   #10
PaulyWally
Member
 
Registered: Jun 2006
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Dutch Master
Installed the kernel-package and read the man-page. I wasn't wrong, the modules_image image should be present in the /usr/src/modules dir. If the dir isn't there, the modules_image wasn't build. Try building the images with the --append-to-version option.
Thanks. I'm going to uninstall 2.6 kernel and start over with the man pages again. I must have missed something.

Quick question... what's the cleanest way to uninstall the 2.6 kernel? Can't find any info on it.

Thanks again!
 
Old 05-02-2007, 03:57 PM   #11
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by PaulyWally
I know I selected some module support... so that didn't quite sound right to me. But I figured, what the heck. So I installed the kernel anyway.

(besides, the 2.4 kernel is still installed)
I should have been clearer in my reply you have no out of kernel modules to compile that is why you have no directory these are not the same as modules that are in the kernel that you select doing a make menuconfig for example they are for things like wireless network cards that need to be built from out of kernel tree source each time you upgrade your kernel. This is why the command and directory exists if any modules needed to be built are in the directory then the modules_image command automatically builds them for you to install.
Quote:
When I select the 2.6 kernel in grub, I get a nasty error during boot:

Code:
kernel panic = not syncing: VFS: Unable to mount root fs on unknown-blank(0,0)
I did a quick google, and it seems like that error is due to selected modules not loading.

Surprise, surprise.

Back to the docs again...
This indicates that you have left out the support (selected as a y for builtin) for either your chipset on the motherboard or the filesystem you are using maybe even both of them. Now if you included them as selected m for loadable module then you needed to use --initrd in the command when building your kernel to have the initrd built so you can load the modules before anything tries to access your / partition. BTW there is a whole lot of changes going from a 2.4 to 2.6 kernel you may want to try using 2.6.8 kernel that if I recall correctly should be available to you from Debian this way you should get the necessary packages changes made to the install to enable you to boot a 2.6 kernel then try the new compile with the 2.6.21.
 
Old 05-02-2007, 04:03 PM   #12
PaulyWally
Member
 
Registered: Jun 2006
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by HappyTux
I should have been clearer in my reply you have no out of kernel modules to compile that is why you have no directory these are not the same as modules that are in the kernel that you select doing a make menuconfig for example they are for things like wireless network cards that need to be built from out of kernel tree source each time you upgrade your kernel. This is why the command and directory exists if any modules needed to be built are in the directory then the modules_image command automatically builds them for you to install.


This indicates that you have left out the support (selected as a y for builtin) for either your chipset on the motherboard or the filesystem you are using maybe even both of them. Now if you included them as selected m for loadable module then you needed to use --initrd in the command when building your kernel to have the initrd built so you can load the modules before anything tries to access your / partition. BTW there is a whole lot of changes going from a 2.4 to 2.6 kernel you may want to try using 2.6.8 kernel that if I recall correctly should be available to you from Debian this way you should get the necessary packages changes made to the install to enable you to boot a 2.6 kernel then try the new compile with the 2.6.21.
That makes much more sense. Thanks! Will do!

Tomorrow's project.
 
Old 05-02-2007, 04:35 PM   #13
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Debian Sarge - Going from 2.4.27 to 2.6.21.
From where I sit, it would be a lot better if you upgraded to Etch before trying to go to 2.6.21. In any case, here is the page I use as a guideline for building Debian kernels. After downloading the stuff required, I just make a shell script to do it for me and I don't even type the make stuff anymore.

See section 7.1.1. And yes, this method still works, even though it has been dropped from the debian.org pages.

http://freesf.tnc.edu.tw/docs/debian...nel.zh-tw.html

My remakeit.sh script for my personal rev 0.4 of 2.6.20.3 in my system:
Code:
#!/bin/sh
make-kpkg clean
fakeroot make-kpkg --append_to_version -k7 --revision=0.4 --initrd kernel_image
 
Old 05-02-2007, 05:07 PM   #14
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by PaulyWally
That makes much more sense. Thanks! Will do!

Tomorrow's project.
Another thing if you find you want/need newer packages for Sarge then try http://www.backports.org/ to see if they have newer a version built specifically for it.
 
  


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
problem compiling kernel module fbarsoba Linux - Software 2 04-20-2006 10:55 AM
compiling single kernel module only evil_empire Linux - Software 2 01-31-2006 12:44 AM
kernel-image-2.6.10-1-k7 module probs + some ? yanik Debian 1 02-18-2005 03:50 AM
Compiling a module/Kernel mismatch fbarre Linux - Newbie 2 09-04-2003 08:26 PM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 05:31 PM

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

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