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 2010-11-13 17:19:38

maarten80
Member
Registered: 2010-11-13
Posts: 10

DNS-320 and fun_plug

Hi all,

Just bought myself an D-Link DNS-320 the other day.
Reading with great excitement your tricks here, to start with the fun_plug script from Fonz (Thanks for the great work).

At first it didn't work for my device sad But then I found how it could work for me, from reading the backup configuration file.
For some reason (either because I'm using Raid 1, or because this new device uses a slightly different system the hd volumes where not as /mnt/HD_a2/ anymore, but on my device its /mnt/HD/HD_a2/.

Attached my updated 0.5 script for reference only!, of course (Fonz or others) it would be nice if you could update the script to check which devices are there and use that one?

Now I have to continue setting up everything, ssh etc.

Laterz,
Maarten

Edit: Attachment not working, some php error... But I guess most of you get the idea, if not ask!

Last edited by maarten80 (2010-11-13 17:21:48)


DNS-320 - Back-up server, running fun_plug just for fun

Offline

 

#2 2010-11-13 19:50:33

maarten80
Member
Registered: 2010-11-13
Posts: 10

Re: DNS-320 and fun_plug

Fiddling around some more now, and it looks like there are some more differences with this device sad
For example the store_passwd.sh script shows:

Code:

mount: mounting /dev/mtdblock0 on /sys/mtd1 failed: No such file or directory

DNS-320 - Back-up server, running fun_plug just for fun

Offline

 

#3 2010-11-15 10:48:25

frederikk
New member
Registered: 2010-11-15
Posts: 4

Re: DNS-320 and fun_plug

Hello,

from France, so please excuse my english smile

I'm quite interested in this product... but accessing it by ssh with a support of packages (ipkg or apt-get) is mandatory for me smile. So i'm very interested in progress made for that smile

In france the 2bay nas will be priced at 99 euros which is a fair price  !
Hoping it has quite good perfs and it is silent...

Ciao
Fred

Offline

 

#4 2010-11-15 12:29:19

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

Re: DNS-320 and fun_plug

maarten80 wrote:

Fiddling around some more now, and it looks like there are some more differences with this device sad
For example the store_passwd.sh script shows:

Code:

mount: mounting /dev/mtdblock0 on /sys/mtd1 failed: No such file or directory

You may want to try the alternative store-passwd.sh script from http://nas-tweaks.net/CH3SNAS:Store-passwd.sh
The currently known list of password file locations includes: /sys/mtd1 /sys/mtd2 /mnt/HD_a4/.systemfile/AccountFile /mnt/HD_b4/.systemfile/AccountFile
Can you check where your box stores them?

Offline

 

#5 2010-11-15 22:10:44

maarten80
Member
Registered: 2010-11-13
Posts: 10

Re: DNS-320 and fun_plug

Haven't actually tried the other scripts (sorry), but I think they won't work either.

My device is missing the /sys/mtd* entries. The whole /sys/ is empty.
Also nothing traceable in the .systemfile on any HD_* (ls -la -R /mnt/HD_*)

Is there a way to create those files mtd0, mtd1, with mknod or something?
/dev/mtdblock5 is mounted though, so it should be possible to mount the others also.
I'm interested to see whats in the uboot also smile

I did notice the following other info from, mount
/dev/loop0 on /usr/local/modules type squashfs (ro)
/dev/mtdblock5 on /usr/local/config type jffs2 (rw)

And then
/usr/local/default -> /usr/local/modules/default

And also in /usr/local/modules there is JFFS2_config.img
But everything kind of blocks my view/understanding of what is what... he he

Edit: Any other ideas how to find the location where it could store it? Commands for search are more then welcome.

@frederikk: I think it has 800Mhz and 128MB. To me its pretty noisy, but I think thats because of the HDDs, the fan is okay silent, so is the device when idle.

Last edited by maarten80 (2010-11-15 22:11:31)


DNS-320 - Back-up server, running fun_plug just for fun

Offline

 

#6 2010-11-15 22:40:24

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

Re: DNS-320 and fun_plug

maarten80 wrote:

Commands for search are more then welcome.

To search all (mounted) disks (and ramdisks), use:
find / -name passwd

If this doesn't find a passwd file, it may be needed to mount a flash drive or disk partition. Grepping for passwd in the web interface files might reveal a path.

Offline

 

#7 2010-11-16 15:44:02

frederikk
New member
Registered: 2010-11-15
Posts: 4

Re: DNS-320 and fun_plug

Thank you for your answer ? smile
What type of disks have you got ? For this kind of device, HDD should be 5400rpm ones, WD green or other "low power" disks I think. They will always have enough bandwith for this kind of devices ?
If you really hear the disks and not the fan, so the fan seems very very quiet to me !!! wink


fonz : stupid question : to see mounted disks, why doesn't he simply make a "mount command" ? or a "df -h" ? I don't understand the search for a passwd file ?? But i'm totally newbie in d-link's nas devices, i just know a little linux.

But if he can launch such commands, that means he have ssh or telent access to the DNS-320 pulse  ???


Ciao
Fred

Last edited by frederikk (2010-11-16 15:45:06)

Offline

 

#8 2010-11-16 20:36:14

maarten80
Member
Registered: 2010-11-13
Posts: 10

Re: DNS-320 and fun_plug

@frederikk: I have Seagate 500GB 7200rpm disks, had those laying around smile And yes, I had telnet already running, but changing the admin password didn't survive a reboot, hence the questions and response from the helpfull fonz. Indeed the mount command, shows the currently mounted devices also /etc/fstab can give info on what is mountable, but my system is completely missing the /sys/mtd* folders/nodes.

The "find / -name passwd" list the following:

Code:

/etc/passwd
/mnt/HD/HD_a2/ffp/bin/passwd
/usr/bin/passwd
/usr/local/modules/default/passwd
/usr/local/config/passwd

I think I'm successfull now, and the password survives a reboot. It doesn't look like the DNS-320 is using those /sys/mtd* blocks. Instead if I copy all the files listed in the store-passwd.sh to /usr/local/config (which is mounted to the mtdblock5, see previous post), the reboot doesn't change the password back.

I don't know where that /usr/local/modules/default/* stuff goes to though, as that folder is mounted to somewhere??

Code:

/dev/loop0 on /usr/local/modules type squashfs (ro)

Anyway, the DNS-320 is up and running now, with only SSH access and telnet disabled :great:


DNS-320 - Back-up server, running fun_plug just for fun

Offline

 

#9 2010-11-20 01:29:13

frederikk
New member
Registered: 2010-11-15
Posts: 4

Re: DNS-320 and fun_plug

Interesting and cool ! So how about the perfs ? How about tweaking ? Can you get some infos on the cpu ? the linux distribution, etc... ?

Ciao
Fred

Offline

 

#10 2010-11-20 09:30:59

maarten80
Member
Registered: 2010-11-13
Posts: 10

Re: DNS-320 and fun_plug

frederikk wrote:

Interesting and cool ! So how about the perfs ? How about tweaking ? Can you get some infos on the cpu ? the linux distribution, etc... ?

Ciao
Fred

I just use it as backup and printer server smile But I guess it might be interesting for other people to know some more about the device.

What do the moderators think, should I place some more information here, or should I create a page in the dns323.kood.org site specially for the dns-320?


DNS-320 - Back-up server, running fun_plug just for fun

Offline

 

#11 2010-11-20 15:11:00

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

Re: DNS-320 and fun_plug

maarten80 wrote:

What do the moderators think, should I place some more information here, or should I create a page in the dns323.kood.org site specially for the dns-320?

Feel free to create a wiki page specifically about the DNS-320, and add links as you see fit. If you add information on how to install ffp, you may want to add a link from
http://dns323.kood.org/howto:ffp#installation

Offline

 

#12 2010-11-22 22:20:08

maarten80
Member
Registered: 2010-11-13
Posts: 10

Re: DNS-320 and fun_plug

I started http://dns323.kood.org/dns-320

Feel free to add, or request some more specifics here, as I'm not the biggest Linux guru, you might wanna spill a command for me to execute to get you the info.


DNS-320 - Back-up server, running fun_plug just for fun

Offline

 

#13 2010-11-23 11:19:01

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

Re: DNS-320 and fun_plug

maarten80 wrote:

Ihttp://dns323.kood.org/dns-320

Perfect, but what does "200 - 800 MHz" mean? Does it change clockspeed automatically, like Intel CPUs?

Offline

 

#14 2010-11-23 21:12:03

maarten80
Member
Registered: 2010-11-13
Posts: 10

Re: DNS-320 and fun_plug

fonz wrote:

maarten80 wrote:

http://dns323.kood.org/dns-320

Perfect, but what does "200 - 800 MHz" mean? Does it change clockspeed automatically, like Intel CPUs?

I copied that info from dmesg output smile

Code:

cpufreq: Init kirkwood cpufreq driver
cpufreq: High frequency: 800000KHz - Low frequency: 200000KHz
cpufreq: Setting CPU Frequency to 800000 KHz
cpufreq: Setting PowerSaveState to off

but haven't seen anywhere that its set to 200Mhz, but I guess it should be possible?


DNS-320 - Back-up server, running fun_plug just for fun

Offline

 

#15 2010-11-23 23:50:26

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

Re: DNS-320 and fun_plug

If you load the cpufreq_stats module, you can see in /sys/devices/system/cpu/*/cpufreq/stats/time_in_state how much time it spent at each speed. It should also be possible to set the speed manually or to load "governors" that automatically slow down the cpu when idle.

Offline

 

#16 2010-11-28 13:27:09

nimmur2000
New member
Registered: 2010-11-28
Posts: 4

Re: DNS-320 and fun_plug

I have configured funplug but after i reboot i cannot access the ssh session. any idea??

Offline

 

#17 2010-11-28 14:49:13

maarten80
Member
Registered: 2010-11-13
Posts: 10

Re: DNS-320 and fun_plug

nimmur2000 wrote:

I have configured funplug but after i reboot i cannot access the ssh session. any idea??

What have you done so far? It takes some extra work to get ssh up, you first have to login via telnet, change the password and enable ssh startup.
Did you already do all that? http://nas-tweaks.net/CH3SNAS:Tutorials … t_password

If yes, I assume you also updated the store-passwd.sh script?

If you also did that, it might not be foolproof then...

Let us know, I might have some other trick you could try, and then we can get a better tutorial for this.


DNS-320 - Back-up server, running fun_plug just for fun

Offline

 

#18 2010-11-29 04:32:07

nimmur2000
New member
Registered: 2010-11-28
Posts: 4

Re: DNS-320 and fun_plug

I followed the same document and did all the steps!!

Everything works fine until i rebooted my NAS sad

Could you please share the other trick??

Offline

 

#19 2010-12-01 16:25:37

maarten80
Member
Registered: 2010-11-13
Posts: 10

Re: DNS-320 and fun_plug

Ups, sorry for the late reply...

In case the root password is not stored you can change the root password as described in that tutorial, but then instead of executing the store-passwd.sh command, use the web interface to add a user, that should also backup all the needed files.

But is it that your password is not stored, or that the whole SSH is not accessible?
If the ssh is not accessible at all, you should check if ssh start script has the right permissions again 'ls -l /ffp/start/'


DNS-320 - Back-up server, running fun_plug just for fun

Offline

 

#20 2010-12-06 05:27:47

nimmur2000
New member
Registered: 2010-11-28
Posts: 4

Re: DNS-320 and fun_plug

@Maarten80 - I have changed to factory settings and reformatted my HD. now ssh working fine but haven't rebooted.

Offline

 

#21 2010-12-06 05:36:15

nimmur2000
New member
Registered: 2010-11-28
Posts: 4

Re: DNS-320 and fun_plug

Any one working DNS 320 with Mac OS X snow leopard??

Offline

 

#22 2010-12-08 00:14:22

garath
Member
Registered: 2010-12-07
Posts: 5

Re: DNS-320 and fun_plug

Hello,

I've installed funplug on my DNS 320.
Everything works fine if we take care of the HD directory location.

I've installed lighttpd, php, mysql, phpmyadmin.
But the kickwebs script doesn't work, i think process for embeded web server on this nas is different.
So when lighttpd is started i can't acces to Dlink configuration webpages.
I need to reboot the NAS in order to acces at these pages.
But there i can't acces to lighttpd even if it has started.

if i can't execute kickwebs.sh:
dlink configuration is running on port 80
lighttpd is running on port 8080 (default configuration)

it would be ok for me but i want to keep both access. It seems that only one web server can run at the same time.
Is someone can help me to find the good process to kick in order to have both servers?

Thanks for your help!

Offline

 

#23 2010-12-08 02:07:43

jamieburchell
Member
Registered: 2010-03-25
Posts: 37

Re: DNS-320 and fun_plug

Can anyone tell me if the Linux kernel is newer than on the 323? I haven't been able to use smartmontools over USB yet on the 323 because of the dated kernel. Do FFP packages compiled for the 323 work on the 320?

Last edited by jamieburchell (2010-12-08 02:08:37)

Offline

 

#24 2010-12-08 11:12:23

Aros
New member
Registered: 2010-12-08
Posts: 3

Re: DNS-320 and fun_plug

I got my DNS-320 yesterday. I have followed the guide to install the fun_plug. After some tries that worked, it is installed and all the files are on the disk. However I can't telnet to the NAS, thus it's not working. Perhaps you guys can help me. Here's the log it spit out:

Code:

**** fun_plug script for DNS-323 (2008-08-11 tp@fonz.de) ****
Tue Dec  7 21:43:10 CET 2010
ln -snf /mnt/HD/HD_a2/ffp /ffp
* Installing /mnt/HD/HD_a2/fun_plug.tgz ...
* OK
* Running /ffp/etc/fun_plug.init ...
* Running /ffp/etc/rc ...
* /ffp/start/syslogd.sh inactive
* /ffp/start/SERVERS.sh inactive
* /ffp/start/portmap.sh inactive
* /ffp/start/unfsd.sh inactive
* /ffp/start/nfsd.sh inactive
* /ffp/start/ntpd.sh inactive
* /ffp/start/LOGIN.sh inactive
* /ffp/start/telnetd.sh ...
Starting /ffp/sbin/telnetd -l /ffp/bin/sh
* /ffp/start/sshd.sh inactive
* /ffp/start/rsyncd.sh inactive
* /ffp/start/mediatomb.sh inactive
* /ffp/start/kickwebs.sh inactive
* /ffp/start/lighttpd.sh inactive
* /ffp/start/inetd.sh inactive
*  OK

Offline

 

#25 2010-12-08 11:22:35

Aros
New member
Registered: 2010-12-08
Posts: 3

Re: DNS-320 and fun_plug

Is the fun_plug file supposed to be started each time the NAS starts? And then write to the log? Because the log has only been written during the install, I've rebooted multiple times since then but those records dont seem to be present in the logfile.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB