1

I have a Linux virtual box and want to install Guest Additions. I've successfully mounted the iso. But now what...?

How can I access the mounted cd-rom in the terminal of the virtual machine as to install Guest Additions?

When I cd media then ls returns empty.

enter image description here

  • You say in the title that the guest is MS Windows 10, however in the images it shows the guest as Oracle Gnu/Linux. Can you clarify you question. – ctrl-alt-delor May 24 '19 at 19:12
  • Thnx @ctrl-alt-delor, I've updated the title. I was thinking of my own pc as the guest. – Marty May 24 '19 at 19:25
  • Either the directory is wrong or the iso is not mounted. What's the output of mount | grep iso? You can try to mount it manually, on my guest (no oracle) commands cd /; mount /dev/sr0 /media; cd /media work (replace /dev/sr0 with your virtual cdrom device). – Freddy May 24 '19 at 19:40
  • Thanks @Freddy. mount | grep iso doesn't return anything (just like the last ls in the image doesn't return anything). How do I know what to replace /dev/sr0 with? How do I know where I can find my virtual cdrom? – Marty May 24 '19 at 20:02
  • @Marty On my guest the last line of dmesg | grep -i cd-rom shows me [ 2.852493] sr 1:0:0:0: Attached scsi CD-ROM sr0. Note the last sr0 for the device name. But I don't know if this works on your oracle guest. – Freddy May 24 '19 at 20:08
1

I added Internet connectivity following the instructions here:

Check connectivity: `sudo nmcli d`
If disconnected: `sudo nmtui` > Edit a connection, select network interface and choose "Automatically connect".
`sudo reboot now`
Test: `ping www.google.com`

I added bzip2: yum install bzip2

I also added GNOME GUI Desktop, according to these instructions:

yum group list
yum groupinstall 'Server with GUI'
systemctl enable graphical.target --force
Rebooted the Guest OS Oracle Linux 7.1
gnome-shell --version

Next, to mount in the media folder, I entered:

cd /;
mount /dev/sr0 /media;
cd /media
ls

This returns various files including VBoxLinuxAdditions.run. I ran ./VBoxLinuxAdditions.run, which returned "Kernel headers not found for target kernel":

enter image description here

uname -r and rpm -q kernel-devel indeed show different versions.

yum install kernel-headers-$(uname -r) kernel-devel-$(uname -r) couldn't find the packages. I then ran yum distro-sync in the hope to synchronize the versions. But there were still 2 different versions.

However, booting up the VM there now was a new option available: "Oracle Linux Server 7.6, with Linux 3.10.0-957.12.2.el7.x86_64" rather than "Oracle Linux Server (4.14.35-1818.3.3.el7uek.x86_64 with Unbreakable Ent" that I normally selected the virtual box boot menu.

I choose this option and kernel-headers and kernel-devel now were the same versions! yum install kernel-headers-$(uname -r) kernel-devel-$(uname -r) returned "already installed and latest version". It was using the same versions, so that was no longer the problem.

But ./VBoxLinuxAdditions.run now returned "This system is currently not set up to build kernel modules. Please install the gcc make perl packages from your distribution.".

I ran yum install build-essential gcc make perl dkms. And then after sudo reboot now it successfully installed Guest Additions!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.