Ubuntu: How to create script for run sudo mount -a



Question:

I'm very very new for ubuntu. I have one raspberry with ubuntu-mate os. Now I got one problem with it.

I edit fstab on /etc/fstab for mount share folder from windows server. It works fine after I do sudo mount -a.

but after reboot it can't mount on Startup. I must to open terminal and run command sudo mount -a every time after reboot.

How can I do the script for run sudo mount -a when ubuntu start.

Or I can make the script run sudo mount -a by double click like .bat for Windows.

My fstab:

proc /proc proc defaults 0 0   /dev/mmcblk0p2 / ext4 defaults,noatime 0 1   /dev/mmcblk0p1 /boot/firmware vfat defaults 0 2     //myservername/data/Departments/ /home/raspberry01/Desktop/WI cifs,_netdev,auto,rw,username=mydomianusername,password=mypassword 0 0  


Solution:1

My guess is that

//myservername/data/Departments/ /home/raspberry01/Desktop/WI cifs,_netdev,auto,rw,username=mydomianusername,password=mypassword 0 0  

should be

//myservername/data/Departments/ /home/raspberry01/Desktop/WI cifs _netdev,auto,rw,username=mydomianusername,password=mypassword 0 0  

The file system "cifs" is a column of it's own and the options come afterwards. You concatenated both and that would be wrong syntax.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »