LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   "error processing kernel image" - what went wrong? (https://www.linuxquestions.org/questions/ubuntu-63/error-processing-kernel-image-what-went-wrong-382090/)

beebelo 11-11-2005 07:13 AM

"error processing kernel image" - what went wrong?
 
I followed the instructions for making and compiling a new Ubuntu kernel, using official sources from the Ubuntu repository. Something went wrong when I installed the image. Can you tell me what this means? (Some of the lines below are wrapped, so just disregard that.)

The first part went ok:
Code:

beebelo@beeb:/usr/src$ sudo dpkg -i
kernel-image-2.6.10-amd_10.00.Custom_i386.deb
Password:
(Reading database ... 78151 files and directories currently installed.)
Preparing to replace kernel-image-2.6.10-amd 10.00.Custom (using
kernel-image-2.6.10-amd_10.00.Custom_i386.deb) ...
Unpacking replacement kernel-image-2.6.10-amd ...
Searching for GRUB installation directory ... found: /boot/grub .
Testing for an existing GRUB menu.list file...
found: /boot/grub/menu.lst .
Searching for splash image... none found, skipping...
Found kernel: /boot/vmlinuz-2.6.10-5-386
Found kernel: /boot/vmlinuz-2.6.10-amd
Updating /boot/grub/menu.lst ... done

Here's where the problem with mkinitrd happens:
Code:

Setting up kernel-image-2.6.10-amd (10.00.Custom) ...
/usr/sbin/mkinitrd: /lib/modules/2.6.10-amd: Not a directory
/usr/sbin/mkinitrd: MODULES needs to be set to none?
Failed to create initrd image.
dpkg: error processing kernel-image-2.6.10-amd (--install):
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 kernel-image-2.6.10-amd
beebelo@beeb:/usr/src$

I read in HOWTOs that you are not supposed to compile with the --initrd flag with a vanilla kernel, but you are supposed to with an Ubunto kernel. So I followed those instructions...

Thanks,
Tim

beebelo 11-14-2005 07:18 AM

Recompiled kernel without the --initrd flag that instructions said to use. It installed successfully. So much for following directions. When I originally installed Ubuntu Hoary, I used a Ship-it disc with defaults, so why was dpkg looking for a directory that doesn't exist?

Anyway, it won't boot, but this is a different issue. I'm getting kernel panic now. Says it can't find any PnPBIOS, and I should boot with --pnpbios-off. As with the other problem, I didn't choose pnpbios, since I don't know. Menuconfig probably defaulted with it.

I've been trying to simply duplicate my current configuration, and make only a few changes. Namely, to use my full 1G memory, and AMD for the cpu instead of i386. (I'm setting it to Athlon/K7, not Athlon64. My motherboard is an Asus K8V-X with Via K8T800 and Sempron 2800+)

Any help or reference to good information--by that I mean explanations what the commands are doing instead of merely listing them--would be much appreciated. I did a man search for 'make oldconfig' and didn't find it. Also read man 'make' but didn't see oldconfig in there. What exactly does make oldconfig look at? How can I start menuconfig with an exact copy of my current system settings?

Thanks.

beebelo 11-14-2005 10:09 AM

Well I guess I'm talking to myself here, but maybe the reason for that is there was something I didn't do, that expereienced people just expect I would have done already: My original Hoary installation did not install the 2.6.10-5 kernel tree, sources, etc. Is that why I can't get a config with my current configuration as a starting point?

beebelo 11-14-2005 10:22 PM

Ok, on my third HOWTO, I FINALLY found instructions to:

bash:/usr/src/linux-source-2.6.10$ cp /boot/config-2.6.10-5-386 ./.config

I'll see what happens.

syg00 11-14-2005 11:21 PM

Generally pays to follow just one set of doco - what are you using ???.
Just had a look at a couple from the wiki - seem o.k. to me, although I haven't tried any.

I personally don't like "package" solutions, so can't comment on the Debian derived solution(s). The "kernelbyhand" seems sensible.

beebelo 11-15-2005 09:51 AM

The ones I'm using are from wiki.ubuntu.org, and from ubuntuforums.org. Since I'm inexperienced, I decided to stick with documents designed specifically for Ubuntu.

I'll show you a couple examples of compile commands. (Some use sudo, some use fakeroot. I'll leave that part off.)

make-kpkg --initrd --append-to-version=-custom kernel_image modules_image
make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
make-kpkg --initrd --append-to-version-.custom kernel_image binary

So they are similar except for the end. Why? Also, I read the man page for make-kpkg, and it says to use a "." or "+" only in the append-to-version name. (No hyphen, as in 2-out-of-3 above.)

For another example -
1.
cd /usr/src/linux-source-2.6.10
cp /boot/config-2.6.10-5-386 ./.config
make menuconfig

2.
cd /usr/src/linux
cp /boot/config-2.6.10.custom .config
make oldconfig
make menuconfig

Notice how one simply copies the .config file and proceeds with menuconfig, but the other uses make oldconfig after copying. Does it matter?

As for the --initrd switch... Everyone says to use it if you are compiling official Ubuntu or Debian kernel sources, which am doing. My first attempt failed due to this error:

/usr/sbin/mkinitrd: /lib/modules/2.6.10-amd: Not a directory
/usr/sbin/mkinitrd: MODULES needs to be set to none?

Was that because of the --initrd switch, or something else? The custom append "-amd" is mine.

Which reminds me of another question: What is the difference between putting an append-to-version name inside menuconfig, vs. in the make-kpkg command line?

I'm trying to read the man pages, etc., but every answer begets 10 more questions...

Thanks for any clarification on all this!

PS. There are more people over here at LQ, so the help is generally better. So that's why I'm asking here instead of at the ubuntu or debian forums.

syg00 11-15-2005 08:47 PM

For your questions on the packages, as I said, I don't know - maybe read the kernel-packages/README.gz as suggested on the wiki. Alphanumeric may contain the common punctuation - depends on definition I guess.

As for the initrd, maybe it's positional - enter it as documented and see what happens.

For the manual compiles, the oldconfig merely gives you the option of deciding (individually) on new kernel options, rather than taking the defaults.
I always use oldconfig first on a new build.

I suspect the version thing won't matter - so long as you only use one, not both.

beebelo 11-16-2005 06:58 AM

Ok, thanks for your thoughts on this.


All times are GMT -5. The time now is 11:00 PM.