DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2012-02-23 21:56:42

pizzard
Member
Registered: 2012-02-19
Posts: 6

Tutorial: Installing fun_plug 0.7 on different devices

This should evolve into a simple step by step tutorial how to install fun_plug 0.7 and how to work with it.
If you cant understand any of these instructions, know that some information is missing or inappropriate just write me and I will update this guide.
I'm currently doing this on DNS 343, but it should work also for many other devices.

Special thanks to fonz, who created ffp, to Mijzelf for his abi script and to uli for his great tutorials.
In following I quoted Ulis tutorial from here: http://nas-tweaks.net/40/installation-o … many-more/ wherever the procedure is the same.

I also used a lot of this German tutorial as base:
http://wolf-u.li/4523/hdd-installation- … -geraeten/
Thanks to uli for providing this to us.

Preconditions
I dont take any responsibility for anything that happens to your hardware due to this guide.
What you do always contains low risks of data loss or if executed wrong of  unit damage.
You have to take this risk for yourself.

Step 1: Figuring out which ABI to use
The older devices like DNS 323 does not support the new Application Binary Interface. So of fun_plug 0.7 there are 2 versions, one called oarm and one called earm.
o stands for old and e for embedded, so earm (often also just called arm) is the one to prefer if it is available.
In this step we want to figure out which Versions are supported by your NAS.

Download the following Skript: http://pizzard.de/testabi.tar.gz

Afterwards unpack it directly to the first hard drive of your NAS. Make sure that the files are not opened in windows (that will destroy newlines) or at any time placed on a windows disk drive in unpacked state (this will destroy the executable bit).

Afterwards you placed the 3 files fun_plug, testeabi and testoabi in the right position,

Uli wrote:

reboot the NAS by holding down the power button 5 seconds or via the web interface (”Tools” -> ”System” -> ”Reboot”). This causes the NAS to go and find the file fun_plug on Volume_1 and execute it.

On my NAS it was Maintenance -> System -> Restart.

Afterwards you will find a file called supported_abis.log on your first volume.
Open it and look inside.

If your NAS is one of the newer generation, you'll find the following inside:
eabi supported
oabi supported

That means both abis are supported and you can use earm / arm, if there is only the 2. line inside,
you have to use oarm.

If the file does not exist, something has gone wrong and you have to check the file permissions of the fun_plug script. Is it really executable?
If the file exists and is empty, none of the abis is supported by your NAS. This should not happen, in case it does report this here.

Now delete all 3 files from your NAS, so you can start with the real installation of ffp.
NOTE: In the following instructions there is for technical reasons again a script called fun_plug, but do not mix the two up!
Delete the script for abi test now, you will never need it again!

2. Step: Downloading the right package

Depending on the arm you figured out before, download the appropriate fun_plug package:
arm is here:
http://ffp.inreto.de/ffp/0.7/arm/
and oarm is here:
http://ffp.inreto.de/ffp/0.7/oarm/

Download the following files:
- fun_plug (this is a text file, you probably have to right-click to save it to disk)
NOTE: This does not work for: D-Link DNS-320/DNS-325/DNS-345, for these you need a different script here.
- fun_plug.tgz (this is a 10 MByte “tarball” file, roughly the Linux counterpart of a Zip file)

Uli wrote:

Place a copy of both files in the topmost directory of Volume_1 of your NAS using Windows Explorer (see screen shot of what shared network drives looks like in Explorer, or alternatively use Samba or FTP).

Then reboot your NAS (like above).
Now all preconditions are fulfilled and you can start with the installation and configuration itself.

3. Step:  Verifiying fun_plug Installation
After rebooting your NAS there should appear the following:
File: fun_plug
Folder: ffp
File ffp.log

WARNING: This may take some time. If both (the folder ffp and the .tgz archive) are present, your NAS is still working! Just wait for the *.tgz folder to vanish. When it doesn't vanish after some minutes, then sth. went wrong.

If these things appear like that, your installation was successful so far.
Otherwise don't continue, just look into the ffp.log what went wrong and get some help in #irc or here.
Perhaps you have to put the File on Volume2? Perhaps you mixed up abi and oabi?

4. Step: Connect via telnet
Now we want to connect to the NAS via telnet.
Under Windows there is a Tool called putty for this, which can be found here: http://www.chiark.greenend.org.uk/~sgta … nload.html
Download putty.exe and simply execute it.
Afterwards type in the IP-address of your NAS and choose telnet as connection method and click on Open.
Now your NAS should welcome you with at least the following prompt:
sh-4.1#

Congratulations, we are on it!
But now we want to replace this very unsafe telnet connection with a safe, password-encrypted ssh connection.
Therefore we need an appropriately configured user root, what we we do with the following commands:

Code:

usermod -s /ffp/bin/sh root
mkdir -p /ffp/home/root/
sed -ie 's#:/home/root:#:/ffp/home/root:#g' /etc/passwd
pwconv

Afterwards we'll set a new secure root password and then test it by logging in as root.

Code:

passwd
login

This may look like this:

Code:

sh-4.1# passwd
Changing password for root
Enter the new password (minimum of 5 characters)
Please use a combination of upper and lower case letters and numbers.
New password: 
Re-enter new password: 
passwd: password changed.
sh-4.1# login
dlink-9FF13F login: root
Password: 
No mail.
root@dlink-9FF13F:~#

As login type root and as password your newly set password. There isn't anything shown while typing your password, this is correct.
If you were able to login, we'll now store this configuration, otherwise set a new password with passwd.

Code:

wget http://wolf-u.li/u/172/ -O /ffp/sbin/store-passwd.sh
store-passwd.sh

The first command will download this script, the second executes it.
If you get “wget:bad address `wolf-u.li` while executing the first command, the network settings of your NAS are wrong.
Verify a working internet connection for your NAS and try again.
The Result should look similar like this:

Code:

root@dlink-9FF13F:~# wget http://wolf-u.li/u/172/ -O /ffp/sbin/store-passwd.sh
--2012-02-26 19:28:06--  http://wolf-u.li/u/172/
Resolving wolf-u.li... 2a01:488:66:1000:53a9:2a6a:0:1, 83.169.42.106
Connecting to wolf-u.li|2a01:488:66:1000:53a9:2a6a:0:1|:80... failed: Address family not supported by protocol.
Connecting to wolf-u.li|83.169.42.106|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://wolf-u.li/downloads/3779-d2ee273e64e3c3166139f56fbb100067/store-passwd.sh [following]
--2012-02-26 19:28:06--  http://wolf-u.li/downloads/3779-d2ee273e64e3c3166139f56fbb100067/store-passwd.sh
Connecting to wolf-u.li|83.169.42.106|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 875 [application/octet-stream]
Saving to: `/ffp/sbin/store-passwd.sh'

100%[=======================================================================>] 875         --.-K/s   in 0s      

2012-02-26 19:28:06 (9.87 MB/s) - `/ffp/sbin/store-passwd.sh' saved [875/875]

root@dlink-9FF13F:~# store-passwd.sh 
Saving Userdata to flash storage
Mounting flash ...
Updating files ...
  /sys/mtd1/passwd
  /sys/mtd1/group
  /sys/mtd1/shadow
  /sys/mtd1/smbpasswd
  /sys/mtd2/passwd
  /sys/mtd2/group
  /sys/mtd2/shadow
  /sys/mtd2/smbpasswd
  /mnt/HD_a4/.systemfile/AccountFile/passwd
  /mnt/HD_a4/.systemfile/AccountFile/group
  /mnt/HD_a4/.systemfile/AccountFile/shadow
  /mnt/HD_a4/.systemfile/AccountFile/smbpasswd
Unmounting flash ...
root@dlink-9FF13F:~#

Now your settings for root are saved and we can switch to ssh in the next step.

Step 5: Deactivating telnet, activating ssh
Now activate the ssh daemon on your NAS with this commands:

Code:

chmod a+x /ffp/start/sshd.sh
sh /ffp/start/sshd.sh start

The first command makes sshd executable by setting the executable bit, the second command start the daemon.
This may take a while, because on first run it generates key pairs. Therefore some funny looking images are printed.
At last, is responds
Starting /ffp/sbin/sshd

Now DO not close the telnet session to prevent from locking yourself accidentally out of the machine, open a second instance of putty.
Now type again the IP-address of your NAS and select SSH as connection mode.
next it prompts you for your login, this is root and the password is your password from above.
At first connect, the following will also appear in between:

