this post was submitted on 11 Mar 2025
29 points (93.9% liked)
Linux
51794 readers
742 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I have a related issue. Mine is a network share and it's in fstab, but I have Linux boot without waiting for wifi, so the mount fails and then asks for root password when I try to mount it later.
I think I just need to add "user" to the options field, right?
Try adding the nofail and _netdev options in your fstab entry. I have this on a few computers that connect to nfs shares including my laptop that obviously can only connect when I'm at home or on VPN. Example:
server:/path /mnt/path nfs4 defaults,nofail,_netdev 0 0
Will that add two minutes to my boot time though?
Nope it doesn't add anything for me. The _netdev option tells mount to wait until the network is connected before attempting to mount. And the nofail option tells it not to error or block the process that called it if the mount doesn't work or is delayed.
Now if the mount contains your etc or other critical config files, it could cause problems and maybe you want to wait, so don't want the nofail. And of course this kind of thing is somewhat OS specific depending on what boot system and service manager, etc., is used, so YMMV, but on Fedora, Rocky, and Ubuntu, it has worked for me for many years.
You may be right, but I worked around this using https://wiki.archlinux.org/title/NetworkManager#Network_services_with_NetworkManager_dispatcher
I added the CIFS shares to my fstab with the
_netdev
option and created /etc/NetworkManager/dispatcher.d/30-nas-shares.sh containing (got the WiFi UUID usingnmcli con show
):This waits for my WiFi to come up, ensures it's my home WiFi, and then mounts my shares.
There are probably other and better ways to do it, but it works.
I believe systemd after targets work tho I have never tried them Try adding this to mount options