[Resolved] No mount rc.local version 5.1.24

Discussions related to using VirtualBox on Linux hosts.
Post Reply
hechicero0015
Posts: 2
Joined: 3. May 2018, 21:04

[Resolved] No mount rc.local version 5.1.24

Post by hechicero0015 »

When updating virtualbox you have not the unit at startup.If you mount the unit in / media / sf_www.
someone can help me thank you very much.

Code: Select all


#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.


#mount.vboxsf -t vboxsf /media/sf_www /var/www/html/

mount -t vboxsf -o rw,uid=33,gid=33 www /var/www/html/

#mount.vboxsf -w -o fmode=0777,dmode=0777 www /var/www/html/
# ln -s /media/sf_www/ /var/www/

#mount -t vboxsf www /var/www/html/

exit 0



Code: Select all


/etc/group
vboxsf:x:999:alberto,www-data

Last edited by socratis on 4. May 2018, 00:32, edited 1 time in total.
Reason: Marked as [Resolved].
hechicero0015
Posts: 2
Joined: 3. May 2018, 21:04

Re: No mount rc.local version 5.1.24

Post by hechicero0015 »

The problem is the OS running rc.local too fast, before the service is actually loaded. Add a sleep 10 in the script line.

sleep 10 && mount -t vboxsf -o rw,uid=33,gid=33 www /var/www/html/
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: No mount rc.local version 5.1.24

Post by socratis »

Thanks for the feedback. You managed to report both the problem, and (more importantly) the solution!

Marking as [Resolved].
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply