How to make fstab work on Debian 10?

New to Debian (Or Linux in general)? Ask your questions here!

How to make fstab work on Debian 10?

Postby Maxim » 2019-07-18 15:04

On all the Linuxes that I've tried before, whenever one puts something in /etc/fstab it gets automatically mounted when the machine is restarted, however after installing Debian 10, the same mechanism doesn't seem to work on it.

After restart, the mount folder is empty and is not listed in the mounts.

I had to add "sudo mount -a" to crontab @restart to get them to show up, but is there a more "proper" way for Debian 10 to recognize fstab the way other Debians do?
Maxim
 
Posts: 4
Joined: 2019-07-18 15:01

Re: How to make fstab work on Debian 10?

Postby wizard10000 » 2019-07-18 15:10

fstab works just fine in Debian 10. Think you could share your fstab so we can have a look?
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 80
Joined: 2019-04-16 23:15
Location: southeastern us

Re: How to make fstab work on Debian 10?

Postby Maxim » 2019-07-18 15:25

//hostname/Share /Share cifs _netdev,dir_mode=0777,file_mode=0777,username=<NAME>,password=<PASSWORD>,rw,uid=1000,gid=1000 0 0

Like, I said, it works fine when I do "sudo mount -a" so the settings seem to be fine, but upon restart it's just not there.
Maxim
 
Posts: 4
Joined: 2019-07-18 15:01

Re: How to make fstab work on Debian 10?

Postby L_V » 2019-07-18 16:20

You can try to add this as mount options:
Code: Select all
noauto,x-systemd.automount
L_V
 
Posts: 1083
Joined: 2007-03-19 09:04

Re: How to make fstab work on Debian 10?

Postby Maxim » 2019-07-18 20:33

That looks like it worked, but why do i need to add "noauto"? :?
Maxim
 
Posts: 4
Joined: 2019-07-18 15:01

Re: How to make fstab work on Debian 10?

Postby L_V » 2019-07-19 05:49

noauto: to make it clear that auto mounting process will be managed by x-systemd.automount, and nothing else.
You can try to remove noauto, it may works. If not .. just keep it !

man systemd.mount

noauto, auto
With noauto, the mount unit will not be added as a dependency for local-fs.target or remote-fs.target.
This means that it will not be mounted automatically during boot, unless it is pulled in by some other unit.
The auto option has the opposite meaning and is the default.
Note that the noauto option has an effect on the mount unit itself only — if x-systemd.automount is used (see above), then the matching automount unit will still be pulled in by these targets.
L_V
 
Posts: 1083
Joined: 2007-03-19 09:04

Re: How to make fstab work on Debian 10?

Postby Maxim » 2019-07-19 21:11

Interesting, I'm going to have to read up on that a bit more, thanks for your help, the mount is working for now
Maxim
 
Posts: 4
Joined: 2019-07-18 15:01


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable