Mounting CIFS/SMB share with fstab? Pi fails to mount share and crashes into emergency mode at boot

Hello,

As a preliminary matter, smbclient -U user -L //ip_address prompts me for my password and properly gives me a proper list of share names, as expected.

However, when using the following fstab entry, it fails to mount the drive and drops me into emergency mode on boot. (If I had not half mangled my Pi six different times already trying to learn things, this would be much more frightening.)

//$IP/$DIR /home/$USER/.mountPoints/$path_to_mount_point cifs rw,nofail,username=$remoteUser,password=$pass,uid=1000 0 0

Questions:

  1. Should I be creating my mounts in /mnt/? If so, what command do I do that with? sudo mkdir, or do I need to set special permission?
  2. What do I need to modify in the fstab to make this work? The goal is to either have mounted or make mountable a target directory for backups from the Pi to the NAS.
  3. Is the UID the UID of my user on the Raspberry Pi, or the remote $USER?

Thanks!

I would suggest to start investigating systemd and mount trough such units

1 Like

This was exactly what I needed! Thanks!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.