Mounting a VirtualBox shared folder on boot with fstab in OpenSuse 11.3

fstabopensusevirtualbox

I have followed the steps found here, however, the share is not mounted on boot. The share will mount if i run 'mount -a' after booting. Why would the share not mount on boot?

1 – Set up a Virtual Machine and
install OpenSUSE 11.2

2 – Create a shared folder on host
(HostFolder)

3 – Setup the shared folder in
Virtualbox Via the Virtual Machine
details or via Devices > Shared
Folders…

4 – Install dependencies for running
the Virtualbox installer You need to
install the right development
kernelpackage for your machinetype
(use 'zypper search -i kernel' to see
what's installed) sudo zypper install make gcc
kernel-source
kernel-hosttype/default-devel

5 – Run the Virtual Machine and go to
Devices > Guest Additions This mounts
an iso image in your OpenSUSE guest.

6 – Open a root terminal and run

cd /usr/src/linux make oldconfig &&
make prepare && make scripts && make
dep cp
../linux-obj/$HOSTTYPE/default/Module.symvers
. make prepare

  • A commenter on previously mentioned thread says this step is unnecessary
    but it doesn't work without on my
    system. I suggest trying step 7 first
    and returning to step 6 if that fails.
    *

7 – Run ./VirtualboxLinux yourhosttype
.run from the mounted iso image.

8 – Create shared folder in OpenSUSE
(GuestFolder)

9 – Test with sudo mount -t vboxsf
HostFolder /home/user/GuestFolder

It works? Great! Let's set up the
system so it automounts for your
regular useraccount instead of
root-only access.

10 – Add this line to /etc/fstab
HostFolder /home/user/GuestFolder
vboxsf defaults,uid=1000,gid=1000 0 0

11 – It works for me but if it still
doesn't automount after a reboot; sudo
mount -a

Best Answer

I am not entirely familiar with the openSUSE distro, but your step 6 seems a bit much. Most modern linux distros can simply install the DKMS package, and then run the installer script from the .iso.

I am wondering if perhaps the guest additions aren't fully integrated - and they don't get activated early enough in the boot process to allow your entry in fstab to actually get recognized.

Update: I downloaded and installed openSUSE-11.3-GNOME-LiveCD-i686.iso, and the installer detected I was in VirtualBox and automatically started the Guest Additions. Also, once it had finished and booted to the desktop the Guest Additions were automatically started for me as well. There was nothing I needed to install - though I didn't test the auto-mounting once I was puzzled by the auto install of the additions.

Your question indicates you are using version 11.3, the instructions you copied and pasted indicate 11.2... What version of openSUSE distro are you testing? It is also the guest correct? What is your host OS? What version of VirtualBox are you running?

Related Question