Mount shared folder on specific location upon boot

Discussions about using Linux guests in VirtualBox.
Post Reply
omiazad
Posts: 1
Joined: 2. Dec 2017, 09:25

Mount shared folder on specific location upon boot

Post by omiazad »

Hi,
My host machine is Ubuntu and I have a shared folder from the host, which is working fine from both Windows and Linux guests. In Windows when I specify a drive/folder, it remembers that and every time I start the OS, I get things as it is on the same location.

The problem in Linux.

When I start my OS, I do get the shared folder on

Code: Select all

/media/sf_OS_Shared/
location. But my apps do not know how to use that location. That is why I run this

Code: Select all

mount -t vboxsf -o uid=1000,gid=1000 OS_Shared /home/sen2agri/Desktop/OS_Shared/
command to make that shared folder available at

Code: Select all

/home/sen2agri/Desktop/OS_Shared/
location.

Now every time I start eh computer, I need to do that manually. Do you have any suggestion how I can automate this? Like I do not have to run that code manually?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Mount shared folder on specific location upon boot

Post by Perryg »

Use the /etc/rc.local. Add your mount statement to the file and reboot. Additionally you should not use the auto-mount feature of VirtualBox, just the standard mount and permanent when using this.
Post Reply