You are Here:
Linux Lite 4.4 Final has been released. See the Release Announcements section for more information.



How to make auto start script to mount NAS drive?

Author (Read 117 times)

0 Members and 1 Guest are viewing this topic.

How to make auto start script to mount NAS drive?
« on: May 15, 2019, 09:30:24 AM »
 

Keith Buckner

  • New to Forums
  • *
  • 3
    Posts
  • Country: us
  • Reputation: 0

  • Linux Lite: 3.8 32bit

  • CPU: Intel P4 @ 2.70GHz

  • MEMORY: 4Gb

  • VIDEO CARD: nVidia GeForce 8400GS/PCIe/: 1920x1080:
Need to make a start up item in session and start up to mount my two NAS drives.

They mount manually like this:

I did the following to manually mount drive, and they mount and show on the desktop;
Code: [Select]
sudo mkdir /media/NAS1
sudo mkdir /media/NAS2

then in fstab;

Code: [Select]
//192.168.1.8/Download /media/NAS1 cifs username=un,password=pw,nounix,auto,user,uid=1000 0 0
//192.168.1.9/Download /media/NAS2 cifs username=un,password=pw,nounix,auto,user,uid=1000 0 0

but I still have to do this after boot for them to mount;

Code: [Select]
sudo mount -t cifs //192.168.1.9/Download /media/NAS2 -o username=un,password=pw,nounix,uid=1000
sudo mount -t cifs //192.168.1.8/Download /media/NAS1 -o username=un,password=pw,nounix,uid=1000

How can I make a make a start up script or change fstab for them to auto mount?

Linux Lite 3.8
Kernel 4.4.0-148
Ubuntu 5.4.0-6


Mint 19.1 x64 Tessa-Dell-PowerEdge T310-Xeon X3430 4 Cores 2.40GHz-16GB-GeForce GT730 2GB
Mint 19.1 x64 Tessa-ASUSTek CM5571-Intel Dual Core ES5400 2.7GHz-8GB-GeForce 8400 1GB
Lite 3.8 x86-DEll Dimension 4600-Intel Pentium 4  2.80GHz-4GB-GeForce FX 5200 1GB
Mint 19 x64 Tara-ASRock K8NF4GAMD-Athlon64 Processor 2800+-2GB-GeForce GTS 450 2GB
Bodhi 3.2.1 x64-Acer Aspire 5000 Laptop-AMD Turion 64ML-30 1600MHz-1GB-SIS661
Lite 4.2 x64-Toshiba Laptop-AMD 2.2GHz-1GB
 


Re: How to make auto start script to mount NAS drive?
« Reply #1 on: May 18, 2019, 07:17:24 AM »
 

trinidad

  • Gold Level Poster
  • *******
  • 934
    Posts
  • Country: us
  • Reputation: 165
  • Linux Lite Member
    • dbts-analytics.com

  • Linux Lite: 4.2 64bit

  • CPU: AMD A8 5500 4 cores

  • MEMORY: 8Gb

  • VIDEO CARD: AMD/ATI Radeon HD 7560D
@Keith Buckner
Not a simple question. Depends somewhat on what's on the drives, and/or how they are set up and powered. You will definitely need a timeout in the startup script (even if you add fstab entries) to allow the network to come up, at least 10s probably. Some computers can solve this via the BIOS, but others not so much. I would just bookmark them in Thunar to connect. Once the OS is up you would only have to click your bookmark.

TC
"You can't depend on your eyes when your imagination is out of focus."
 


Tags:
 


Linux Lite 4.4 Final has been released. See the Release Announcements section for more information.