Rasberry Pi fstab stopped working

I had my networks shares working with fstabs. And it just stopped working.
I went in to look at the mounts and may have inadvertently deleted something at the beginning of the file.
Here is the contents and the error I get

osmc@osmc:/$ sudo nano /etc/fstab
#/dev/mmcblk0p1  /boot    vfat     defaults,noatime,noauto,x-systemd.automount    0   0
# rootfs is not mounted in fstab as we do it via initramfs. Uncomment for remount (slower boot)
/dev/mmcblk0p2  /    ext4      defaults,noatime    0   0
//192.168.1.100/my_movies /mnt/my_movies cifs    defaults,vers=3.0,username=osmc,password=osmc,x-systemd.automount,noauto   0       0
//192.168.1.100/Ozarks /mnt/Ozarks cifs    defaults,vers=3.0,username=osmc,password=osmc,x-systemd.automount,noauto   0       0
//192.168.1.100/Your_Honor /mnt/Your_Honor    cifs    defaults,vers=3.0,username=osmc,password=osmc,x-systemd.automount,noauto   0       0

osmc@osmc:~$ sudo mount -a
osmc@osmc:~$ sudo systemctl daemon-reload
osmc@osmc:~$ sudo systemctl restart remote-fs.target
A dependency job for remote-fs.target failed. See 'journalctl -xe' for details.
osmc@osmc:~$

Can someone check to see if anything got deleted at the start of the file and also let me know how to See ‘journalctl -xe’ for details.
Thanks
Tony

I edited your post for you to make it easier to read.

You have /dev/mmcblk0p2 uncommented. Is there a reason for this? Or did something get messed up when you copy-pasted?

EDIT: I just noticed you are using a Pi and I believe that line is normal.

You just type journalctl -xe at the shell :wink:

Share the output of journalctl -xe please. That should let us know the problem, or just share logs.

2 Likes

I made that first line: /dev/mmcblk0p2
I still get the same error message:

osmc@osmc:~$ sudo systemctl restart remote-fs.target
A dependency job for remote-fs.target failed. See 'journalctl -xe' for details.

I cannot decipher what this means:
osmc@osmc:/$ journalctl -xe
-- Subject: A start job for unit mnt-Ozarks.automount has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit mnt-Ozarks.automount has finished with a failure.
--
-- The job identifier is 3027 and the job result is failed.
Apr 10 18:58:38 osmc systemd[1]: Dependency failed for Remote File Systems.
-- Subject: A start job for unit remote-fs.target has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit remote-fs.target has finished with a failure.
--
-- The job identifier is 3021 and the job result is dependency.
Apr 10 18:58:38 osmc systemd[1]: remote-fs.target: Job remote-fs.target/start failed with result 'dependency'.
Apr 10 18:58:38 osmc systemd[1]: mnt-my_movies.automount: Path /mnt/my_movies is already a mount point, refusing
Apr 10 18:58:38 osmc systemd[1]: Failed to set up automount mnt-my_movies.automount.
-- Subject: A start job for unit mnt-my_movies.automount has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit mnt-my_movies.automount has finished with a failure.
--
-- The job identifier is 3022 and the job result is failed.

Leave the first line as you originally had it.

/dev/mmcblk0p2  /    ext4      defaults,noatime    0   0

Time for some more basic troubleshooting. What happens if you try:

sudo mount -t cifs //192.168.1.100/Ozarks /mnt/Ozarks

Have you verified that the IP of the Samba server didn’t change?

1 Like

sudo mount -t cifs //192.168.1.100/Ozarks /mnt/Ozarks

osmc@osmc:/$ sudo mount -t cifs //192.168.1.100/Ozarks /mnt/Ozarks
Couldn’t chdir to /mnt/Ozarks: No such file or directory

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::2878:22a0:cef6:bac4%11
IPv4 Address. . . . . . . . . . . : 192.168.1.100
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

Share name Resource Remark


ADMIN$ C:\Windows Remote Admin
C$ C:\ Default share
E$ E:\ Default share
F$ F:\ Default share
L$ L:\ Default share
I$ I:\ Default share
IPC$ Remote IPC
I I:
my_movies I:\my_movies
Ozarks E:\Ozarks
The command completed successfully.

Your mount point is missing. Try manually creating it and then tying to mount again.

sudo mkdir -p /tmp/Ozarks
sudo mount -t cifs //192.168.1.100/Ozarks /mnt/Ozarks
1 Like

osmc@osmc:/$ sudo mkdir -p /tmp/Ozarks
osmc@osmc:/$ sudo mount -t cifs //192.168.1.100/Ozarks /mnt/Ozarks
Couldn’t chdir to /mnt/Ozarks: No such file or directory

Opps, I had a typo, my bad:

sudo mkdir -p /mnt/Ozarks
sudo mount -t cifs //192.168.1.100/Ozarks /mnt/Ozarks
1 Like

