You are not logged in.

#1 2011-12-08 04:35:04

badhat
Member
Registered: 2011-01-30
Posts: 112

Manual Kernel Compilation fails with "Error: not a valid kernel..."

I wanted to try out the Zen kernel to compile my own custom kernel. The basic steps that I did were:

1. $ make localmodconfig
2. $ make -j3
3. # make modules_install
4. # cp -v ~/<build directory>/arch/x86_64/boot/bzImage /boot/vmlinuz-linux-zen-3.1.4.img
5. # mkinitcpio -k vmlinuz-linux-zen-3.1.4 -g /boot/initramfs-linux-zen-3.1.4

and I get the error:

==> ERROR: '/lib/modules/vmlinuz-linux-zen-3.1.4' is not a valid kernel module directory

Inside of /lib/modules I have a new files called "3.1.4-zen-ARCH-g30db333 (and the original files that were there from the stock kernel).
Inside of /boot/ I have the stock image and the stock initram as well as "vmlinuz-linux-zen-3.1.4.img"

Which step am I missing? Also, I was thinking it was possible to NOT use an initram if I just compiled the ext2 and ext4 (root is ext4) into the kernel instead of building them as modules. Is my thinking correct? Also, if anyone needs a reason why I'm using the zen sources instead of the nice Liquorix binary, the answer is simply that I wanted to mess around with it to satisfy my curiosity. Thanks.

Offline

#2 2011-12-08 04:42:55

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Manual Kernel Compilation fails with "Error: not a valid kernel..."

As per the man page:

       -k kernelversion
           Use kernelversion, instead of the current running kernel. This may be a path to a kernel image or a
           specific kernel version. If specified as a path to an image, this will always be prefixed by the basedir.

You've picked... neither? I guess you want "/boot/vmlinuz-linux-zen-3.1.4.img" or "3.1.4-zen-ARCH-g30db333".

Compiling the filesystem module into the kernel alone is not sufficient to avoid using an initramfs. You also need, at a minimum, drivers for the disk controller and a block device driver.

Last edited by falconindy (2011-12-08 04:43:21)

Offline

#3 2011-12-09 17:03:08

badhat
Member
Registered: 2011-01-30
Posts: 112

Re: Manual Kernel Compilation fails with "Error: not a valid kernel..."

Ok, yes that worked. I guess I was confused by the wiki where it asked for "FullKernelName" -- didn't realize that they meant the absolute path.

Anyway, now that the kernel compiles I'm wondering what goes under "/lib/modules/" because the directory that is created there for the Zen Kernel sources does not include any "extramodules" directory.  I have a Nvidia graphics card and the PKGBUILD and nvidia.install file reference the extramodules directory... however, the only such directory I have is for the stock kernel.

Offline

Board footer

Powered by FluxBB