You are not logged in.

#1 2011-08-08 08:13:03

diegoauyon
Member
From: Guatemala
Registered: 2011-08-08
Posts: 14

[SOLVED] '/lib/modules/3.0.1' is not a valid kernel module directory

Hi everyone, I'm new in the forum, I already read the rules, but sorry if I make an error in the post.

I was trying compiling a Linux Kernel (3.0.1) without patches following this instructions from the wiki: Kernel Compilation from Source for New Users
In the automated script I use this instructions:

kern_src_dir=/usr/src/
config_dir=/usr/src/linux-3.0-ARCH/
local_ver=-ARCHMOD
kern_file_name=linux-3.0.1.tar.bz2
patch=NO
patch_file_name=NONE
jval=8

I don't change any options when the Linux Kernel Configuration appears, and then after waiting a period of time this Error appears:

`arch/x86/boot/bzImage' -> `/boot/vmlinuz-3.0.1-ARCHMOD'
==> ERROR: '/lib/modules/3.0.1-ARCHMOD' is not a valid kernel module directory

But it also saids that the process of the script was a SUCCES:

*Summary of Changes - File(s) Created and/or Deleted*

                               8 File(s) Created:

                               /usr/src/linux-3.0.1-KNL/
                               /boot/vmlinuz-3.0.1-ARCHMOD
                               /boot/kernel30-3.0.1-ARCHMOD.img
                               /lib/modules/3.0.1-ARCHMOD/
                               /usr/src/linux
                               /usr/src/linux-3.0
                               /boot/System.map-3.0.1
                               /boot/System.map

                                         *No Files Were Deleted*


                                   *SUCCESS - Main Processes COMPLETE*

                      *NVIDIA users, please make additional NECESSARY adjustments*

          *Please Configure /boot/grub/menu.lst accordingly and you are done. Then REBOOT & TEST!*

I try to search something like "is not a valid kernel module directory" but I didn't find an answer.
Oh and I almost forget I already update my kernel to the 3 version and also fixed the " Kernel panic at boot due to root FS not found" (I'm just posting this too because the the script uses the .config that is in my linux-3.0-ARCH)

Thanks in advance for all the help that you can give me, and meanwhile I'll try to fix this thing.

Last edited by diegoauyon (2011-08-19 17:51:23)

Offline

#2 2011-08-08 10:23:46

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

Re: [SOLVED] '/lib/modules/3.0.1' is not a valid kernel module directory

diegoauyon wrote:
`arch/x86/boot/bzImage' -> `/boot/vmlinuz-3.0.1-ARCHMOD'
==> ERROR: '/lib/modules/3.0.1-ARCHMOD' is not a valid kernel module directory

Perhaps you should look at what's in the directory `/lib/modules/3.0.1-ARCHMOD' (or if it even exists). This particular message is being thrown by mkinitcpio. I'm going to tend to believe mkinitcpio and say that there's something wrong with the script you used.

edit: Aside: what the hell? This script on the wiki should be purged from the earth. It does nothing but try to reinvent makepkg and a PKGBUILD, and poorly, as it doesn't give you a package in the end.

Last edited by falconindy (2011-08-08 12:08:28)

Offline

#3 2011-08-10 05:49:25

diegoauyon
Member
From: Guatemala
Registered: 2011-08-08
Posts: 14

Re: [SOLVED] '/lib/modules/3.0.1' is not a valid kernel module directory

I'm sorry to answer until now, I have been occupied with others problems. Ok So I'll try to compile the kernel in the "manual" way. Like I said I'm still a newbie. This weekend I'll try and then post the results here

Offline

#4 2011-08-17 21:29:37

ejmarkow
Member
From: Siemiechów, Poland
Registered: 2008-09-02
Posts: 84
Website

Re: [SOLVED] '/lib/modules/3.0.1' is not a valid kernel module directory

diegoauyon,

Could you please attach the contents of the .config file located in your kernel directory? I'm sure I already know what your issue is, a very simple one, and not a problem with the script at all as it works well. However, I should add a check which was revealed in the error you received as to prevent further processing. Anyway, you most likely entered an invalid parameter to the script file. When I look at your .config file, I will confirm this with you, ok? Feel free to contact me personally, I would be more than glad to walk you through any questions you may have. Thanks.


falconindy wrote:

...It does nothing but try to reinvent makepkg and a PKGBUILD, and poorly, as it doesn't give you a package in the end.

@falconindy, incorrect assumption, the script does not attempt  to reinvent makepkg / PKGBUILD, (and never has), and it was never meant to produce a package in the end. Nice try though.

Offline

#5 2011-08-18 07:07:07

ejmarkow
Member
From: Siemiechów, Poland
Registered: 2008-09-02
Posts: 84
Website

Re: [SOLVED] '/lib/modules/3.0.1' is not a valid kernel module directory

Diegoauyon,

Indeed, after looking at your kernel .config file (thanks for sending it to me), the issue is what I had thought it to be: a simple input error. Here is what your script input area contains versus what you have in the .config file:


Script input:

kern_src_dir=/usr/src/
config_dir=/usr/src/linux-3.0-ARCH/
local_ver=-ARCHMOD
kern_file_name=linux-3.0.1.tar.bz2
patch=NO
patch_file_name=NONE
jval=8

Kernel .config file:

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
CONFIG_LOCALVERSION="-ARCH"
.
.
.


Do you see what you did here? Your script input area value is  local_ver=-ARCHMOD , and the kernel .config file  parameter is CONFIG_LOCALVERSION="-ARCH". These don't match and this is why the script / compilation process crashed.

The solution is an easy one, you have two options: Either adjust the value in your script input area, so:  local_ver=-ARCH, OR, adjust the value in your .config file during the kernel customization process, so in the menuconfig screen you see make a change to read: (-ARCHMOD) Local version - append to kernel release which makes the  parameter in your .config file CONFIG_LOCALVERSION="-ARCHMOD" :  When these two values match, the script and kernel compilation will work properly, for sure.

Meanwhile, I will ensure such a mismatch of script input versus .config file will be prevented in the future. I will add a comparison-check to the script in order to initially compare these two values first, and if they don't match, a friendly warning message will inform the user as to the input error and the script will immediately end.

Please make the above change, run the script, verify it works properly (it will), and mark this thread as [SOLVED]. Thank you.

Last edited by ejmarkow (2011-08-18 08:29:34)

Offline

#6 2011-08-19 17:49:29

diegoauyon
Member
From: Guatemala
Registered: 2011-08-08
Posts: 14

Re: [SOLVED] '/lib/modules/3.0.1' is not a valid kernel module directory

Thanks a lot for your help, I try what you told me and everything worked perfect, I already boot with the compiled kernel and it gave me no problem.

Offline

Board footer

Powered by FluxBB