Category5.TV Community Forum

Full Version: How to automount a network drive after reboot?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I can mount a network drive using command below:

sudo mount -t cifs //wb/Plexlib /home/pi/DRIVE/share -o username=xxxxxxxx,password=xxxxxxxx,vers=1.0

but couldn't figure out a way to automount again after reboot raspberry pi 

May I ask for help from you all?  Thanks ahead!
Add to your /etc/fstab file:

//wb/Plexlib /home/pi/DRIVE/share cifs guest,uid=1000,iocharset=utf8,username=xxxxxxxx,password=xxxxxxxx,vers=1.0 0 0

DO NOT REBOOT

When you add that, type: sudo mount -a

If it worked, GREAT. You can now use that and reboot and whatever. If however it fails, you can do a bit of searching to figure out what's up (obviously I have not tested the above line).

The reason I say do not reboot is so you can first make sure it works with mount -a. Rebooting with a broken /etc/fstab file will cause your system to hang on boot and you won't be able to boot.

Cheers,
Robbie