VectorLinux
August 22, 2014, 01:13:05 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: kernel headers?  (Read 3660 times)
brokndodge
Member
*
Posts: 83


Linux is sooo HOT


WWW
« on: May 02, 2009, 03:51:03 pm »

trying to install virtualbox using the file VirtualBox-2.2.2-46594-Linux_x86.run downloaded form sun's website

got the following message:

Code:
root:# ./VirtualBox-2.2.2-46594-Linux_x86.run
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation.........
VirtualBox Version 2.2.2 (2009-04-27T18:21:54Z) installer
Please install the build and header files for your current Linux kernel.
The current kernel version is 2.6.27.12
Problems were found which would prevent VirtualBox from installing.
Please correct these problems and try again.

opened gslapt and looked for headers all i could find was version 2.6.24.5_smp-x86-2 but the installed kernel is
2.6.27.12-i686-3vl60

how do i go about getting the headers for the kernel version i am running?
« Last Edit: May 02, 2009, 03:56:49 pm by brokndodge » Logged

VL 7.0 Standard

brokndodge
- OSS is not a religion, it's the solution to buggy irresponsible coding -
Linux User# 494720
brokndodge
Member
*
Posts: 83


Linux is sooo HOT


WWW
« Reply #1 on: May 03, 2009, 06:12:37 am »

This morning while I had the testing repo turned on, i rechecked for the 2.6.27.12-i686-3vl60 headers and still no luck, i'm not real familiar with kernel stuff.  would the newer headers show up if i uninstalled the 2.6.24.5_smp-x86-2 headers?

edit:  just tried that, the old header packages didn't seem to have anything depending on them so i figured what the heck.  but after updating, still no luck.  i'm sure the newer headers are in there somewhere - i just don't know what package to look for.
« Last Edit: May 03, 2009, 06:16:19 am by brokndodge » Logged

VL 7.0 Standard

brokndodge
- OSS is not a religion, it's the solution to buggy irresponsible coding -
Linux User# 494720
brokndodge
Member
*
Posts: 83


Linux is sooo HOT


WWW
« Reply #2 on: May 03, 2009, 09:24:35 am »

okay, here's how far i've gotten.

per instructions from http://dlc-cdn-rd.sun.com/c1/virtualbox/2.2.2/UserManual.pdf?e=1241370083&h=fe9df3f953f6027d43aa71e865775b87 in the manual install section.

Code:
./VirtualBox-2.2.2-46594-Linux_x86.run --keep --noexec
mkdir /opt/VirtualBox
tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox

okay, thats gets me the virtualbox module source to work with.  but i still need headers for my running kernel. so i found a page on slackbook.org that describes enough information. =kernel&s[]=compile]http://alien.slackbook.org/dokuwiki/doku.php?id=linux:kernelbuilding&s[]=kernel&s[]=compile. from that i did the following.

Code:
wget http://www.us.kernel.org/pub/linux/kernel/v2.6/linux-2.6.27.12.tar.bz2
tar -C /usr/src -jxvf linux-2.6.27.12.tar.bz2
zcat /proc/config.gz > /usr/src/linux-2.6.27.12/.config
cd /usr/src/linux-2.6.27.12
make oldconfig

from the slackbook page i learned that 'make help'  would give me more options.  i found an option to install headers.
Code:
make headers_install

now everything should work right? not exactly
Code:
Vector://home/brokndodge/Desktop
root:# cd /opt/VirtualBox/src
Vector://opt/VirtualBox/src
root:# make
*** Building 'vboxdrv' module ***
make[1]: Entering directory `/opt/VirtualBox/src/vboxdrv'
make KBUILD_VERBOSE= -C /lib/modules/2.6.27.12/build SUBDIRS=/opt/VirtualBox/src/vboxdrv SRCROOT=/opt/VirtualBox/src/vboxdrv modules
make[2]: Entering directory `/usr/src/linux-2.6.27.12'
  CC [M]  /opt/VirtualBox/src/vboxdrv/linux/SUPDrv-linux.o
In file included from include/linux/gfp.h:4,
                 from include/linux/slab.h:12,
                 from /opt/VirtualBox/src/vboxdrv/linux/../SUPDrvInternal.h:101,
                 from /opt/VirtualBox/src/vboxdrv/linux/SUPDrv-linux.c:37:
include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory
include/linux/mmzone.h:197:5: warning: "MAX_NR_ZONES" is not defined
In file included from include/linux/gfp.h:4,
                 from include/linux/slab.h:12,
                 from /opt/VirtualBox/src/vboxdrv/linux/../SUPDrvInternal.h:101,
                 from /opt/VirtualBox/src/vboxdrv/linux/SUPDrv-linux.c:37:
include/linux/mmzone.h:218: error: 'MAX_NR_ZONES' undeclared here (not in a function)
In file included from /opt/VirtualBox/src/vboxdrv/r0drv/linux/the-linux-kernel.h:80,
                 from /opt/VirtualBox/src/vboxdrv/linux/SUPDrv-linux.c:38:
include/linux/mm.h:437:63: warning: "NR_PAGEFLAGS" is not defined
include/linux/mm.h:485:62: warning: "NR_PAGEFLAGS" is not defined
make[3]: *** [/opt/VirtualBox/src/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[2]: *** [_module_/opt/VirtualBox/src/vboxdrv] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.27.12'
make[1]: *** [vboxdrv] Error 2
make[1]: Leaving directory `/opt/VirtualBox/src/vboxdrv'
make: *** [all] Error 2
Vector://opt/VirtualBox/src
root:#     


so now i am a complete loss.  i don't know what to do from here.  so i deleted the /opt/VirtualBox directory and decided since i think i have the correct kernel headers installed now to just try the regular install.

Code:
Vector://home/brokndodge/Desktop
root:# ./VirtualBox-2.2.2-46594-Linux_x86.run install
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation.........
VirtualBox Version 2.2.2 (2009-04-27T18:21:54Z) installer
Installing VirtualBox to /opt/VirtualBox
Building the VirtualBox kernel module
Failed to build the vboxdrv kernel module.
Please check the log file /var/log/vbox-install.log for more information.

VirtualBox has been installed successfully, but the kernel module could not
be built.  When you have fixed the problems preventing this, execute
  /etc/init.d/vboxdrv setup
as administrator to build it.

You will find useful information about using VirtualBox in the user manual
  /opt/VirtualBox/UserManual.pdf
and in the user FAQ
  http://www.virtualbox.org/wiki/User_FAQ

We hope that you enjoy using VirtualBox.

Vector://home/brokndodge/Desktop
root:#

still no joy!  what have i missed???  /var/log/vbox-install.log contains the following:

Code:
VirtualBox 2.2.2 installer, built 2009-04-27T18:21:54Z.

Testing system setup...
System setup appears correct.

Installing VirtualBox to /opt/VirtualBox

Output from the module build process (the Linux kernel build system) follows:

make KBUILD_VERBOSE=1 -C /lib/modules/2.6.27.12/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 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 /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/vbox.0
  gcc -Wp,-MD,/tmp/vbox.0/linux/.SUPDrv-linux.o.d  -nostdinc -isystem /usr/lib/gcc/i486-slackware-linux/4.2.3/include -D__KERNEL__ -Iinclude  -I/usr/src/linux-2.6.27.12/arch/x86/include -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i586 -mtune=generic -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iinclude/asm-x86/mach-default -fno-stack-protector -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -I/lib/modules/2.6.27.12/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_X86 -DVBOX_WITH_64_BITS_GUESTS -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(SUPDrv_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxdrv)" -c -o /tmp/vbox.0/linux/SUPDrv-linux.o /tmp/vbox.0/linux/SUPDrv-linux.c
In file included from include/linux/gfp.h:4,
                 from include/linux/slab.h:12,
                 from /tmp/vbox.0/linux/../SUPDrvInternal.h:101,
                 from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory
include/linux/mmzone.h:197:5: warning: "MAX_NR_ZONES" is not defined
In file included from include/linux/gfp.h:4,
                 from include/linux/slab.h:12,
                 from /tmp/vbox.0/linux/../SUPDrvInternal.h:101,
                 from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
include/linux/mmzone.h:218: error: 'MAX_NR_ZONES' undeclared here (not in a function)
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:80,
                 from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
include/linux/mm.h:437:63: warning: "NR_PAGEFLAGS" is not defined
include/linux/mm.h:485:62: warning: "NR_PAGEFLAGS" is not defined
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxdrv] Error 2

End of the output from the Linux kernel build system.
Installation successful

so per the log i did the following

Code:
cd /usr/src/linux-2.6.27.12
make oldconfig && make prepare
then per the output from the install script i ran
Code:
root:# /etc/init.d/vboxdrv setup
bash: /etc/init.d/vboxdrv: No such file or directory

i feel like i'm running in circles




Logged

VL 7.0 Standard

brokndodge
- OSS is not a religion, it's the solution to buggy irresponsible coding -
Linux User# 494720
brokndodge
Member
*
Posts: 83


Linux is sooo HOT


WWW
« Reply #3 on: May 03, 2009, 09:31:37 am »

success, i think
i figured well, i'd just uninstall and try to reinstall so i did
Code:
root:# ./VirtualBox-2.2.2-46594-Linux_x86.run uninstall
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation........
VirtualBox Version 2.2.2 (2009-04-27T18:21:54Z) installer
VirtualBox has been removed successfully.

then
Code:
root:# ./VirtualBox-2.2.2-46594-Linux_x86.run install
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation.........
VirtualBox Version 2.2.2 (2009-04-27T18:21:54Z) installer
Installing VirtualBox to /opt/VirtualBox
tar: Record size = 8 blocks
Building the VirtualBox kernel module
Building the VirtualBox netflt kernel module

VirtualBox has been installed successfully.

You will find useful information about using VirtualBox in the user manual
  /opt/VirtualBox/UserManual.pdf
and in the user FAQ
  http://www.virtualbox.org/wiki/User_FAQ

We hope that you enjoy using VirtualBox.

i think it worked.  gonna try to run virtualbox now.
Logged

VL 7.0 Standard

brokndodge
- OSS is not a religion, it's the solution to buggy irresponsible coding -
Linux User# 494720
brokndodge
Member
*
Posts: 83


Linux is sooo HOT


WWW
« Reply #4 on: May 03, 2009, 09:38:40 am »

virtualbox does run now

if someone wants it i could probably clean this up into a proper howto.
Logged

VL 7.0 Standard

brokndodge
- OSS is not a religion, it's the solution to buggy irresponsible coding -
Linux User# 494720
uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #5 on: May 07, 2009, 06:02:15 am »

wow, I wish someone would have jumped in earlier and told you all you needed was the VL kernel source package for your kernel.
Code:
slapt-get --install kernel-src
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!