General NAS-Central Forums

Welcome to the NAS community
It is currently Thu Sep 21, 2017 7:35 pm

All times are UTC




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sun Mar 13, 2016 1:10 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
Introduction
Entware-ng is created as replacement for the outdated and unsupported optware. Is is based on OpenWRT. For us this means that all packages for OpenWRT are also available on Entware-ng, with exception of the kernel modules.

More information on the Entware-ng site.

Installation on a Lenovo/Iomega nas

To install Entware-ng you need ssh root access. Depending on your firmware version that has to be done in different ways:

Old firmware:
Go to https://<ip-of-nas>/manage.html and login as admin
Then go to https://<ip-of-nas>/diagnostics.html and enable ssh. Maybe this doesn't work, then go to https://<ip-of-nas>/support.html .
The password for root is soho<admin password>

New firmware:
Go to https://<ip-of-nas>/ and login as admin
Then go to https://<ip-of-nas>/manage/diagnostics.html and enable ssh. Enter a password for root. Possibly you'll have to add a 'soho' prefix (without quotes) when actually logging in.


The actual installation:
Login as root over ssh. (On a Windows system you can use PuTTY for that).

Then
Code:
cd /opt
wget http://downloads.iomega.nas-central.org/Users/Mijzelf/Misc/entware-ng-starter-20160316.tgz
tar xf entware-ng-starter-20160316.tgz
./entware-ng-starter.sh install
That's all. Log out and login again, then the /opt/ directories are added to PATH, and opkg is usable
Code:
opkg update
opkg list | less
1853 packages, at the moment. My personal favorite is Midnight Commander
Code:
opkg install mc


Old kernel support
Entware-ng needs kernel 2.6.32 or newer. Because my ix2-ng has a 2.6.31.8 kernel (just like most kirkwood devices) that is a problem. I have recompiled Entware-ng libc with support for 2.6.24 en newer. These libraries are automatically installed when you have an 'old' kernel. As far as I know that works fine. The libraries are in use for some time on ZyXEL devices, and I haven't had any complaints.

When for some reason the stock libc is reinstalled, nothing works anymore. You will only get 'FATAL! Kernel too old' messages. Then you can run /opt/sbin/kernel-2.6.24-support.sh (or reboot, then that script is also executed) which restores the symlinks.

x86
Entware-ng supports armv5, armv7, mipsel, x86-32 en x86-64. In my script I added detection for armv5, armv7 and x86-32. It is possible that it doesn't work on an x86, as I didn't know the output of 'uname -m' on a x86 based Iomega. My Atom laptop gives i686, and that's in the script. If an x86 Iomega outputs something else, let me know, then I'll change the script.

Directories
The tutorials in the Entware-ng wiki assum that your data storage is in the /opt directory, as in the instructions for Transmission
Wiki wrote:
Create the data directories (adjust as desired):
Code:
mkdir /opt/Torrent/
mkdir /opt/Torrent/Incomplete
mkdir /opt/Torrent/Watch
mkdir /opt/Torrent/Completed
That is not a good idea on an Iomega. The /opt directory existed already, because the packages of Iomega are installed there too. (in /opt/apps). Because of that Entware-ng is on the 'apps partition', and not on the data partition. So put directories from which you can expect that they will contain a lot of data on a data partition (on my system /mnt/pools/A/A0/). If you want you can create a symlink in the /opt/ directory, to follow the tutorial as close as possible.

The firmware also uses the /opt directory, the 'apps' (silly word)[/size] are in /opt/apps/ and the package system itself in /opt/dpkg/. Unless you know what your are doing you'd better not touch them.

Entware-ng & FFP coexisting
FFP and Entware-ng are both designed to exist next to the firmware, without interfering. A side effect is that they can coexist fine. But there are some small problems.

It's all in the PATH. When you type a command, the shell searches it's PATH to find it, and execute it. You can examine your PATH by typing
Code:
echo \$PATH
Normally, it contains something like '/usr/bin:/usr/sbin:/bin:/sbin'. This means the shell will first look in /usr/bin for your command, then in /usr/sbin, then in /bin, ...
Entware-ng puts itself in the PATH by prefixing it with '/opt/bin:/opt/sbin:', while FFP prefixes it with '/ffp/bin:/ffp/sbin:', but the way they do this is different.
When logging in, your shell is read from /etc/passwd. By default this is /bin/sh. This shell executes /etc/profile to set it's environment.
Entware-ng hooks this by making /etc/profile to source /opt/etc/profile, which adds the Entware directories to the PATH.
The FFP package exchanges the default shell in /etc/passwd by it's own shell, /ffp/bin/sh, which doesn't use /etc/profile, but /ffp/etc/profile, which appends the FFP path.

So if you have both FFP and Entware-ng installed, your PATH will by default not include the Entware-ng directories, as you are running an FFP shell, which doesn't use /etc/profile, and so doesn't use /opt/etc/profile either.
This problem can be solved by providing the full path when you want to execute an Entware-ng command:
Code:
/opt/bin/some_command
or you can source /opt/etc/profile:
Code:
. /opt/etc/profile
The latter has the problem that Entware-ng will put it's directories in front of the FFP directories,
which means the Entware-ng binaries will be prefered above the FFP one's. (Which can be solved by providing the full path of the desired FFP binaries)


Top
 Profile  
 
PostPosted: Tue Jun 14, 2016 12:05 am 
Offline

Joined: Tue Jun 14, 2016 12:00 am
Posts: 2
I have ffp installed, i can install Enttware but when i run the command:
Code:
opkg update

the result is
Code:
-sh: opkg: command not found
.


Top
 Profile  
 
PostPosted: Tue Jun 14, 2016 10:51 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
I extended the startpost.


Top
 Profile  
 
PostPosted: Mon Sep 12, 2016 2:49 am 
Offline

Joined: Mon Sep 12, 2016 2:42 am
Posts: 2
This seems like the answer to my needs but I have an ix4-300d. Do you know if it will run on an ix4 box?

I'm tempted to just try it but I don't want to make my NAS unbootable or something.

Also, in the newer LenovoEMC firmwares, /opt gets reset and you lose any changes on reboot, does this package take that into account? Will it work even though this is the case?


Thanks in advance for your answers!


Top
 Profile  
 
PostPosted: Mon Sep 12, 2016 8:38 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
It should run fine on an ix4-300d, but I haven't tried it, nor have I got feedback that it works.

Quote:
Also, in the newer LenovoEMC firmwares, /opt gets reset and you lose any changes on reboot, does this package take that into account?
I'm not sure. This thread is dated 2016-03-13, at which time it worked fine on my ix2-ng. According to Lenovo's version history at least 4 firmware updates have been released after that date. I can't remember if I updated the firmware since March, but I'm pretty sure I didn't do it 4 times. Maybe once.

How does it get reset? On older firmwares the packages of the EMC package system are also installed in /opt, so you can't simply delete it. Anyway, as soon as I have time, and access to my ix2, I'll update the firmware and see if it breaks my package.


Top
 Profile  
 
PostPosted: Mon Sep 12, 2016 7:13 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
Updated to firmware 4.1.212.33882, the latest, and also the latest for the ix4-300d, and Entware-ng is running fine. Rebooted twice, to see if it disappears, but no. There doesn't seem to be a hostile cronjob either, so I think it's fine.


Top
 Profile  
 
PostPosted: Mon Sep 12, 2016 11:19 pm 
Offline

Joined: Mon Sep 12, 2016 2:42 am
Posts: 2
Okay, that's awesome! Thanks for going through the trouble of testing that for me.

The /opt issue was introduced some time back and it obliterated the hacks we were using previously to make better use of our NAS'.

Here is my best description of what occurs normally (post FW update that did this) when one attempts to modify /opt:

SSH into box and begin modifying /opt in order to modify scripts and install/update packages using ipkg. /opt/bin is created and all seems to go as planned.
Then after rebooting, /opt/bin is gone and so are all changes within /opt.
Cron jobs seem an obvious place to look for a process to reset /opt, only I don't believe that is necessary because, if I am guessing correctly, when we modify /opt through the cmd line, under the newer firmware, we are actually only making modifications to the state of /opt that is loaded into memory and no actual change occurs in the true /opt partition so that, upon reboot, /opt appears to return to it's default state.
It's like the changes were never made because, in essence, those changes were never actually committed to storage.

At least that's what I believe is happening.

Nonetheless, I am not alone in noticing this behavior. If you visit Steven Breuls rather awesome website that documents the hacking methods we once used (he's a pretty bright dude), then go to the 'Install optware ipkg' post and look in the comments section, you'll see a comment from a user named Lexxx that details the issue.

Here's a link:
http://stevenbreuls.com/2013/04/install ... -300d-nas/

Regarding the entware install package... it seemed to install without a hitch and started fine.

I have yet to reboot so I'll update you when I do.

The ffp Lifeline app package does not install however. The gui reports it as invalid.

I attempted to install it but the app manager rejects the package as invalid.

Thanks again for your efforts. I look forward to exploring the new possibilities this will open up.


Top
 Profile  
 
PostPosted: Thu Sep 15, 2016 5:20 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
RoidDroidVoid wrote:
Reading that I don't see a fundamental difference between my script and Steven's instructions. But I also didn't see the behaviour Lexx saw. So I see 3 possibilities:
  • The ix4-300d is actually running a different firmware.
  • This 'bug' was solved in a later firmware.
  • Somehow a 'clear /opt' function can be triggered, which I didn't do yet. Maybe when the /opt partition is running out of space, some cleaning is done? Actually I only installed some tools like mc and htop, and of course rsnapshot, the primary reason for wanting this.
Quote:
The ffp Lifeline app package does not install however. The gui reports it as invalid.
I know. Actually it's hard to write a lifeline app. There needs to be a 'package daemon', responsible for communicating with the package manager, and it has to communicate over dbus, when I remember well. So a simple start-stop script is not enough. The ffp app didn't meet this constraint. Somehow it was a lucky shot that it worked anyway. Simply adding some files rendered it uninstallable.
And a later firmware change disabled it completely.


Top
 Profile  
 
PostPosted: Fri Sep 23, 2016 11:28 am 
Offline

Joined: Thu Sep 22, 2016 4:51 pm
Posts: 9
hi i dropped FFP and am triyng to install Entware
every think went cool :D
but whnen i want to install transmission
all is well up to this command
/opt/etc/init.d/S88transmission stop
i got response :cry:
-sh: /opt/etc/init.d/S88transmission: No such file or directory
thats what i have in the init.d directory
root@ix2-200-Hb:/opt/etc/init.d# dir
rc.func rc.unslung S99ProfileHook
root@ix2-200-Hb:/opt/etc/init.d#

what's wrong with my iomega ix2-200 CE firmware ix2-200-3.2.14.30167 ? :roll: :roll:
thank you :mrgreen:


Top
 Profile  
 
PostPosted: Fri Sep 23, 2016 3:57 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
Did you actually install transmission?


Top
 Profile  
 
PostPosted: Fri Sep 23, 2016 9:17 pm 
Offline

Joined: Thu Sep 22, 2016 4:51 pm
Posts: 9
yes
I followed the tutorial on the site https://github.com/Entware-ng/Entware-n ... ansmission
and when i arrive to the line /opt/etc/init.d/S88transmission stop
and when i try aganin to reinstall it i have the message
root@ix2-200-Hb:/# opkg install transmission-web nano
Package transmission-web (2.92-3) installed in root is up to date.
Package nano (2.6.0-1) installed in root is up to date.
root@ix2-200-Hb:/#

thank you


Top
 Profile  
 
PostPosted: Sat Sep 24, 2016 7:44 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
I think it's a bug in the transmission-web package. I looked in it, and it doesn't contain transmission itself. So it should pull the transmission daemon, which it doesn't.

I think you'll have to install either transmission-daemon-openssl or transmission-daemon-polarssl, depending on your favorite ssl package. If you don't care, I *think* polarssl will be slightly faster. At least the lib is smaller.


Top
 Profile  
 
PostPosted: Sat Sep 24, 2016 8:22 am 
Offline

Joined: Thu Sep 22, 2016 4:51 pm
Posts: 9
Good morning
I forget to say that i am newbie :oops: in linux command
How can i do that is there tutorial for that
And i plane to install plex too. is it possible ? :|


Top
 Profile  
 
PostPosted: Sat Sep 24, 2016 10:23 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6039
Code:
opkg install transmission-daemon-polarssl


Top
 Profile  
 
PostPosted: Sat Sep 24, 2016 10:36 am 
Offline

Joined: Thu Sep 22, 2016 4:51 pm
Posts: 9
:o :o :o
:lol: :lol: :lol:
:D
thank you
i try and reply


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group