LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Compiling Kernel - No module image (https://www.linuxquestions.org/questions/debian-26/compiling-kernel-no-module-image-550741/)

PaulyWally 05-02-2007 02:45 PM

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?

Dutch Master 05-02-2007 02:53 PM

You didn't specify kpkg to build you one ;)

PaulyWally 05-02-2007 02:58 PM

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. :)

Dutch Master 05-02-2007 03:05 PM

Hold it, search for the image in the /usr/src/modules dir. Or maybe somewhere else...

PaulyWally 05-02-2007 03:14 PM

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?

Dutch Master 05-02-2007 03:18 PM

Hmmm, I'm starting to doubt myself...

HappyTux 05-02-2007 03:21 PM

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.

PaulyWally 05-02-2007 03:35 PM

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... :study:

Dutch Master 05-02-2007 03:38 PM

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.

PaulyWally 05-02-2007 03:47 PM

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!

HappyTux 05-02-2007 03:57 PM

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... :study:
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.

PaulyWally 05-02-2007 04:03 PM

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. :)

Quakeboy02 05-02-2007 04:35 PM

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


HappyTux 05-02-2007 05:07 PM

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.


All times are GMT -5. The time now is 05:52 PM.