Thursday, July 9, 2009

OEL: VirtualBox Guest Additions

Thankfully, I managed to get Oracle (the Database) installed on Oracle (the Enterprise Linux). No easy task for a rookie.

Like most people, I don't like the 1024x768 default resolution, so I tried to install the VirtualBox Guest Additions. I've tried like 22 times now. Here are the 2 different errors I would find:
[root@cent-1 VBOXADDITIONS_2.2.4_47978]# /bin/bash ./VBoxLinuxAdditions-x86.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 2.2.4 Guest Additions for Linux installation
.....................................................................
.....................................................................
.....................................................................
...............
VirtualBox 2.2.4 Guest Additions installation
This system does not seem to have support for OpenGL direct rendering.
VirtualBox requires Linux 2.6.27 or later for this. Please see the log
file /var/log/vboxadd-install.log
if your guest uses Linux 2.6.27 and you still see this message.
/var/log/vboxadd-install.log looks like this:
Installing VirtualBox 2.2.4 Guest Additions, built Fri May 29 19:13:34 CEST 2009

Testing the setup of the guest system

Could not find the Linux kernel header files -
the directories /lib/modules/2.6.18-128.e15/build/include
and /usr/src/linux/include do not exist.
Giving up due to the problems mentioned above.
I googled "OpenGl direct rendering" and found this entry. The suggestion was to add "x11" to the end like this:
/bash/bin ./VBoxLinuxAdditions-x86.run x11
Tried that out and I got a different error, but one that matched what the log says, something like "install kernel headers" blah blah blah. Greek.

I tried using apt-get...it apprently doesn't exist on OEL (or Red Hat derivatives). Ubuntu has dpkg...which doesn't work in OEL. yum! Let's try yum. Where do I find the kernel headers?

Online?

No.

I wonder if they exist on the iso images?

So I load up Enterprise-R5-U3-Server-i386-disc1.iso, navigate to the Server directory:
(Yes, it's a picture. I can't copy out of the guest yet...shut up).

Let's try kernel-headers (couldn't be that obvious could it?)
[root@oracledb Server]# rpm -ivh kernel-headers-2.6.18-128.e15.i386.rpm
warning: kernel-headers-2.6.18-128.e15.i386.rpm: Header V3 DSA signature:
NOKEY, key ID 1e5e0159
Preparing... ################################### [100%]
package kernel-headers-2.6.18-128.e15.i386.rpm is already installed
[root@oracledb Server]#
With a tried and true method, I select the next one, kernel-devel. I'm not typing this one up. I guess I should put the name here, in case someone is googling for it: kernel-devel-2.6.18-128.e15.i686.rpm

That one installed. Unmount the OEL disc, remount the VBOX Guest Additions, /bin(g)/bash(bang) ./VBOXADDITIONS_2.2.4_47978(boom) and I'm done. Now I just need to reboot to see if it really works.

Why can't it just work?

10 comments:

cdman83 said...

It "just works", most of the time :-)

One note for the future: if you update the kernel in your VM (like installing the updates trough the Ubuntu auto-updater), you will have to re-run the install script, since it needs to recompile the kernel module for the new kernel version. Also, depending on how you've installed the kernel sources, you might have to re-install the sources matching the updated kernel.

oraclenerd said...

@cdman83

Oh great...you just went and confused me again.

I'm learning stuff...I just don't know what yet.

Thanks for the tip. So if I update VirtualBox through Synaptic, I need to recompile my kernel? Or are you talking about the OEL Guest VM?

(see what you did) ;)

Narendra said...

Chet,

And you call yourself a linux novice...:) Well, I guess the only way to describe myself is then an "illliterate"...:)
Reading your post made me think like I am reading my own experiences (once again). Maybe I am stupid, but I really find it difficult to digest that one has to know (and do) all things such as changing kernel, recompiling packages etc. to just get this setup running. Now you seem to be my last hope. I have already saved your email address in my address book. I have set myself a target that I should be able to achieve this setup SUCCESSFULLY in a couple of weeks time. I am not quite optimistic about addressing the resolution issue but let's see (Sometimes MIRACLES will happen...:)).
P.S. May I bombard you with silly-sounding emails in coming days about (OEL & Oracle) installation issues? Hope you will be kind enough to respond.

oraclenerd said...

@narendra

You do realize I've been trying to do this for at least 3 months right? :)

I mentioned a couple of posts ago about Learning From Failure, well...I could say I'm learning a lot!

Please do email me if you have questions. I'll try to help as best as I can. I might be doing a step by step post soon from setting up VirtualBox to installing Oracle (and upgrading to Apex 3.2) as well.

chet

Bradd Piontek said...

@oraclenerd,
Thanks for this blog. I had been assuming in the past that I needed to set up the public YUM server to get the vbox additions installed to OEL 5. This worked like a champ for my VM. (I had lots of fun getting my desired resolution on Ubuntu 8, so I should be able to mimic the X11 config to take it to the next step).

oraclenerd said...

@Bradd

You mean I got to help you?

Awesome!

:)

rnm1978 said...

thanks for posting this chet, I hit the same error and this put me on the right tracks

I added the OEL public yum repo http://public-yum.oracle.com/ and got the kernel-devel file from there

I then also needed to "yum install gcc", as the vboxadd-install.log was showing:
make KBUILD_VERBOSE=1 -C /lib/modules/2.6.18-164.el5/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
/usr/src/kernels/2.6.18-164.el5-i686/scripts/gcc-version.sh: line 11: gcc: command not found
[...]
etc

oraclenerd said...

@rnm1978

Glad I could return the favor for once!

I keep forgetting about the public yum server, thanks for the reminder. That will help me next time when trying to get some of this stuff set up.

Brad Tumy said...

Thanks Chet!

This really helped out. It turns out for me that I was missing the latest kernel-dev package. I know have full mouse integration and can resize my guest.

Brad

oraclenerd said...

Glad it was helpful.

Just returning the favor!

chet