I'm running Ubuntu 18.04. I have some mountable USB drives that cause the system to hang forever at boot time if it tries to mount them at that time, although the mounts work fine after the system is up and I'm logged in.
Here is a typical entry in /etc/fstab
...
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxx /media/sdcard ext4 defaults 0 0
I know that marking an entry in /etc/fstab
with noauto
will prevent the system from trying to mount it at boot time, since noauto
causes the entry to be ignored when mount -a
is run ... which occurs at boot time.
I have changed defaults
to defaults,noauto
, and now the boot runs normally.
However, then I can't run mount -av
later to cause these devices to be mounted. If after boot, I remove noauto
and then run mount -av
, the devices then get properly mounted. The system hangs with these items only at boot time.
I would like to set up the system so that at boot time, those items are ignored, but that after boot, they can be mounted automatically ... for example, when I first log into my desktop session after boot.
I know I could write a script to grep through /etc/fstab
, find these entries, and then cause each one of them to be manually mounted, and I could then cause that script to run at session startup time when I log in.
However, I'm wondering if there is some way to configure /etc/fstab
so that those entries get ignored by mount -a
*only* at boot time, and that they get mounted by mount -a
once the system is up and I'm logged in.
Is this possible?
Thank you very much.
The relevant option is
nobootwait
. Just in case someone (like me) is coming to this old thread.Here you can find details: https://unix.stackexchange.com/questions/53456/what-is-the-difference-between-nobootwait-and-nofail-in-fstab