The authenticity of host '137.226.142.194 (137.226.142.194)' can't be established.
ECDSA key fingerprint is f9:ff:83:00:5f:7b:72:c4:9c:72:ef:72:e7:b1:58:23.
Are you sure you want to continue connecting (yes/no)?

This is normal, because you ssh client has never seen this device before, so just type yes.
If everything worked well we can now disable telnet (we have ssh now) with this command:

Code:

chmod -x /ffp/start/telnetd.sh

Afterwards, close both connections by just typing exit (for the first connection you have to do this twice) and reboot your NAS once more.

Step 6: Congratulations
You are done!
fun_plug 0.7 is now successfully installed on your system.
Now you can start installing packages via slacker, compiling your won packages or do a couple of things with your NAS.
Just look around in this forum, visit http://dns323.kood.org/howto:ffp or in irc #funplug on FreeNode

Last edited by pizzard (2012-02-26 21:52:37)

Offline

 

#2 2012-02-26 01:21:40

KyleK
Member
From: Dresden, Germany
Registered: 2007-12-05
Posts: 1178

Re: Tutorial: Installing fun_plug 0.7 on different devices

Is there a list somewhere (on the Wiki maybe?) which shows which NAS supports EABI, and which only supports OABI?
If not, maybe we should create one?

Offline

 

#3 2012-02-26 12:39:32

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Tutorial: Installing fun_plug 0.7 on different devices

Indeed, we've had such a list for 0.5, and need one for 0.7, too.

http://dns323.kood.org/howto:ffp#devices

Offline

 

#4 2012-02-26 13:48:12

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 700

Re: Tutorial: Installing fun_plug 0.7 on different devices

It can also be firmware dependent. All ZyXEL nasses are OABI. But the firmware 4.40 beta for the NSA310 supports EABI.

Offline

 

#5 2012-03-01 15:17:33

Komano
Member
Registered: 2011-06-10
Posts: 42

Re: Tutorial: Installing fun_plug 0.7 on different devices

I don't believe pwconv is supposed to give me this error is it?

"pwconv: failed to change the mode of /etc/passwd- to 0600"

Ideas? On a DNS-320

Offline

 

#6 2012-05-22 02:26:57

turkvu
Member
Registered: 2010-09-29
Posts: 30

Re: Tutorial: Installing fun_plug 0.7 on different devices

<edit> Issue solved, see edit below: </edit>

