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 2008-10-19 08:06:30

manuel_t
Member
Registered: 2008-10-19
Posts: 6

New and easy installer for Debian

Hello,

I created a small and easy to install Etch-Distribution based on the one linked in the Wiki. It provides a full base system with SSH enabled by default and boots automatically. As it uses chroot, it is not going to harm your device and can be uninstalled by simply deleting one file ("fun_plug") and and one folder ("linux") from your first volume.

Download: http://mesh.dl.sourceforge.net/sourcefo … .5.tar.bz2

To install:
1. Ensure you have the newest firmware (1.05).
2. Extract the downloaded archive
3. Copy the two extracted files linux.tar and fun_plug to the root directory of your first DNS-323 volume
4. Reboot the DNS-323
5. The DNS-323 is going to work for several minutes now and finally reboots
6. The DNS-323 automatically boots into Debian and runs the SSH - daemon

You can now log in via SSH, the default root password is 12345678

Have fun and post some feedback. If it works with everyone`s box, I could update the wiki.

Regards,
Manuel

_____________________________________________________________________________________________
By the way: I recommend upgrading to testing("lenny") for everyone using Debian etch/sarge, performance increases a lot. Here are my nbench results using an upgraded etch as baseline (compiled with "-03 -march=armv5te"):

Code:

                    : etch (BASELINE) : lenny
--------------------:-----------------:-------------:
NUMERIC SORT        :           1.00  :       1.17
STRING SORT         :           1.00  :       1.94
BITFIELD            :           1.00  :       1.47
FP EMULATION        :           1.00  :       1.24
FOURIER             :           1.00  :       1.00
ASSIGNMENT          :           1.00  :       1.45
IDEA                :           1.00  :       1.16
HUFFMAN             :           1.00  :       0.66
NEURAL NET          :           1.00  :       1.33
LU DECOMPOSITION    :           1.00  :       1.50

As you can see, performance improves between 16% and  94% depending on the operation. For some reason HUFFMAN becomes slower, I am trying to find out why. In general it looks like this has a lot do with the different gcc's on etch (gcc-4.1) and lenny (gcc-4.3). I am going to recompile the whole base system with gcc-4.3 and repeat the benchmark. Cross-compiling does not work on my workstation for some strange reason, so I have to use the DNS-323 itself, which is going to take several days...

Last edited by manuel_t (2008-10-21 06:23:28)

Offline

 

#2 2008-10-20 13:54:17

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

Re: New and easy installer for Debian

manuel_t wrote:

not a single person tried?

You should mention that it's a chroot debian install. If you don't explain what is does, people might think that it overwrites the firmware (as in http://dns323.kood.org/howto:install_debian ). Anyway, no idea how many people actually use chroot'ed debian here.

Offline

 

#3 2008-10-20 22:05:12

mastervol
Member
Registered: 2008-09-06
Posts: 81

Re: New and easy installer for Debian

actually my dns323 works right now as it should .. the only advantage i see is that probably sshd works with rootdirectory .. (because it doesn't work at least on my ffp 0.5)


DNS-323     F/W: 1.06  H/W: ??  ffp: 0.5  Drives (normal mode): 1 x 1,5 TB Seagate SATA II ST31500341AS, 1 x 250 GB Western Digital SATA I

Offline

 

#4 2008-10-21 02:19:24

pizzaboy_au
New member
Registered: 2008-07-29
Posts: 4

Re: New and easy installer for Debian

Hi manuel_t,

I have tried to download from rapid share however it is currently not working the link.

Are you able to upload the file again to another filesharing site..

Thanks

Offline

 

#5 2008-10-21 06:20:15

manuel_t
Member
Registered: 2008-10-19
Posts: 6

Re: New and easy installer for Debian

@pizzaboy_au: Did you open the link in your browser or did you try to download directly via wget or "Save as"? Rapidshare provides no direct links to files.
However, I created a project on sourceforge and there is a direct link avaiable above now.

@fonz: Article updated, hope to avoid misunderstandings now. I know chroot is kind of ugly, but the fact it cannot harm anything is a large benefit when it comes to embedded devices and people/organizations with low budget ;-)
According to my benchmarks, the chrooted debian (upgraded to lenny) massively outperforms the native system in most cases, guess the new gcc and libc are way more optimized for arm. I doubt that a native Debian would be much faster, chroot seems to have none to very little overhead, it just needs more memory (which can be reduced a lot by killing most of the process started by the firmware). Overall I guess the chroot is less than 3% slower and needs maybe 2-3 megs more memory than a native Debian system.
I think a current, optimized kernel within the chroot would speed up thinks a lot more than flashing with a custom firmware, especially network throughput could use some optimization. Going to work on that.

Last edited by manuel_t (2008-10-21 07:55:45)

Offline

 

#6 2008-10-21 14:21:10

RunaR
Member
Registered: 2008-08-14
Posts: 49

Re: New and easy installer for Debian

With all the logging in debian going on, the hard disks will not spindown. Will this work from an usb-stick?

Offline

 

#7 2008-10-22 03:36:40

manuel_t
Member
Registered: 2008-10-19
Posts: 6

Re: New and easy installer for Debian

You can turn on laptop-mode in debian, this will prevent the disk from spinning up everytime something is written to a logfile
If you do not need those logfiles at all, you could mount a small ramdisk at /var/log.
Not running klogd at startup (/boot/linuxrc) is also an option.

I doubt this will run from an usb-stick, afaik the DNS-323 reads fun_plug-scripts from harddisk only - but I have not tried yet.

Offline

 

#8 2008-10-22 03:54:28

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: New and easy installer for Debian

manuel_t wrote:

afaik the DNS-323 reads fun_plug-scripts from harddisk only - but I have not tried yet.

Yes, it does read the fun_plug from disk, but as soon as it is run you can switch to a usb stick - this is how people get ffp etc to run from usb sticks.

Offline

 

#9 2008-10-24 10:46:58

djkaoss
New member
Registered: 2008-10-24
Posts: 1

Re: New and easy installer for Debian

Hi,
i tried this howto and it works so far with etch (upgraded to lenny). But now i wanted to enable nfs an it gets me an error:

Code:

dns323:~# /etc/init.d/nfs-kernel-server start
FATAL: Could not load /lib/modules/2.6.12.6-arm1/modules.dep: No such file or directory
Not starting NFS kernel daemon: no support in current kernel. (warning).
dns323:~#

The packets nfs-kernel-srver, nfs-common and portmap are installes. How do i get the right kernel working?

Last edited by djkaoss (2008-10-24 10:50:51)

Offline

 

#10 2008-10-24 16:25:57

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: New and easy installer for Debian

It must be running 'modprobe' which requires you to first run 'depmod -a" which will created modules.dep.
This lets modprobe know the locations and dependencies of the various modules installed in the /lib/modules/2.6.12.6-arm1 tree.

BTW, you may also need to make sure the directory /etc/modprobe.d is present.

Offline

 

#11 2008-10-31 12:24:19

krull
Member
Registered: 2008-10-27
Posts: 10
Website

Re: New and easy installer for Debian

Wow! Thank you soo much for this manuel_t!

Just installed it on my dns323 and upgraded to lenny! I need perl for BackupPC and ffp's perl wasn't up to snuff. I _really_ recommend updating the wiki with this debian install. the Wiki's chroot debian howto needs cleanup IMHO.

Cheers.

Offline

 

#12 2008-12-08 00:05:56

beebock
Member
Registered: 2008-11-30
Posts: 19

Re: New and easy installer for Debian

Hi,

Thanks for this. Seems to work.

However looks a little slow on the actions compared to the other method. Can you give me the steps to get the upgrade (lenny)

thanks

Offline

 

#13 2008-12-08 01:12:43

bodbod
Member
Registered: 2007-11-22
Posts: 109

Re: New and easy installer for Debian

Thx for the hard work, I will try it this weekend ! Good job !
keep us posted on your upgrades and optimisation.

Offline

 

#14 2008-12-11 21:05:28

Sraet
Member
Registered: 2008-12-11
Posts: 6

Re: New and easy installer for Debian

Alrighty, I followed the steps above and couldnt have been easier, took longer for the DNS to shut itself down than it did to unpack the debian installation. I wanted to update to the Lenny version from Etch and found this website, but the files do not match and Id rather not bork my new little toy.

So it says to find the etc/apt/sources.list file
What I see is an etc/apt/sources.list.d/ folder with an etch.list file within it.

Do I just need to change all references to Etch within the etch.list file or do I need to rename the file to sources.list, or do I need to make a copy of the file, call it lenny.list and change all the etch references within it?

In either case, this was a much simpler setup than the howto page, and its been a while but you might want to update it with the list, as this post has started to sneak off the main page of the forums smile

(Include the update to lenny steps for us lowbies (People who havent used linux in about 10 years, hehe) and noobs)

Offline

 

#15 2008-12-13 01:01:23

Sraet
Member
Registered: 2008-12-11
Posts: 6

Re: New and easy installer for Debian

Alrighty, someone is free to correct this if they want or if this is wrong but this appears to have successfully updated my etch to lenny (Even the debian FAQ doesnt list the right files any more)

You do want to do the above steps to the etch.list file so nano /etc/apt/sources.list.d/etch.list and replace the first entries of etch with lenny on each line. Then save the file and run apt-get update then apt-get upgrade.

Enjoy (Or correct the steps smile)

Offline

 

#16 2008-12-29 06:52:44

fabphil
New member
Registered: 2008-12-16
Posts: 3

Re: New and easy installer for Debian

Thanks Manuel_t!

I have been struggling for a couple of weeks trying to get chroot working with my 1.05 firmware and kept hitting the same brick wall before I found this post. Your install worked effortlessly. Next to track down the upgrade to lenny instructions...

Thanks again mate!


DNS-323 fw 1.06 Funplug 0.5 single 640GB WD HDD (so far)
And loving it....

Offline

 

#17 2008-12-29 22:47:30

beebock
Member
Registered: 2008-11-30
Posts: 19

Re: New and easy installer for Debian

ok. I have found a few steps to upgrade

of course this is at your own risk blah blah blah
Anyhow. Follow the steps below and you should be fine (most of these steps have been pilfered from here)

1) modify the etch.list file to show lenny (see Sraet posts) I would launch to the following command first
   cp etc/apt/sources.list.d/etch.list ~/etch.list.bak
  This will give you a backup on the root's home folder
2) launch command
   apt-get update
3) then
   apt-get upgrade
4) then
   apt-get dist-upgrade
5) reboot
6) just to check
   apt-get update
7) then
   apt-get upgrade

that should put your NAS to a nice little lenny distro and up to date.

Any questions, yell.

Offline

 

#18 2008-12-30 12:20:29

wirbel
Member
Registered: 2008-11-22
Posts: 20

Re: New and easy installer for Debian

Works fine so far..

I guess the files "._fun_plug" and "._linux.tar" inside the tarball are not needed.

Offline

 

#19 2008-12-30 15:14:04

beebock
Member
Registered: 2008-11-30
Posts: 19

Re: New and easy installer for Debian

hmmmm seem to notice a slow down on the prompt. ie I type it trails behind.

Anyone else noticed this?

thx

Offline

 

#20 2008-12-30 15:37:27

beebock
Member
Registered: 2008-11-30
Posts: 19

Re: New and easy installer for Debian

scarp my last comment.. it seems to have stabilised. probably the synchronisation neutral took most of hte night tho!

Offline

 

#21 2009-01-01 09:01:09

zimer
Member
Registered: 2008-09-06
Posts: 16

Re: New and easy installer for Debian

Mounting a second disk seems to be missing. It looks like you're only mounting the first. Locales may also be a little screwy. Locales not set or something type error.

Offline

 

#22 2009-01-02 02:44:33

kennedy101
Member
Registered: 2008-09-16
Posts: 48

Re: New and easy installer for Debian

Three Part Post


1) Updated fun_plug for second hard drive and one typo.

Thanks very much for the updated Etch image. Pounded my head trying to get the chroot procedures on the wiki to work for a day. I got this one up and running with my new DNS-323 in less than a cpl of hours. The fun_plug script was edited as follows to get the second drive working. Note that you'll need to manually create /mnt/HD_a2/linux/mnt/HD_a2 directory.

----------------------------
#!/bin/sh

# Root DISK1
export DISK1=/mnt/HD_a2
export DISTDIR=linux

# Root DISK2
export DISK2=/mnt/HD_b2

cd $DISK1

mount --bind $DISK1 $DISTDIR/$DISK1 ###The / between $DISTDIR and $DISK1 was missing.

#continue rest of script
----------------------------


2) Update to Lenny worked. Thanks for the help updating Lenny. Got all programs in /boot/linuxrc installed and the init.d scripts throw no errors.


3) Getting this to run off of USB stick.
I have an 8gig USB drive I'd like to use for the debian chroot system. I see in dmesg the usb address of the memory stick as follows

usb 1-1: new high speed USB device using ehci_platform and address 2

What do I need to do after this to tell fun_plug to mount this device? Assume from chroot ssh or console telnet I can create the file system and format the deice. Just need some help what the device name should be, IE /dev/????? Guessing the /etc/init.d/makedev script that WAS NOT found or installed has something to do with my confusion.


DNS 323 (Hardware B1, Firmware 1.06). 2x 1.5TB Seagate HDs.
Chroot Debain (Lenny) on USB (not reloaded). Edna server. USB print server. USB drives added to samba share. All init.d scripts in place.
Future projects: FFP reloaded then chroot on B1 hardware.

Offline

 

#23 2009-01-02 16:41:29

beebock
Member
Registered: 2008-11-30
Posts: 19

Re: New and easy installer for Debian

Kenedy101. The main issue that you are going to hit is that the USB does not always mount in the same location. You will need to find a way to mirror this. Have a look att his link for an idea. The method will e the same but you will need to customise it to your actual environment

The IR receiver is on a USB hubb and changes location. so a little poking will work here I think

http://www.mythtv.org/wiki/index.php/Ha … R_Receiver


Zimer - Can you give me the error please? I have resolved this inthe past and can not remember where!!

thanks

Offline

 

#24 2009-01-02 16:46:01

beebock
Member
Registered: 2008-11-30
Posts: 19

Re: New and easy installer for Debian

Zimmer - When you say mounting a second disk is missing, can you give me more details?

thanks

Offline

 

#25 2009-01-02 17:08:17

beebock
Member
Registered: 2008-11-30
Posts: 19

Re: New and easy installer for Debian

another quick one. It seems that the tools to control the RAID are not installed.

just run

apt-get install mdadm

and that will give you the tools to eye ball the raid status and modify / track / rebuild etc....

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB