Can't compile kernel

Discussions related to using VirtualBox on Linux hosts.
Post Reply
darthmikael
Posts: 3
Joined: 7. Jun 2007, 00:03
Contact:

Can't compile kernel

Post by darthmikael »

I tried to compile the kernel and always I get this message...

Code: Select all

make KBUILD_VERBOSE=1 -C /lib/modules/2.6.18.2-34-default/build SUBDIRS=/opt/VirtualBox-1.4.0/src SRCROOT=/opt/VirtualBox-1.4.0/src modules
make[1]: Entering directory `/usr/src/linux-2.6.18.2-34-obj/x86_64/default'
make -C ../../../linux-2.6.18.2-34 O=../linux-2.6.18.2-34-obj/x86_64/default modules
make -C /usr/src/linux-2.6.18.2-34-obj/x86_64/default \
        KBUILD_SRC=/usr/src/linux-2.6.18.2-34 \
        KBUILD_EXTMOD="/opt/VirtualBox-1.4.0/src" -f /usr/src/linux-2.6.18.2-34/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)
mkdir -p /opt/VirtualBox-1.4.0/src/.tmp_versions
rm -f /opt/VirtualBox-1.4.0/src/.tmp_versions/*
make -f /usr/src/linux-2.6.18.2-34/scripts/Makefile.build obj=/opt/VirtualBox-1.4.0/src
  Building modules, stage 2.
make -rR -f /usr/src/linux-2.6.18.2-34/scripts/Makefile.modpost
  scripts/mod/modpost -m -a -i /usr/src/linux-2.6.18.2-34-obj/x86_64/default/Module.symvers -I /opt/VirtualBox-1.4.0/src/Module.symvers -o /opt/VirtualBox-1.4.0/src/Module.symvers -s /dev/null /opt/VirtualBox-1.4.0/src/vboxdrv.o
make[1]: Leaving directory `/usr/src/linux-2.6.18.2-34-obj/x86_64/default'
I have open Suse10.2
In other words, i'm newie in linux and I don't know how to do lots of things
thanks in advance
darthmikael
Posts: 3
Joined: 7. Jun 2007, 00:03
Contact:

also tried vboxdrv setup

Post by darthmikael »

and this message appears

Code: Select all

Stopping VirtualBox kernel module                                    done
Recompiling VirtualBox kernel module                                 done
Starting VirtualBox kernel module FATAL: Error inserting vboxdrv (/lib/modules/2.6.18.2-34-default/misc/vboxdrv.ko): Invalid argument
                                                                     failed
(modprobe vboxdrv failed)
still trying to do my best...hope anyone can help me
achimha
Volunteer
Posts: 217
Joined: 10. May 2007, 09:24

Post by achimha »

Do the following:

Code: Select all

cd /usr/src/linux-2.6.18.2-34
make oldconfig && make prepare
make
Stop the make command after about 30 seconds. Then try again.
darthmikael
Posts: 3
Joined: 7. Jun 2007, 00:03
Contact:

Still having the error

Post by darthmikael »

Still having this error

Code: Select all

make KBUILD_VERBOSE=1 -C /lib/modules/2.6.18.2-34-default/build SUBDIRS=/opt/VirtualBox-1.4.0/src SRCROOT=/opt/VirtualBox-1.4.0/src modules
make[1]: Entering directory `/usr/src/linux-2.6.18.2-34-obj/x86_64/default'
make -C ../../../linux-2.6.18.2-34 O=../linux-2.6.18.2-34-obj/x86_64/default modules
make -C /usr/src/linux-2.6.18.2-34-obj/x86_64/default \
        KBUILD_SRC=/usr/src/linux-2.6.18.2-34 \
        KBUILD_EXTMOD="/opt/VirtualBox-1.4.0/src" -f /usr/src/linux-2.6.18.2-34/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)
mkdir -p /opt/VirtualBox-1.4.0/src/.tmp_versions
rm -f /opt/VirtualBox-1.4.0/src/.tmp_versions/*
rm: cannot remove `/opt/VirtualBox-1.4.0/src/.tmp_versions/vboxdrv.mod': Permission denied
make[3]: *** [crmodverdir] Error 1
make[2]: *** [modules] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.18.2-34-obj/x86_64/default'
make: *** [vboxdrv] Error 2
But I have used the watchdog=0 into my boot options and virtualbox can only be started via console and as a root. If I try to start it as a regular user I get this message

Code: Select all

Cannot create/open directoy '/tmp/.vbox-darthvader-ipc/ipcd'
Abnormal termination.
and my linux becomes very unstable...even estarting X I still having the same problems.
But at last I can run VirtualBox as Root
PeP

Post by PeP »

Hello! I have a similar problem (maybe the same) :?

I installed VirtualBox fine, only I had an error, but I don't remember exactly what it was. The VBox was installed though, and seemed to launch itself OK.
I prepared everything for installing a Windows XP, and on start, I got the message that the kernel was not loaded, I had to run the "sudo /etc/init.d/vboxdrv setup" command.
I did that but I then get the same error message as darthmikael:
pep@norbert:~$ sudo /etc/init.d/vboxdrv setup
Password:
* Stopping VirtualBox kernel module vboxdrv [ OK ]
* Recompiling VirtualBox kernel module vboxdrv [ OK ]
* Starting VirtualBox kernel module vboxdrv FATAL: Error inserting vboxdrv (/lib/modules/2.6.20-15-generic/misc/vboxdrv.ko): Invalid argument

* Modprobe vboxdrv failed. Please use 'dmesg' to find out why.
I run "dmesg" but I don't have a clue what all this means... :shock:

If you want me to post th result of the dmesg I can... (It's pretty long)

Can somebody help me? :cry:
(sorry for my english :roll: )
Post Reply