ERROR: version of config(8) does not match kernel!
I’ve seen this problem occur with other people when I was upgrading from 4.4 to 4.5. And now I’ve encountered this joy. Personally, I blame my not being on a bike since early December. That’s two months without a ride!
In reality, I noticed that the FreshPorts2 development box wasn’t responding to the keyboard after being rebooted. That was because the keyboard wasn’t plugged in during the reboot. See the article on headless servers for more information on that topic. I modified the kernel configuration file according to that article, and then issued the usual command:
# config -r GUS Removing old directory ../../compile/GUS: Done. ERROR: version of config(8) does not match kernel! config version = 400019, version required = 400018 Make sure that /usr/src/usr.sbin/config is in sync with your /usr/src/sys and install a new config binary before trying this again. If running the new config fails check your config file against the GENERIC or LINT config files for changes in config syntax, or option/device naming conventions
The problem
The box in question (GUS) was upgraded to 4.5-STABLE using the “Build world on your fast box, install on your slow box” strategy which I’ve come to know and love. That means the kernel source code on GUS was out of date. I had two choices:
- Update the kernel source on GUS
- Compile a new kernel on the XEON and make install that one
I chose to do the second option. The first option may well have worked, but it runs the risk of breaking things that rely on binary interfaces between userland and kernel.
The solution
I went back to the main box and rebuilt a new kernel according the the instructions I wrote ages ago. When I looked at the kernel config file, I noticed that the keyboard option I was looking for was already there. But to prove that the problem was an out of date source tree, I did cvsup src-sys just for fun. To do that, I took did this:
cp /usr/share/examples/cvsup/stable-supfile kernel-supfile
- modify
kernel-supfile
sosrc-all
is commented out. - also uncomment
src-sys
It is not necessary to cvsup the entire source tree here as I only want to cvsup the kernel source. That will prove my point that it’s just the kernel source out of date.
Then I cvsup’d my [kernel] source tree:
cvsup -h xeon kernel-supfile
Then the proof that all was now well:
# config GUS Don't forget to do a `make depend'' Kernel build directory is ../../compile/GUS
NOTE: I did not build a kernel from this source. Nor do I suggest you do. This kernel source is newer than my userland. They should be the same age. I went back to my XEON box and built the source the right way.
It seems that there’s an easier way to do this instead of going through a whole cvsup again. This error comes when time to compile the kernel, not during the cvsup stage. So, why send someone back to cvsup, then have to remove objects, then installworld, when they can just type:
cd /usr/src/usr.sbin/config && make && make install
This will solve the config(8) 49918 -> 40019 problem.
Janou
Did I say "installworld" ? I meant "buildworld". Installworld comes afte the kernel compile 🙂
Janou
If you read carefully, as I’m sure you did, you will see that I only did the cvsup to verify that it was indeed out of date sources which were causing the problem.
I’m also quite sure that the proposed solution would not have worked on my box. It wasn’t my config which was out of date. It was my kernel source.
I had this problem before, a buildworld && installworld works. But if you just want to update config(8) you should
cd /usr/src/usr.sbin/config
make
make install BINDIR=/usr/sbin
as was recomended by http://www.jp.freebsd.org/newconfig/patch.html
<a href="http://www.freebsddiary.org/phorum/read.php?f=1&i=4657&t=4657">Please refer to this</a>
The article does not work in every case! The resolution I posted seems to work better…
scratch that! just realized by doing that you overwrite your src tree and restore it back to old..
working the way as suggested is the proper way. I stand corrected.
i still get errors after trying both of your methods, any ideas? The box is FreeBSD 4.4-RELEASE
Hi there,
the Problem is that config* is used from
/usr/obj/usr/src/i386/usr/sbin/config
if you don’t link your actual /usr Directory (after updating the sources and make world) which contains the actual config* version, the new build will fail also.
After linking /usr to /usr/obj/usr/src/i386/usr the build of the new Kernel will work.