Having some trouble with the install. I was using fun_plug 0.5 until over the weekend I had some issues (detailed here: http://dns323.kood.org/forum/viewtopic.php?id=7114). So I decided to try to install 0.7. I ran the supported abi's checker and it told me that my 321 supports both oabi and eabi. I downloaded the fun_plug file and fun_plug.tgz file from the abi link and put them both in my Volume_1 directory. On reboot, nothing happened, the tgz file is still present and the ffp.log and ffp directory were not created. So far it's been about 10 minutes since the reboot, so I would think it should have finished by now.

Any ideas?

EDIT: Looks like windows added a .txt to the fun_plug file. I removed the extension and the install seems to have worked.

Last edited by turkvu (2012-05-22 02:32:38)

Offline

 

#7 2013-01-11 06:24:37

beto6971
Member
Registered: 2011-08-13
Posts: 12

Re: Tutorial: Installing fun_plug 0.7 on different devices

Thanks pizzard for the tutorial. I'm quite nubbie for linux but it worked perfect!

Now I have just a question: according to some suggestions, one should install cleanboot first thing, to avoid disk/data problems. But I can not find a version that works with ffp07. Does it exist? Is it recommended to work ffp07 without it? Or it would be better to remove it and install ffp05 that works with cleanboot?

Cheers

[** EDIT on Jan 17th **]

I have installed cleanboot in ffp07. See this thread -> http://dns323.kood.org/forum/viewtopic.php?id=7118

Last edited by beto6971 (2013-01-18 06:13:29)

Offline

 

#8 2013-07-17 23:29:59

askolits
Member
Registered: 2013-07-17
Posts: 7

Re: Tutorial: Installing fun_plug 0.7 on different devices

I had a problem with this process but fixed it. Turns out that when I downloaded the file  "fun_plug.tgz", the file name was changed to fun_plug.gz. The extension was changed.

There is another website which explains installing Fun_Plug almost exactly as the original post above. But it actually mentioned the possible problem:

"Ensure that these two files are named fun_plug (not fun_plug.sh) and fun_plug.tgz (not fun_plug.gz or fun_plug.tar.gz or fun_plug.tar)."

Here is that site explaining how to install Fun_Plug.

http://nas-tweaks.net/371/hdd-installat … s-devices/

Last edited by askolits (2013-07-17 23:30:38)

Offline

 

#9 2013-07-18 17:20:18

askolits
Member
Registered: 2013-07-17
Posts: 7

Re: Tutorial: Installing fun_plug 0.7 on different devices

I finally got everything working. But  was trying to install the nano editor. Not sure what I did but slacker no longer runs. Here is the error. BTW, I'm a newbie to all this.

root@FTP_Server:~# slacker -U
Updating package lists...
cut: can't resolve symbol 'posix_fadvise64'
cut: can't resolve symbol 'posix_fadvise64'
FATAL: cache: don't know how to fetch from
root@FTP_Server:~#───────────────────┘

root@FTP_Server:~# slacker -i
sort: can't resolve symbol 'posix_fadvise64'
No packages found (status i, pattern )
root@FTP_Server:~#

Offline

 

#10 2013-07-19 14:11:26

memiks
Member
Registered: 2011-09-02
Posts: 72

Re: Tutorial: Installing fun_plug 0.7 on different devices

try to install /ffp/lib/libuClibc-0.9.29.so

Offline

 

#11 2013-07-19 14:27:29

askolits
Member
Registered: 2013-07-17
Posts: 7

Re: Tutorial: Installing fun_plug 0.7 on different devices

Well, I was able to get it working again by uninstalling fun_plug and starting from scratch.
Then it happened again and then again.
Each time I uninstalled and re installed fun-plug. (What a pain)

It looks like one of the fonz package installs was causing the problems. So I decided not to install 'all' the fonz packages.
So I'm OK right now. But, I'm now trying to install mysql. It seems that the install process runs but none of the folders and sample data was installed.

It could be that one of the fonz packages may be required to fully install mysql. I just don't know.

I'm totally knew to all this unix/linux stuff and a bit confused.

Offline

 

#12 2013-07-19 18:33:20

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 700

Re: Tutorial: Installing fun_plug 0.7 on different devices

I think there is a bug in the nas-tweaks.net tutorial:

Download the latest files:
fun_plug
fun_plug.tgz
Version “OARM” for OABI-devices (like the DNS-323 and CH3SNAS): http://inreto.de/dns323/fun-plug/0.7/oarm/fun_plug.tgz

While fonz says: (http://inreto.de/dns323/fun-plug/0.7/)

Getting started

  For DNS-323 and CH3SNAS (and other OABI-based devices), use the
  files from the oabi/ directory.

The /oarm version is depricated, and should not be used. (Don't know why fonz never removed it)

Offline

 

#13 2013-07-19 21:16:50

askolits
Member
Registered: 2013-07-17
Posts: 7

Re: Tutorial: Installing fun_plug 0.7 on different devices

I'm a bit confused.

When you quoted the  nas-tweaks.net tutorial, where you implying it was wrong and I should "not" use ' http://inreto.de/dns323/fun-plug/0.7/oarm/fun_plug.tgz' 

So therefore, I should get the files from :  http://www.inreto.de/dns323/fun-plug/0.7/oabi/  ??

Update #1:
Well, I did re-install again (I thin it's the 6th time so far)  using  http://www.inreto.de/dns323/fun-plug/0.7/oabi/.

After install fun_plug, the file "/ffp/etc/ffp-version" says:

FFP_VERSION=0.7.1
FFP_ARCH=oarm

Am I good so far?

___


Update #2:
I continued my efforts and noticed that 2 versions of mySql were downloaded when getting the packages.
"mysql-5.0.67-2.tgz"  and "mysql-5.1.58-2.tgz"

I also noticed that on the site:
  http://www.inreto.de/dns323/fun-plug/0. … KAGES.html  it has a different another version.
"mysql-5.1.61-oarm-4.txz"


I noticed that the site also said I needed libraries installed.

So before I tried to install any of those versions of mySql, I installed :
gcc-4.6.2-oarm-1.txz  (That installed fine -OK)
gcc-solibs-4.6.2-oarm-1.txz (That installed fine -OK)
uClibc-0.9.33-oarm-2.txz (!ERROR!)

Messgae wasL:
cut: can't resolve symbol 'posix_fadvise64'

Now I can't get into slacker anymore

So it seems the file "uClibc-0.9.33-oarm-2" is screwing things up.

Last edited by askolits (2013-07-19 22:26:37)

Offline

 

#14 2013-07-19 23:28:19

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 700

Re: Tutorial: Installing fun_plug 0.7 on different devices

Where did you get that uClibc-0.9.33 from? The only place where I can see it is in oarm/. The libraries from oarm/ and oabi/ are *not* interchangeable. Unfortunately the package names don't tell their real nature, so you have to check the repositories. AFAIK almost all 3th party repositories are oabi.

When I remember well the uClibc was the whole point between oarm and oabi. Fonz originally created oarm, with uClibc 0.9.33, but OABI was no longer supported. It compiled, and seemed to work, but the lib turned out to be unstable, when tested broader..So he went back to 0.9.29, and called it 'oabi'.
0.7/oarm has been around for about a month.

Offline

 

#15 2013-07-21 23:38:51

askolits
Member
Registered: 2013-07-17
Posts: 7

Re: Tutorial: Installing fun_plug 0.7 on different devices

I think it came down with a whole bunch of other packages when I ran "slacker -a"

fetch: (cd '/ffp/funpkg/cache/memiks'; wget -Nnv 'http://ffp.memiks.fr/pkg/oarm/                                                             /uClibc-0.9.33-oarm-2.txz')

When I went through the slacker install list, I think that was the only version of uClibc I found.
And I don't recall if slacker showed the oarm type or not.

Either way, let me do it all again, and when I get the point where I have to install uClibc, I'll make sure it's oabi. If I can't tell, I'll let you know.
FYI, I'm in the US (est). I'll do it tomorrow morning 7AM my time.

BTW, right now when I run PuTTY, I get "Network error: Connection Refused". So, I'm going to have to start all over again from scratch.  I've done it so many times now, it's really no big deal.

Thanks for your continued assistance.

Offline

 

#16 2013-07-22 22:04:51

askolits
Member
Registered: 2013-07-17
Posts: 7

Re: Tutorial: Installing fun_plug 0.7 on different devices

Slowly figuring all this out.

I got "uClibc-0.9.33-oarm-2.txz" from running the instructions in:

http://nas-tweaks.net/398/installing-an … _plug-0-7/

I believe it was downloaded when running - uwsiteloader.sh

To be safe, I only loaded the packages from fonz & Uli.  The other two, I skipped. Mijzelf and Memiks,

So, as i'm slowly learning all this I watched carefully to make sure all the files coming down were from a location for fun_plug version 0.7 .

I then ran slacker -a s: and picked only those packages I needed.
(gcc gcc-solibs ncurses readline uClibc uClibc-solibs zlib).

I was able to then install MySql!  Yea!! (Just haven't figured out yet how to start it, but working on it.)

The bottom line is that with 0.6 and 0.7 packages out there, it's very, very confusing. And with various web pages pointing to various links, it's sometimes hard to tell if the file is oarm or oabi.

I may be back here if I can't get MySql started, but I know it's now installed. wish me luck.

Again, thanks for your help.!!  smile

Offline

 

#17 2018-04-29 03:27:28

andwan0
Member
Registered: 2013-01-03
Posts: 9

Re: Tutorial: Installing fun_plug 0.7 on different devices

This is great guide and many others have based their fun_plug 0.7 install guide from this original guide... in website/webpage format.

However, some websites have changed from http to https... and the fun_plug's wget doesn't support https.

Also, slacker doesn't seem to work with https also... rsync too old?

Offline

 

#18 2018-05-01 22:33:25

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 700

Re: Tutorial: Installing fun_plug 0.7 on different devices

Are you sure wget doesn't support https? AFAIK it does.

About slacker, it uses wget internally. And AFAIK only fonz' repository (inreto.de) used rsync. Nothing has changed there the last 5 years, except rsync disappeared. I guess the rsync installation died by some OS update.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB