LINUX LITE 7.2 RC1 RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make auto start script to mount NAS drive?
#1
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:
sudo mkdir /media/NAS1
sudo mkdir /media/NAS2

then in fstab;

Code:
//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:
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
Reply
#2
[member=9000]Keith Buckner[/member]
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
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)