Network hard drive on DD-WRT v3.0-r32170M kongac (06/11/17)

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2  Next
Author Message
Gbriel
DD-WRT Novice


Joined: 30 Jan 2016
Posts: 15

PostPosted: Mon Jan 01, 2018 22:18    Post subject: Network hard drive on DD-WRT v3.0-r32170M kongac (06/11/17) Reply with quote
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
Sponsor
ian5142
DD-WRT Guru


Joined: 23 Oct 2013
Posts: 2318
Location: Canada

PostPosted: Mon Jan 01, 2018 22:35    Post subject: Entware 3X Reply with quote
Setup an Entware 3X install: https://www.dd-wrt.com/wiki/index.php/Installing_Entware-3X

Then run:
Code:

opkg update
opkg install samba4x-server

_________________
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
Gbriel
DD-WRT Novice


Joined: 30 Jan 2016
Posts: 15

PostPosted: Mon Jan 01, 2018 23:07    Post subject: Reply with quote
Thank you ian, I will go ahead and do it and get back with my results!
Gbriel
DD-WRT Novice


Joined: 30 Jan 2016
Posts: 15

PostPosted: Mon Jan 01, 2018 23:52    Post subject: Reply with quote
I have a problem I don't know how to get around.

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.
ian5142
DD-WRT Guru


Joined: 23 Oct 2013
Posts: 2318
Location: Canada

PostPosted: Tue Jan 02, 2018 0:11    Post subject: /opt Reply with quote
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.

What happens when you type in cd /opt?

_________________
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
Gbriel
DD-WRT Novice


Joined: 30 Jan 2016
Posts: 15

PostPosted: Tue Jan 02, 2018 0:16    Post subject: Reply with quote
I have the device here:
--- /dev/sda2
Block device, size 698.5 GiB (750020198400 bytes)
Windows BOOTMGR boot loader
NTFS file system
UUID 825E0E6A5E0E56F7
Volume size 698.5 GiB (750020197888 bytes, 1464883199 sectors)
/dev/sda2 mounted to /tmp/mnt/sda2

So instead of using cd /opt I was using cd /tmp/mnt/sda2

When changing to /opt I get:
root@BICHOUM:/opt#
But at this point I believe I might have created that folder by accident.

When trying to run everything as it is stated on the guide I get the same error.

Should I just mount my hard drive as /opt? How can I do that?
ian5142
DD-WRT Guru


Joined: 23 Oct 2013
Posts: 2318
Location: Canada

PostPosted: Tue Jan 02, 2018 0:25    Post subject: Mount as opt Reply with quote
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
Gbriel
DD-WRT Novice


Joined: 30 Jan 2016
Posts: 15

PostPosted: Tue Jan 02, 2018 0:33    Post subject: Reply with quote
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?
ian5142
DD-WRT Guru


Joined: 23 Oct 2013
Posts: 2318
Location: Canada

PostPosted: Tue Jan 02, 2018 2:50    Post subject: Samba Reply with quote
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
Gbriel
DD-WRT Novice


Joined: 30 Jan 2016
Posts: 15

PostPosted: Tue Jan 02, 2018 3:22    Post subject: Reply with quote
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?
ian5142
DD-WRT Guru


Joined: 23 Oct 2013
Posts: 2318
Location: Canada

PostPosted: Tue Jan 02, 2018 3:56    Post subject: Auto start of Services Reply with quote
I have determined that in order to get Entware programs to auto start, you need to add this to the start up script (Admin - then commands tab):
Code:

sleep 10
/opt/etc/init.d/rc.unslung start


I just updated the wiki page for Entware-3X.

_________________
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
Gbriel
DD-WRT Novice


Joined: 30 Jan 2016
Posts: 15

PostPosted: Tue Jan 02, 2018 4:59    Post subject: Reply with quote
Ahá, running that code gives me:

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?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12836
Location: Netherlands

PostPosted: Tue Jan 02, 2018 9:37    Post subject: Reply with quote
I think Samba had been upgraded on the latest kong build. Consider upgrading to the latest test build.

see: https://www.dd-wrt.com/phpBB2/viewtopic.php?p=1107739&sid=7449f2393a502be5151c1067110c1796

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

On a side note: you do not have "JFFS2 Support" enabled on the Administration page? This is the culprit of a lot of problems when using an USB device

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Gbriel
DD-WRT Novice


Joined: 30 Jan 2016
Posts: 15

PostPosted: Tue Jan 02, 2018 13:38    Post subject: Reply with quote
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.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12836
Location: Netherlands

PostPosted: Tue Jan 02, 2018 13:44    Post subject: Reply with quote
Latest Kong test build: http://www.desipro.de/ddwrt/K3-AC-Arm/TEST/
I have been using this build on a
Linksys EA6900 and Netgear R6400 and it is stable and working

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum