Page 1 of 1

Oracle Linux Guest on Windows 10 Host - VBGuestAdditions

Posted: 3. Feb 2017, 20:18
by JohnM_Nottm
Issue: Cannot get VBGuestAdditions to install

A bit of background

I'm new to using VirtualBox and have spent the last 2 days trying to get an Oracle EBS Vision OVA setup.

I've started with the simple (?) task of getting the Oracle Linus OS set up but have hit a blocker when trying to install the VBGuest Additions.

I've been through the guide (backwards and forwards) and also on this and other forums. I've found some great hits but nothing solves the problem.

I am a NOVICE when it comes to UNIX but am a fast learner. I've worked with Oracle EBS for 20+ years and know a bit about the technical aspects.

I have installed Virtual Box 5.1.14r112924 on a Wndows 10 64 bit host - this bit worked fine :)
I have download from OTN the entire Oracle EBS Vision R12.1.3 appliance for VirtualBox
I have created a VM using just the Oracle-E-Business-Suite-OS-12.1.3.ova appliance to get the Linux OS (in order to handle the other files for the application)
The Linux Guest fires up nicely and after a bit of playing around with mounting the CDRom (manually) I can run the command to install the VBGuestAdditions (sh ./VBGuestAdditions.run)

This always fails.

I have done a number of things to get the kernel prepared but I'm not convinced that this is all fine as I get differences in the Kernel Headers and the running Kernel:

# uname -r
3.8.13-16.3.1.el6uek.x86-64

folders under /usr/src/kernels/ (after running the various yum updates)
3.8.13-118.16.2.el6uek.x86_64

I also manually created a folder with the name that matched the running kernel but this only contains items that I have created there

The error I am now stuck at is (from the vboxadd-install.log):

grep: /lib/modules/3.8.13-16.3.1.el6uek.x86_64/build/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/3.8.13-16.3.1.el6uek.x86_64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j1 modules
make[1]: *** No rule to make target 'modules'. Stop.
make: *** [vboxguest] Error 2


I have a variety of notes etc that I can share if anyone has any ideas.

I have also tried this with a second fresh VM to avoid any issues created in the first one from my various earlier attempts.

Grateful for any assistance.

Re: Oracle Linux Guest on Windows 10 Host - VBGuestAdditions

Posted: 3. Feb 2017, 20:51
by Perryg
You probably need to install the kernel-headers and/or kernel-devel that matches your running kernel. Maybe even some other packages if they are not already installed.
To match your running kernel all you need to do is add the string command $(uname -r)

example kernel-headers-$(uname -r) and kernel-devel-$(uname -r)

Other packages might be binutils gcc make patch libgomp glibc-headers glibc-devel

Re: Oracle Linux Guest on Windows 10 Host - VBGuestAdditions

Posted: 3. Feb 2017, 21:39
by JohnM_Nottm
Thanks PerryG,

I did try that but no matching packages could be found...

no package kernel-headers-3.8.13-16.3.1.el6uek.x86_64 available.

no package kernel-devel-3.8.13-16.3.1.el6uek.x86_64 available.

Makes me think that the kernel in the OVA I downloaded from the Oracle Technical Network is not public (or some such issue).

I tried updating the kernel (in my first VM) and ended up a much wider difference with a kernel at version 4.x.x

I'll compile all the steps I've done into a single update and post that shortly. I need to type them all by hand as I can't copy paste or transfer anything from the Linux guest (I can't even get the screen res to anything bigger than 640x480 at the moment). It feels like being back in the 1980's ;-)

Cheers

Re: Oracle Linux Guest on Windows 10 Host - VBGuestAdditions

Posted: 3. Feb 2017, 21:47
by JohnM_Nottm
for PerryG

... and with regards to your last point, i did that too

tried this from note: [Link to added tomorrow - cost of being a newbie]

But I did these yum installs one at a time (because doing them all failed somewhere) and also for the kernels I included 'uek' in the middle of the names to match my running version:

# yum install dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel

