Posted: Mon Jan 01, 2018 22:18 Post subject: Network hard drive on DD-WRT v3.0-r32170M kongac (06/11/17)
Hello everyone,
I am trying to setup a way to access a hard drive connected to the router from windows that will allow me to add and remove files without having to plug the drive into my computer every time I want to add/remove things.
I have a media server running fine but I can't connect to the hard drive from my windows machine to add/remove files. I tried to setup SAMBA but windows tells me they require at least SMB2, I have tried to install SMB2 or 3 on my router but I can't get it running (can't find ipkg).
Is it recommended that I do what I am doing or there is an easier way to move files between my computer and the hard drive connected to the router? Can you guys help me with instructions on how to upgrade SAMBA on my router?
Computer:
Windows 10 Pro (x64 with latest updates sadly)
Router:
Asus RT-AC5300
DD-WRT v3.0-r32170M kongac (06/11/17)
Linux 4.4.70 #340 SMP Sun Jun 11 12:38:55 CEST 2017 armv7l
I am trying to run the script but I keep getting:
mkdir: can't create directory '/opt/bin': Read-only file system
mkdir: can't create directory '/opt/etc': Read-only file system
mkdir: can't create directory '/opt/lib/opkg': Read-only file system
mkdir: can't create directory '/opt/tmp': Read-only file system
mkdir: can't create directory '/opt/var/': Read-only file system
and all the related errors when trying to access those directories.
I am logged in as root. No idea how to get around it.
You need a harddrive partition (ext4 or NTFS format) mounted as /opt. Does not need to be large (~500 MB is fine). If it is labelled "Optware", dd-wrt will automount it to /opt.
Posted: Tue Jan 02, 2018 0:25 Post subject: Mount as opt
The easiest way to mount as /opt is by changing the label of the partition.
Attach the drive to a Windows PC, download a program called Partition Wizard Free edition. Click change label, type in "Optware" (without the quotes).
The other way is by putting in the UUID in the automatically mount to /opt box, sometimes that works, sometimes it doesn't.
There is a command to mount partitions:
Code:
mount -o bind /tmp/mnt/sda2 /opt
The problem with using the mount command is then you have to add it to the start up script. This command only works if the harddrive is always located at /tmp/mnt/sda2 (not sdb2, sda1, etc). Labelling does not have this requirement. _________________ Before asking a question on the forums, update dd-wrt: Where do I download firmware? I suggest reading it all.
QCA Best WiFi Settings
Some dd-wrt wiki pages are up to date, others are not. PM me if you find an old one.
Atheros:
Netgear R7800 x3 - WDS AP / station, gateway, QoS
TP-Link Archer C7 v2 x2 - WDS Station
TP-Link TL-WDR3600 v1 - WDS Station
TP-Link 841nd v8 - NU
D-Link 615 C1/E3/I1 x 7 - 1 WDS station
D-Link 825 B1 - NU
D-Link 862L A1 x2 - WDS Station
Netgear WNDR3700v2 - NU
UBNT loco M2 x2 - airOS
Broadcom
Linksys EA6400 - Gateway, QoS
Asus N66U - AP
Netgear WNDR3700v3 - not used
MediaTek
UBNT EdgeRouter X - switch
I see. I just added the UUID to the automatic mount option and it worked fine.
The script ran fine and I was able to install samba 4x.
Now I need to know the correct commands to get the server running and make it run after restart right?
Do I need to keep my drive mounted to /opt or it is only needed when I want to install something using Entware?
It should run automatically after restart. Entware automatically starts all files that are named S## in the /opt/etc/init.d folder. There should be a samba file there. Open it (using WinSCP or Notepad++ and you will see the command that it will run to start samba, you can use the same command if samba is not already started.
I would stop samba and figure out where the user and share config files are. Most likely somewhere in /opt/etc.
It, your harddrive will have to always be mounted to /opt in order to run Entware software (in your case samba). _________________ Before asking a question on the forums, update dd-wrt: Where do I download firmware? I suggest reading it all.
QCA Best WiFi Settings
Some dd-wrt wiki pages are up to date, others are not. PM me if you find an old one.
Atheros:
Netgear R7800 x3 - WDS AP / station, gateway, QoS
TP-Link Archer C7 v2 x2 - WDS Station
TP-Link TL-WDR3600 v1 - WDS Station
TP-Link 841nd v8 - NU
D-Link 615 C1/E3/I1 x 7 - 1 WDS station
D-Link 825 B1 - NU
D-Link 862L A1 x2 - WDS Station
Netgear WNDR3700v2 - NU
UBNT loco M2 x2 - airOS
Broadcom
Linksys EA6400 - Gateway, QoS
Asus N66U - AP
Netgear WNDR3700v3 - not used
MediaTek
UBNT EdgeRouter X - switch
I got samba installed and setup (I believe I have the settings right, I followed the guide for setting up Samba 3).
I also setup transmission to test it out and found out that nothing from optware is running at start. If I reboot I have to manually start transmission for instance.
I was not able to start SAMBA. I get:
Starting SMB services:
FAIL
Starting NMB services:
FAIL
When running /opt/etc/init.d/S91smb start or even stop and restart
I googled around for a bit but could not find any useful info. Do you have any idea how I can get this working?
Starting SMB services:
FAIL
Starting NMB services:
invalid permissions on directory '/opt/var/log/samba/cores': has 0777 should be 0700
Failed to create /opt/var/log/samba/cores for user 0 with mode 0700
Unable to setup corepath for nmbd: No such file or directory
FAIL
It still fails to start Samba but at least there are some clues on why it is failing. Any ideas on why corepath can't be setup for nmbd?
I am using a USB stick partitioned with NTFS and ext 2 and can read an write to the stick mounted on my R6400 from my Windows 10 Pro latest version.
Just tested with a USB harddrive partitioned as NTFS and that also works
I would like to avoid upgrading as it took me several builds to get my router to work. I tried several different versions at the time and only the one I currently have worked well.
Despite that I tried updating from here http://www.desipro.de/ddwrt/K3-AC-Arm/ and it gave me Firmware: DD-WRT v3.0-r33675M kongac (11/03/17), the update to SMB2 protocol seems to be on the test directory, is that correct? Am I looking into the right place for kong builds?
I decided to try out the little "hack" mentioned on the post and it worked well. Windows would not complain anymore about mapping the share with the built-in samba. Later I will test rebooting the unit to see if the new config is persistent.
My ultimate goal would be to run samba4x from Entware-3x but right now I have no idea what is wrong. I will also try updating to the test build if someone can confirm I am getting the build files from the right location.