[SOLVED] ERROR: Kernel configuration is invalad..... Running "genkernel all" does not help
GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ERROR: Kernel configuration is invalad..... Running "genkernel all" does not help
Hello forum,
I am running Gentoo with the 2.6.30-r8 kernel.
A few weeks ago I emerged the gentoo sources and then I ran "genkernel all" to compile the new kernel and I did not receive any errors.
I thought everything went well until I emerged the nvidia driver from the Portage tree and I got this error during a self test of the driver:
Code:
KBUILD_EXTMOD="/var/tmp/portage/x11-drivers/nvidia-drivers-185.18.36/work/NVIDIA-Linux-x86-185.18.36-pkg0/usr/src/nv" -f /usr/src/linux-2.6.30-gentoo-r8/Makefile \
modules
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo; \
/bin/false)
Here are the first few lines from the genkernel log file:
Code:
* Gentoo Linux Genkernel; Version 3.4.10.904[0m
* Running with options: all
* Linux Kernel 2.6.30-gentoo-r8[0m for x86[0m...
* kernel: >> Running mrproper...
COMMAND: make -j2 CC="gcc" LD="ld" AS="as" ARCH="x86"
* config: Using config from /usr/share/genkernel/arch/x86/kernel-config
* Previous config backed up to .config.bak
* >> Running oldconfig...
COMMAND: make -j2 CC="gcc" LD="ld" AS="as" ARCH="x86"
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/basic/hash
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -o arch/x86/Kconfig
The nvidia driver continued to install in spite of the error without any more errors.
But I have been having problems with the nvidia driver such as the graphics adapter not being initilized. Sometimes I can boot up to a screen and sometimes I can not. Could this problem be because of the error message?
I thought running "genkernel all" would be all that is necessary to compile the kernel without any errors but why am I getting this error?
Should I heed what the message says and run "make oldconfig && make prepare"? Again, I thought running "genkernel all" was all that would be necessary.
the 'genkernel' command is distro specific and I would look at the error.
"include/linux/autoconf.h or include/config/auto.conf are missing." Check them out.
I have them installed in /usr/include/linux. You can install the kernel headers from your distro. That would be the recommended way forward. Alternatively you can change to kernel top sourcedir and run
make headers check
make headers install
But if you use a much newer kernel than came with your system, these are not the headers your system is compiled against. Programmers mutter dark threats about doing that. Headers change, and keeping these things about the same age is important
After reading your reply, I checked to see if those two files are indeed missing but they are *not* missing. They are there.
These two files are exactly where they should be: include/linux/autoconfig.h and include/config/auto.conf
Why would the self test in the nvidia installer say they are not there when they are indeed there? Perhaps they are the wrong version???
Here is a quote from a different post from exvor:
Quote:
Quote:
I noticed my Linux headers are a lower version from my running kernel. My Linux headers are version 2.6.27-r2 and my running kernel is version 2.6.30-r8. I figured this would not matter because when I ran emerge --sync earlier, the higher versioned Linux headers were not pulled in and I trusted that Portage knew what it was doing.
This is perfectly normal and correct. Your kernel headers are the ones that your current version of glibc is built with. They really don't ever need to be updated unless you update glibc. The reason you have them and do not use the ones from the source directory of the kernel is they are sanitized. It always bothered me how some distros put the kernel stuff in /usr/src/kernel which is considered bad since some programs will attempt to use headers from that directory instead of linking vs the correct ones.
__________________
I think meeting Jeremy in person was the best part of going to the 2008 LinuxWorld expo
In ancient times cats were worshipped as gods, they have never forgotten this. (unknown)
Before I do any rebuilding, there is one more thing I would like to point out. My autoconf.h file has every entry commented out and perhaps that is why I am getting the error. Below is part of my autoconf.h file:
I just ran "make headers_check" and "make headers_install" and rebooted but I'm still getting the same error from the Nvidia installer. And every entry in autoconf.h is still commented out.
If you run the install file with the --help option, I think it gives you an option to open the archive and examine in more detail. When a compile can't find something, it's often a Makefile or script problem. IIRC, those modules try to figure out your system from /etc/'distro'-version, e.g. /etc/slackware-version on this box. Have you got that file on yours?
The only file I could find in the /etc directory that fits that description is one called "gentoo-release" and below are the contents:
Code:
Gentoo Base System release 1.12.13
At the end of this post are the contents of the Nvidia installer created as an attachment.
Lastly, I finally did what the original error told me to do and ran "make oldconfig && make prepare" but I still get the error and everything still looks the same. Below is the output:
Code:
roylocalhost linux # make oldconfig && make prepare
scripts/kconfig/conf -o arch/x86/Kconfig
#
# configuration written to .config
#
scripts/kconfig/conf -s arch/x86/Kconfig
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CALL scripts/checksyscalls.sh
roylocalhost linux #
I am about ready to give up on this problem anyway. The main reason I posted this is because of the problems I was having installing the Nvidia driver, thinking the error might have something to do with the problem. But I might just wait for either Portage or Nvidia to iron out some of the bugs and try again later. I appreciate the help you have offered me so far.
Yeah. I've hit problems with this also.
Check the symlink in /lib/modules/<kernel-version>/build Does it point at the kernel source?
Check the script makeself.sh in the Nvidia package. That error is probably written out in there. Find it. Directly before that, it will try to do something, fail, and then issue that error. Fix THAT.
I checked the only Nvidia installer I have around, but it's for the MX-440 and it out of the Ark:-/. The card still works, but that error isn't there.
Keep the kernel configuration test undisplayed when V=1
While compiling external modules with V=1, during the compilation
process, one can see something such as:
make: Entering directory `/usr/src/linux-2.6.18.2'
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo; \
/bin/false)
Such a display is quite misleading: it took me a while to understand
that there was in fact no error: it was just the code that tests for
the error that was displayed.
In order for others to not be annoyed by the same thing, I suggest to
simply remove the $(Q) before the test, and to force it to be prefixed
by @.
The drawback is that it violates the rule saying that V=1 should
display every command executed.
Appariently my Nvidia driver problems are caused by something else and I am posting in various forums concerning my Nvidia driver problem. The 190 version series simply do not work on my system (even the ones from Portage) and I have to revert back to lower versions. And the lower versions that do work sometimes give problems finding the graphics adapter.
I marked this thread as SOLVED since my original question has been answered.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.