results:
dkms - package not found
binutils - complete
gcc - complete
make - complete
patch - complete
libgomp - complete
glibc-headers - complete
glibc-devel - complete
kernel-uek-headers- complete
kernel-uek-devel - complete

check kernel versions again:

# uname -r
3.8.13-16.3.1.el6uek.x86_64

but no Kernel header folder except for the one I created which has no further entries in it.

Re: Oracle Linux Guest on Windows 10 Host - VBGuestAdditions

Posted: 3. Feb 2017, 22:04
by JohnM_Nottm
Here is a history of what Ive tried in this (second) Virtual Machine...

INSTALLING GUEST ADDITIONS

Steps:

1. Mount the CD-ROM Drive
2. Prepare the Kernel
3. Install Guest Additions


1. Mount the CD-ROM drive

In the Linux guest, make the required directory (I expected this to all happen automatically from the Virtual Box settings but alas no)

In the Linux guest...
# mkdir /media/cdrom

Then use this command to mount the directory:
# mount /dev/cdrom '/mnt/cdrom' where '/mnt/cdrom' is the folder you are mounting to

i.e. mount /dev/cdrom /media/cdrom


2. Prepare the Kernel
Note: this step might not be necessary - try step 3 first to check if the install fails - if so, check the logs to see if the Kernel needs updating

It is likely that the Kernel Headers will not match the running Kernel. I did get the following error...

*** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.

I tried creating the directory and then specifying the KERN_DIR entry manually:
# mkdir /usr/src/kernels/$(uname -r)
# mkdir /usr/src/kernels/$(uname -r)/include [Note: added this on the second run through havinf forst created the above directory]
# echo export KERN_DIR=/usr/src/kernels/$(uname -r) >> ~/.bashrc

check the new directories

# ls /usr/src/kernels/
# ls /usr/src/kernels/$(uname -r)/


now try re-running the VirtualBoxAdditons:

# cd /media/cdrom
# sh ./VBoxLinuxAdditions.run


the process moved on a little further this time but failed once more with...

vboxadd.sh: Building Guest Additions kernel modules.
Failed to set up service vboxadd, please check the log file /var/log/VBoxGuestAdditions.log for details
...
vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong.
vboxadd.sh: failed: Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed..


The vbocadd-install.log file contains:

/tmp/vbox.0/makefile.include.header:115: *** Error: unable to find the include directory for your current Linux kernel. Specify KERN_INCL=<directory> and run Make again.


created this missing /include/ directory and tried again. Once more the process moved on but errored again:

grep: /lib/modules/3.8.13-16.3.1.el6uek.x86_64/build/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/3.8.13-16.3.1.el6uek.x86_64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j1 modules
make[1]: *** No rule to make target 'modules'. Stop.
make: *** [vboxguest] Error 2


During the above, I rebooted the system after each major install/update and tried to install GuestAdditions again...

# shutdown -r now

manually mount the cdrom (make sure you are not in the cdrom directory)

# mount /dev/cdrom /media/cdrom


try again to install the Guest Additions
# cd /media/cdrom
# sh ./VBoxLinuxAdditions.run


But ended up with the same error.

...and this is where I'm at.

Errata
Further note re my first attempt (Virtual Machine number 1) - Because of this seemingly significant change, I started again with a new VM. I have both VM's intact but both 'held' at the same problem.

I submitted this command:

# yum update

and I got downloads of approx 320 Mb which took around 15-20 mins to download and install. After this, I end up with 2 Kernel Header neither of which matched my running version:

# cd /usr/src/kernels
# ls

2.6.32-642.13.1.el6.x86_64
4.1.12-61.1.25.el6uek.x86_64


This extra new folder looks much more recent but I couldn't get beyond the issue of differing kernel versions.

Re: Oracle Linux Guest on Windows 10 Host - VBGuestAdditions

Posted: 4. Feb 2017, 00:05
by Perryg
Open a terminal and post the results of the following from the guest.
  • yum install kernel-headers-$(uname -r) kernel-devel-$(uname -r)

