How to (fstab) mount Shared folder just sometimes?

Discussions about using Linux guests in VirtualBox.
Post Reply
Fidelius
Posts: 6
Joined: 20. Aug 2010, 10:36
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Linux etc

How to (fstab) mount Shared folder just sometimes?

Post by Fidelius »

Hello,

I've got a PC which can boot from different partitions either Windows XP or Ubuntu Linux.

With the help of Virtualbox' "partition mapper" vmdk file [*] I can for example also use the Linux OS inside a Virtualbox running on the Windows host (plus guest additions).

This works great.

When Linux runs inside Virtualbox, a shared folder is being used. In order to be there instantly, it's being mounted via fstab at Linux' boot time. So, for example for a shared folder named "The_Share" the fstab file contains a line:

Code: Select all

The_Share /home/user/sharefolder vboxsf defaults 0 0
This works great, too.

However, when I boot the very same Linux nativeley, there's naturally no guest additions with vboxsf, let alone a "share" named "The_Share".
This is why Linux is complaining when trying to mount the fstab, and Ubuntu actually stops the entire boot procedure and asks to press "S" to skip the mount or "M" to mount manually.

Is there an easy way to tell Linux not to mount that vboxsf when there is no vboxsf, maybe in the fstab file?
I've tried as fstab mount option "errors=continue" but it didn't work.


[*] The vmdk I created with "VBoxManage internalcommands createrawvmdk" etc, which is decribed in Virtualbox' excellent documentation.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to (fstab) mount Shared folder just sometimes?

Post by Perryg »

try the rc.local instead of the fstab file for the mount statement.
Fidelius
Posts: 6
Joined: 20. Aug 2010, 10:36
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Linux etc

Re: How to (fstab) mount Shared folder just sometimes?

Post by Fidelius »

Perryg wrote:try the rc.local instead of the fstab file for the mount statement.
Thank you, this works very well.
Post Reply