-   Slackware (
-   -   Non-smp kernel not sane - problems with a compilation of the kernel modules (

igadoter 09-05-2012 03:55 PM

Non-smp kernel not sane - problems with a compilation of the kernel modules
Yesterday I switched to the non-smp generic kernel on my Slackware 12.2 virtual machine (VirtualBoxv4.1.18). I've got troubles with the compilation of the GuestAdditions. I investigated the cause and I found such thing. Here is a part from the script which compiles GuestAddition kernel modules

KERN_VER=`uname -r`
echo $KERN_DIR
if [ -d "$KERN_DIR" ]; then
    KERN_REL=`make -sC $KERN_DIR --no-print-directory kernelrelease 2>/dev/null || true`
          if [ -z "$KERN_REL" -o "x$KERN_REL" = "x$KERN_VER" ]; then
            return 0
    printf "\nThe headers for the current running kernel were not found. If the
following\nmodule compilation fails then this could be the reason.\n"

This is the part called 'the sanity' check. The script for non-smp kernel returns the line after the 'printf' command. The problem is that the
'KERN_REL' always have the value with '-smp' postfix added. But for non-smp kernel there is no '-smp' postfix. On my machine

bash$ uname -r


echo $KERN_REL

The problem is that compiled modules have inappropriate format and won't be loaded during the boot.

T3slider 09-05-2012 04:34 PM

I'm guessing you're running into this:

Originally Posted by CHANGES_AND_HINTS.TXT
If you decide to use one of the non-SMP kernels, you will need to follow the
instructions in /extra/linux- to modify your
kernel sources for non-SMP usage. Note that this only applies if you are
using the Slackware-provided non-SMP kernel - if you build a custom kernel,
the symlinks at /lib/modules/$(uname -r)/{build,source} will point to the
correct kernel source so long as you don't (re)move it.

You should follow those instructions to prepare the kernel source for non-smp module compilation.

igadoter 09-05-2012 04:45 PM

Thanks. Nice hint I will follow this. Running -smp kernel on the virtual machine with one processor is rather pointless...

All times are GMT -5. The time now is 02:10 PM.