Re: Oracle Linux Guest on Windows 10 Host - VBGuestAdditions

Posted: 6. Feb 2017, 10:00
by JohnM_Nottm
Good Morning PerryG

"Nothing to do" is the end result:

Setting up Install Process
No package kernel-headers-3.8.13-16.3.1.el6uek.x86_64 available
No package kernel-devel-3.8.13-16.3.1.el6uek.x86_64 available
Error: Nothing to do

Cheers

Re: Oracle Linux Guest on Windows 10 Host - VBGuestAdditions

Posted: 6. Feb 2017, 15:14
by Perryg
No packages available is the problem. For some reason your repo does not have the available headers and devel packages for your running kernel. I would see if you have the proper location for updates in your sources. See if you have added the public repo properly. http://public-yum.oracle.com/

Re: Oracle Linux Guest on Windows 10 Host - VBGuestAdditions

Posted: 6. Feb 2017, 18:13
by M4M
Thanks for confirming that PerryG

I got the whole setup as an Appliance downloaded from the Oracle eDelivery portal (via a link from the Oracle Technical Network), so I (mistakenly?) thought it would work just nicely 'out of the box'.

I'll see if I can post something on one of the Oracle forums about this.

I'll take a look at your suggest link too.

Thanks for the help.

J

Re: Oracle Linux Guest on Windows 10 Host - VBGuestAdditions

Posted: 6. Feb 2017, 18:18
by M4M
Here's another odd thing...

I created another new VM for the Oracle EBS 12.1.3 Vision from the downloaded Oracle appliance. This one includes Oracle Linux 6.5 but with yet another different kernel version! I still get the same issue though trying to get the kernel-headers and kernel-devel updated.

Quite bizarre.

I'm not giving up yet though, I'm getting quite fond of this wall I'm banging my head against ;-)

Re: Oracle Linux Guest on Windows 10 Host - VBGuestAdditions

Posted: 6. Feb 2017, 18:41
by M4M
Well now, look what I found on the link you gave me...

kernel-uek-headers-3.8.13-16.3.1.el6uek.x86_64.rpm
kernel-uek-devel-3.8.13-16.3.1.el6uek.x86_64.rpm

So I can get these as rpm's. Now I just need to get them onto the VM....

PS - my forum user changed because I've switched accounts recently and raised this query under my old login :)

Re: Oracle Linux Guest on Windows 10 Host - VBGuestAdditions

Posted: 6. Feb 2017, 18:45
by Perryg
That's one way to do it I guess but adding the proper repo would be better. That way when an update happens you will not need to go looking for these again, but what ever works for you is what you should do.

Re: Oracle Linux Guest on Windows 10 Host - VBGuestAdditions

Posted: 6. Feb 2017, 19:08
by M4M
now this is messing with my head...

I tried once again with the updates only this time I used these commands for UEK (and ran them individually) given that I found the references on the yum Oracle site:

yum install kernel-uek-headers-$(uname -r)
yum install kernel-uek-devel-$(uname -r)

The headers update found nothing to do but the devel update did find something and continued to download and update the necessary data.

I now appear to have the VBoxAdditions installed (just got a skip message for X.Org and something else so I'll check for downloading the OS Desktop etc.)

I'll confirm everything works OK shortly so that this thread can be closed.

Thanks for your help - saved me a few hands-full of hair :-)

Re: Oracle Linux Guest on Windows 10 Host - VBGuestAdditions

Posted: 6. Feb 2017, 19:52
by M4M
This is now all good.

I've managed to get the VBGuestAdditions installed on 2 different VM's now.

Thanks again to PerryG for keeping me on track.

I cant see how to mark this as Solved so if a moderator could do so I'd appreciate it.

Cheers

John

Re: Oracle Linux Guest on Windows 10 Host - VBGuestAdditions

Posted: 4. Aug 2020, 02:24
by cgama73
Hi guys,

those lines:

yum install kernel-uek-headers-$(uname -r)
yum install kernel-uek-devel-$(uname -r)

sort everything out.
Thanks