Author Topic: Virtualbox Guest Additions  (Read 18150 times)

johnaaronrose

  • Zen Apprentice
  • *
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Virtualbox Guest Additions
« on: January 14, 2011, 04:53:02 pm »
Installed Zentyal 2.0.3 successfully in Virtualbox. I selected the 'Install Guest Additions' under Virtualbox Devices menu with Zentyal running as a VM, which should mount the Guest Additions .iso. However, there is no cdrom directory in /media (of the running Zentyal). When I installed Guest Additions for a Ubuntu VM, there was no problem i.e. it showed the Guest Additions .iso under /media/cdrom and I was able to run the Guest Additions .run (in the .iso) to compile & install the appropriate kernel module (after installing dkms, gcc & linux-headers-($uname -r)). Any ideas why there is no /media/cdrom directory or where the .iso is mounted to?
Regards,
John

Trym

  • Zen Warrior
  • ***
  • Posts: 117
  • Karma: +1/-0
    • View Profile
Re: Virtualbox Guest Additions
« Reply #1 on: January 14, 2011, 06:10:25 pm »
Here's how I do it:

After a fresh install
Code: [Select]
sudo su
apt-get update
apt-get dist-upgrade
reboot

Then, after the VM is ready again:

In VirtualBox, select Install Guest Additions from the Devices menu.

Code: [Select]
sudo su
apt-get install build-essential
apt-get install linux-headers-$(uname -r)
mount /dev/cdrom /cdrom
/cdrom/VBoxLinuxAdditions-(arch).run

The last line needs to be changed to the installed architecture of course,  VBoxLinuxAdditions-x86.run for 32-bit or VBoxLinuxAdditions-amd64.run for 64-bit.

Good Luck.

::Trym
« Last Edit: January 14, 2011, 06:42:44 pm by Trym »

johnaaronrose

  • Zen Apprentice
  • *
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: Virtualbox Guest Additions
« Reply #2 on: January 15, 2011, 12:39:08 pm »
Thanks Trym. It installed as you advised. I thought that Zentyal would act like Ubuntu 10.04.1 in that a mount point would automatically be created at /media/cdrom but (I guess) because there is no equivalent Places menu containing an entry for the Guest Additions .iso, it doesn't do it. As I've never fully understood about the relationship between /dev and /media, I never thought to check /dev for a cdrom directory, let alone mount /dev/cdrom!
Regards,
John

Trym

  • Zen Warrior
  • ***
  • Posts: 117
  • Karma: +1/-0
    • View Profile
Re: Virtualbox Guest Additions
« Reply #3 on: January 15, 2011, 03:15:16 pm »
Quote
Thanks Trym. It installed as you advised. I thought that Zentyal would act like Ubuntu 10.04.1 in that a mount point would automatically be created at /media/cdrom but (I guess) because there is no equivalent Places menu containing an entry for the Guest Additions .iso, it doesn't do it. As I've never fully understood about the relationship between /dev and /media, I never thought to check /dev for a cdrom directory, let alone mount /dev/cdrom!

Zentyal is based on the Ubuntu Server distribution, not the Ubuntu Desktop version, hence it has no auto-mounting components installed (for removable media, that is). As for the relationship between /dev and /media, there really isn't any. /media is just a directory like any other, /dev is a virtual directory listing the system's hardware/devices. The Ubuntu people decided that they'd use the /media directory to mount stuff in, but you can mount filesystems anywhere you like, as in the example above where I used /cdrom, an existing empty directory in a Zentyal-installation.

::Trym
« Last Edit: January 15, 2011, 03:59:50 pm by Trym »