Posted: Sat Apr 13, 2019 1:20 Post subject: Issue trying to install Entware through SSH
I am rather inexperienced with DD-WRT and Linux so please forgive my ignorance.
I am trying to set up a USB hard drive on my Linksys WRT3200ACM. First I am trying to install Entware and then I will install Samba so that I can use it as a NAS. I am running DD-WRT v3.0-r39144 std (03/11/19).
There normally already is a NAS tab on dd-wrt, right next to the USB tab. So I don't know why you need Entware for your NAS unless you want a more full-featured NAS implementation.
Anyway, there are only a few locations on the filesystem of the router to which you can write. Those are /jffs (assuming you have JFFS enabled on the Administration page) and /tmp (which is a RAM drive). And of course any USB drives you might decide to mount. Other than that, the rest of the system is read-only. And since we can't tell *where* you are wget'in that file *to*, we can't tell if that location is read-only or read/write.
Try changing (cd) to the /tmp directory first, *then* issue the wget. It should work.
I was in the /opt directory as it instructs you to do in the Entware wiki, so I will venture to guess that is a read only directory. I think this may be a moot point if there is an easier way to enable the USB drive for accessing on the network. I dont necessarily need Entware.
I tried a few different settings under the USB tab and the NAS tab, but I still cannot see the drive from the computers on the network. I will have to dive deeper to get a better understanding of how to set it up.
The /opt directory is automatically created by the dd-wrt firmware, but it's NOT bound to any storage! That's why it's producing an error. YOU have to do that first, *then* you can install Entware to the folder.
For example, if you have JFFS enabled, you can create the following folder in /jffs.
mkdir -p /jffs/opt
Then bind that folder to /opt.
mount -o bind /jffs/opt /opt
Now you can install Entware to /opt because that folder has been allocated storage on /jffs/opt
Or you could bind /opt to some folder on a USB stick. Same idea.
Note, you need to issue that bind command on every reboot, using the startup script.
As stated before you want your router to mount the usb drive at boot automatically pointing to /opt
When you can ssh to the router and land on the root of your usb drive with the "cd /opt" command you can install Entware. run the pwd command to make sure you arent still in the routers internal memory, I've had /opt mount there once for some reason. If that's the case navigate to your usb drive manually, the path should be something like /tmp/mnt/sda1/opt and save the "generic.sh" install script there.
Also, your usb drive needs to be formatted as ext3 or ext4 to function properly, not ntfs, and a 500mb swap file might help too. Ntfs isn't native to linux but can be read after entware is installed and the appropriate packages have been installed.
Thanks for the assistance Kudzero. I think I was trying to over-complicate things by installing Entware because I was able to get the USB mounted and recognized by DD-WRT using the options in the GUI under the USB and NAS tabs. For what I was trying to do, it wasn't as complicated as I had initially thought it would be.
Thanks for looking at this and the assistance with Entware. In the future, I may still want to install it and if I do, I will follow your recommendations.