Search This Blog

Monday, August 11, 2008

Package dependency for installing virtualbox guest additions on Open SuSE 10.3

The problem at hand..


Well, I had to get the shared folder feature working on Open SuSE 10.3 virtual machine for a variety of reasons, and in turn, I had to install guest additions on virtualbox 1.6.4. There were a bunch of package dependencies even before coming to this error, and unfortunately, I dont have the entire series of command that I issued, but in this posting, I will attempt to present the solution of the immediate error that I was facing.

The KERN_INCL variable had to be set to the /usr/include directory:
linux-jo4o:/usr/src/linux # env | grep KER
KERN_INCL=/usr/include

After mounting the guest additions CD and running the VboxAdditions.run command as root, the kernel was not able to be compiled and this was visible in the install log:
linux-jo4o:~/addons # more /var/log/vboxadd-install.log

Installing VirtualBox 1.6.4 Guest Additions, built Tue Jul 29 20:13:59 CEST 2008

Testing the setup of the guest system

Building a test kernel module...

make KBUILD_VERBOSE=1 -C /lib/modules/2.6.22.5-31-default/build SUBDIRS=/tmp/sel
fgz1883915647/module/test SRCROOT=/tmp/selfgz1883915647/module/test modules
make[1]: *** No rule to make target `modules'. Stop.
make: *** [vboxadd_test] Error 2

Building the test kernel module failed.
Giving up due to the problems mentioned above.
linux-jo4o:~/addons #

Initial thoughts and a potential solution


Initially, I thought that maybe it was a problem due to missing symbolic link to the modules directory (??), but when I posted this question on the vbox-users mailing list (which I think is more effective than the forums at times), I got a response saying that maybe I should check if the kernel-source package was installed or not.

To even find the package, we needed the main SOURCE repository added in the YAST setup. This is what the installed online repositories looked like:



When I ran the following command as root, it was clear that this was the missing link:
linux-jo4o:~ # zypper install kernel-source
* Reading repository 'Main Repository (NON-OSS)' cache
* Reading repository 'openSUSE-10.3-OSS-KDE 10.3' cache
* Reading repository 'Main Repository (Sources)' cache
* Reading repository 'Main Repository (OSS)' cache
* Reading installed packages [100%]

The following NEW package is going to be installed:
kernel-source

Overall download size: 49.2 M. After the operation, additional 243.4 M will be used.
Continue? [yes/no]: yes
Downloading package kernel-source-2.6.22.5-31.i586, 49.2 M (243.4 M unpacked)
Downloading: media
* Downloading [100%]
Downloading: kernel-source-2.6.22.5-31.i586.rpm
* Downloading [100%]
* Installing: kernel-source-2.6.22.5-31 [100%]
linux-jo4o:~ #

Now, when I tried installing the guest additions, it was able to install them and recompile the kernel JUST fine. Sweet!
linux-jo4o:~ # /media/VBOXADDITIONS_1.6.4_33808/VboxAdditions.run
Verifying archive integrity... All good.
Uncompressing
VirtualBox 1.6.4 Guest Additions for Linux
installation.............................................................................................................................................................................
VirtualBox 1.6.4 Guest Additions installation
Building the VirtualBox Guest Additions kernel module...
Building the shared folder support kernel module...
Installing the VirtualBox Guest Additions...

Successfully installed the VirtualBox Guest Additions.
You must restart your guest system in order to complete the installation.
linux-jo4o:~ #

No comments:

Post a Comment