osmc@osmc:/$ sudo mkdir -p /mnt/Ozarks
osmc@osmc:/$ sudo mount -t cifs //192.168.1.100/Ozarks /mnt/Ozarks
Couldn’t chdir to /mnt/Ozarks: No such file or directory

Something isn’t right here. What’s the output of:

ls -l /mnt

and

mount
1 Like

smc@osmc:/$ ls -lt /mnt
total 4
drwxr-xr-x 2 root root 0 Apr 10 19:02 Ozarks
drwxr-xr-x 2 root root 0 Apr 10 19:02 my_movies
drwxr-xr-x 2 root root 0 Apr 10 18:18 Your_Honor
drwxrwxrwx 2 root root 4096 Mar 10 2019 Playlists
osmc@osmc:/$ mount
devtmpfs on /dev type devtmpfs (rw,relatime,size=376680k,nr_inodes=94170,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /run type tmpfs (rw,relatime)
/dev/mmcblk0p2 on / type ext4 (rw,relatime,stripe=1024)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
systemd-1 on /boot type autofs (rw,relatime,fd=44,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=45,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mmcblk0p1 on /boot type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro,x-systemd.automount)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=76460k,mode=700,uid=1000,gid=1000)
systemd-1 on /mnt/Your_Honor type autofs (rw,relatime,fd=57,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
/etc/auto.smb.shares on /mnt/Ozarks type autofs (rw,relatime,fd=6,pgrp=3521,timeout=15,minproto=5,maxproto=5,direct)
/etc/auto.smb.shares on /mnt/my_movies type autofs (rw,relatime,fd=6,pgrp=3521,timeout=15,minproto=5,maxproto=5,direct)
osm

You are using Autofs for Ozarks and my_movies and fstab for Your_Honor.

Pick one (autofs or fstab) and stick with that. While there is no reason why you can’t mix them, as you have just learned it’s easy to get mixed up!

1 Like

Sorry… very new at this. I want to use fstab for all. Had commented out all the lines in autofs. and then did a
sudo systemctl restart autofs
Here is the file contents

#/mnt/192.168.1.100/my_movies -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://192.168.1.100/my_movies/
#/mnt/192.168.1.100/Ozarks -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://192.168.1.100/Ozarks/

Is there something else I need to do to have it all in fastab?

You need to just reboot. Restarting autofs will not un-mount existing mounts. You could manually unmount them but it’s best to just reboot.

1 Like

Another comment. If you don’t plan on using autofs in the future you should probably remove it just to keep your system clean.

And a question, why are you switching back to fstab? autofs can be better if you have server that may reboot or have network glitches. Performance wise there is 0 difference between fstab and autofs.

Still cannot access the network shares after the reboot
Here is the requested output

osmc@osmc:~$ sudo nano /etc/fstab
osmc@osmc:~$ sudo mount -a
osmc@osmc:~$ sudo systemctl daemon-reload
osmc@osmc:~$ sudo systemctl restart remote-fs.target
osmc@osmc:~$ sudo mkdir -p /mnt/Ozarks
osmc@osmc:~$ sudo mount -t cifs //192.168.1.100/Ozarks /mnt/Ozarks
Couldn’t chdir to /mnt/Ozarks: No such device
osmc@osmc:~$ ls -lt /mnt
total 4
drwxr-xr-x 2 root root 0 Apr 10 20:14 Ozarks
drwxr-xr-x 2 root root 0 Apr 10 20:14 Your_Honor
drwxr-xr-x 2 root root 0 Apr 10 20:14 my_movies
drwxrwxrwx 2 root root 4096 Mar 10 2019 Playlists
osmc@osmc:~$ mount
devtmpfs on /dev type devtmpfs (rw,relatime,size=376680k,nr_inodes=94170,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /run type tmpfs (rw,relatime)
/dev/mmcblk0p2 on / type ext4 (rw,noatime,stripe=1024)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=37,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mmcblk0p1 on /media/CB18-1AED type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0111,dmask=0000,allow_utime=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,errors=remount-ro,uhelper=udisks)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=76460k,mode=700,uid=1000,gid=1000)
systemd-1 on /mnt/Your_Honor type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
systemd-1 on /mnt/my_movies type autofs (rw,relatime,fd=31,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
systemd-1 on /mnt/Ozarks type autofs (rw,relatime,fd=32,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
osmc@osmc:~$

After rebooting you should not be running any of this!!!

It looks like the mounts are there now, so you should be good.

Like I said… my fstab setup which I was using was working fine until today when it stopped working. I could not figure out why it wasn’t working. So I figured that I would try autofs.

I don’t see how it could have been working when you were mounting via autofs. Or did you just try autofs?

I just tried autofs today when fstab stopped working. I had not done anything with autofs until today