Issue trying to install Entware through SSH

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking
Author Message
Farizno
DD-WRT Novice


Joined: 19 Apr 2017
Posts: 14

PostPosted: Sat Apr 13, 2019 1:20    Post subject: Issue trying to install Entware through SSH Reply with quote
Hello,

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).

I have formatted the drive as NTFS as instructed in the Entware installation instructions here: https://wiki.dd-wrt.com/wiki/index.php/Adding_Software_Packages_using_Entware-3X#Package_Installation

The drive is attached to my router, I have core USB support, USB Storage support, and automatic drive mount enabled.

When I SSH into the router and use the command from the instructions above
Code:
wget http://bin.entware.net/armv7sf-k3.2/installer/generic.sh

I keep getting an error that states wget: can't open 'generic.sh' Read-only file system.

Can anyone tell me how to fix this issue? Is it something with the SSH connection parameters that is restricting me? I am using Putty.

Thank you.
Sponsor
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 8034

PostPosted: Sat Apr 13, 2019 1:39    Post subject: Reply with quote
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.
Farizno
DD-WRT Novice


Joined: 19 Apr 2017
Posts: 14

PostPosted: Sat Apr 13, 2019 3:29    Post subject: Reply with quote
Thanks eibgrad.

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.

Thanks for your help.
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 8034

PostPosted: Sat Apr 13, 2019 3:37    Post subject: Reply with quote
Just so you know (for future reference) ...

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.

Code:
mkdir -p /jffs/opt


Then bind that folder to /opt.

Code:
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.
Farizno
DD-WRT Novice


Joined: 19 Apr 2017
Posts: 14

PostPosted: Sat Apr 13, 2019 3:44    Post subject: Reply with quote
Thanks again for the information. You have been very helpful, as always. I appreciate it.
kudzero
DD-WRT Novice


Joined: 17 Apr 2016
Posts: 4

PostPosted: Sat Apr 27, 2019 14:15    Post subject: Reply with quote
Farizno wrote:
Thanks again for the information. You have been very helpful, as always. I appreciate it.


The Entware 3x/ng repos have depreciated and are no longer maintained. They have now merged to a single repo that can be found at

https://github.com/Entware/Entware

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.

Assuming you have a dual core router you'd run the following three commands.
cd /opt
wget http://bin.entware.net/armv7sf-k3.2/installer/generic.sh
sh generic.sh

If you have a single core router check the wiki for the correct version.

https://wiki.dd-wrt.com/wiki/index.php/Installing_Entware
Farizno
DD-WRT Novice


Joined: 19 Apr 2017
Posts: 14

PostPosted: Sat Apr 27, 2019 16:05    Post subject: Reply with quote
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.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking 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 cannot attach files in this forum
You cannot download files in this forum