this post was submitted on 21 Mar 2024
24 points (92.9% liked)

Linux

47232 readers
784 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

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
24
submitted 5 months ago* (last edited 5 months ago) by [email protected] to c/[email protected]
 

I have a laptop that spends 90% of it's time on a single network, and a server with several shares where I store files, like pictures.

For example I have my fstab configured with this line:

//192.168.224.45/Pictures /home/jediwan/Pictures cifs credentials=/home/jediwan/.smbcredentials,uid=1000,gid=1000,x-systemd.automount 0 0

And it works great as long as I'm on the same network. But if I'm not on my main network the PC struggles to load GNOME and eventually crashes. What do?

EDIT: Adding nofail worked

top 13 comments
sorted by: hot top controversial new old
[–] [email protected] 20 points 5 months ago* (last edited 5 months ago) (2 children)

The OS will wait until the mount is successful with these settings, which is why GNOME doesn't load. Try adding nofail to your options. It should continue with the boot process if you are out of the network with that option set. (https://wiki.archlinux.org/title/Fstab#External_devices)

[–] jaykay 14 points 5 months ago (1 children)

Archwiki to the rescue as usual

[–] [email protected] 6 points 5 months ago

running arch btw,

[–] [email protected] 2 points 5 months ago

This did it thank you

[–] [email protected] 10 points 5 months ago

Adding nofail will most likely fix this. However switching from fstab mounts to systemd mounts could be cleaner as you would be able to create a systemd target that gets activated whenever you're on your main network and then trigger a mount of the share / unmount when you leave.

[–] [email protected] 5 points 5 months ago (1 children)

Same dog bit me recently. I'd swapped a drive out. It was like a week later when I needed to reboot into Debian. Then I had to do some research. 😆

Glad you got it sorted.

[–] [email protected] 2 points 5 months ago (1 children)

I'm just happy I thought to test it before I left the network!

[–] [email protected] 2 points 5 months ago (1 children)

I have had bad luck in the past where my drive would not spin up at boot for some reason. I end up modifying the fstab file with a live boot USB and then start the system with revised FSTAB.

Just my 2 cents that would help in case of a dead lock situation.

[–] [email protected] 2 points 5 months ago

Great idea in general to have a live USB laying around just in case. I should make one now.

[–] [email protected] 4 points 5 months ago* (last edited 5 months ago)
[–] [email protected] 2 points 5 months ago (1 children)

Not sure if my client is borked of if you forgot to paste the fstab line

[–] [email protected] 2 points 5 months ago (1 children)
[–] [email protected] 1 points 5 months ago