Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How to delay the mount of Shared Folder in /etc/fstab

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
makh
Posts: 651
Joined: 2011-10-09 09:16

How to delay the mount of Shared Folder in /etc/fstab

#1 Post by makh »

Hi

My virtual guest machine, some times goto boot up failure, if the mount of the shared folder fails. The only solution is to stop the mount in /etc/fstab.

I am now looking by adding: nofail option with defaults to mount the shared folder on the guest machine. But I am not sure, as I have put it under test!

I am not yet satisfied, as to which option to use, as the virtualbox manual says that the mount should work, but on googling: people report mount issues (like mines), but employ different ways to solve it.

Thankyou
ThinkPad E14: Arch, Debian Stable
GUI: Xfce

For new: Try MX Linux, Linux Mint; later join Debian Stable

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: How to delay the mount of Shared Folder in /etc/fstab

#2 Post by debiman »

you should employ the best - in this case, a search engine.
https://www.startpage.com/do/dsearch?qu ... tc%2Ffstab

User avatar
makh
Posts: 651
Joined: 2011-10-09 09:16

Re: How to delay the mount of Shared Folder in /etc/fstab

#3 Post by makh »

debiman wrote:you should employ the best ...
Hi
Thanks a lot; I try that on first step always...! :wink:

2. I am going to meet you soon, dont worry! I think we will be very good friends. :lol:

I have, infact searched, many topics, but the mount issues have been reported by some users, as still having issues:
1. /etc/rc.local (Its not a part of systemd; so may be removed in buster).
2. /etc/fstab doesnt have an option for mount after time.
3. cron has no option that runs at boot-up-complete (it is time based).
4. I still have to learn a lot about systemd options: frankly I was unable to find that systemd has an option that when bootup is done: then execute this and this etc etc! :( ... or I may be wrong!
5. Virtualbox manual doesnt state any technique, directly, to resolve this issue.
6. Theres no way to load vboxsf before mount of /etc/fstab takes place: or I couldnt determine.
7. I dont want to use any complex steps or scripts!

Thankyou
ThinkPad E14: Arch, Debian Stable
GUI: Xfce

For new: Try MX Linux, Linux Mint; later join Debian Stable

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: How to delay the mount of Shared Folder in /etc/fstab

#4 Post by Head_on_a_Stick »

It is possible to bypass /etc/fstab and use systemd to mount the folder instead and take advantage of the greater flexibility this method offers in respect of the relative startup of the unit files.

See systemd-mount(5) for the details but basically you need to make a foo.mount unit file and use the After= and Wants= directives to control the ordering.
deadbang

User avatar
makh
Posts: 651
Joined: 2011-10-09 09:16

Re: How to delay the mount of Shared Folder in /etc/fstab

#5 Post by makh »

Hi

After going through the debian mount manual and Arch. I found:
https://wiki.archlinux.org/index.php/fstab
Remote filesystem

The same applies to remote filesystem mounts. If you want them to be mounted only upon access, you will need to use the noauto,x-systemd.automount parameters. In addition, you can use the x-systemd.device-timeout= option to specify how long systemd should wait for the filesystem to show up. Also, the _netdev option ensures systemd understands that the mount is network dependent and order it after the network is online.

noauto,x-systemd.automount,x-systemd.device-timeout=30,_netdev
I am not quite sure, but I suppose, this may work:

Code: Select all

myshare /mnt/mountmyshare vboxsf defaults,uid=user,nofail,noauto,x-systemd.automount,x-systemd.device-timeout=45  0 0
I will try your step, if above doesnt works!

Thankyou
ThinkPad E14: Arch, Debian Stable
GUI: Xfce

For new: Try MX Linux, Linux Mint; later join Debian Stable

Post Reply