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 2007-01-06 08:29:46

magore
Member
Registered: 2007-01-05
Posts: 25

installing debian sarge on the DNS-323

I have debian sarge running on my DNS-323
There are still some issues - the attached file is really a quick hack that gives a starting point
at least. The instructions are main aimed at serious programmers not for the faint of heart

Offline

 

#2 2007-01-06 12:19:27

KRH
Member
From: Denmark
Registered: 2006-10-27
Posts: 219
Website

Re: installing debian sarge on the DNS-323

Nice work.


First user to fun_plug the dns-323.

Offline

 

#3 2007-01-06 20:32:36

rguerra
Member
Registered: 2006-12-20
Posts: 25

Re: installing debian sarge on the DNS-323

Thanks for posting the Debian instructions  - much appreciated. I do have a question - What do I need to change in your steps so that it works with a pre-configured RAID setup, which is how i've setup my unit.

appreciate any any comments on this one.

regards

RG
--
ref:

raid1: raid set md0 active with 2 out of 2 mirrors
ext3: No journal on filesystem on md0

Offline

 

#4 2007-01-06 22:26:03

magore
Member
Registered: 2007-01-05
Posts: 25

Re: installing debian sarge on the DNS-323

Hi,
  The debian install will work on the raid - but I am not sure of the mount point you would have. You would have to update my scripts so mount points are not hard coded in...

As a side note the DNS-323 is still running all of its applications - even while you run in the chroot environment.  There are some limitations minipulating the DNS-323 from within the chroot debian - however you can always telnet (ie telnet to the device itself - telnetd is on the non chrooted side!) or use the standard web access to manipulate the non chrooted side. Basic things like networking work but all low level functions from system calls still depend on the kernel that is in the firmware.( I tried to pick a version of debian that was built with nearly the same kernal version.) My primary purpose was to generate a native environment to compile code to install in the non chrooted side  - it was actually faster to do then building the cross compiler tool chain.

Offline

 

#5 2007-01-07 01:19:46

rguerra
Member
Registered: 2006-12-20
Posts: 25

Re: installing debian sarge on the DNS-323

I got the instructions to work by simple removing the references to the second disk.

Some comments:

1. Comment the references to the second disk  if you have ALREADY formatted the drives as RAID

# Bind mount disk2
#mkdir sarge/mnt/HD_b2                                                           
#mount --bind /mnt/HD_b2 sarge/mnt/HD_b2

2. Sarge will need a start-up script as that is not defined.

./lnx_bin/busybox3 chroot sarge

3. The distribution can be changed to - testing - and it will work as well smile

Offline

 

#6 2007-01-08 03:35:48

magore
Member
Registered: 2007-01-05
Posts: 25

Re: installing debian sarge on the DNS-323

Hi,
   Thanks for the raid update note - my next step is to get nfsd working - this will make a much nicer add on for linux users. One interesting observation is that the directory with the web pages are symlinked into ram so we can replace the web pages to work with any features we add...

Now I just need some time smile

Offline

 

#7 2007-01-08 17:43:24

rguerra
Member
Registered: 2006-12-20
Posts: 25

Re: installing debian sarge on the DNS-323

I have been able to get much working with the previously posted Debian installation instructions. Among other things, I have been able to install Webmin, SSH and Appletalk (netatalk package ) which is great for Mac OS X users.

However, a problem has come up - one that i'm not sure how to resolve. That being, that printing no longer seems to work. Renaming fun_plug to something else and rebooting resolves the problem. So the issue is somehow related to the debian install .. but not sure how.

Would appreciate others testing this out as well as instructions on how to fix the problem.

Last edited by rguerra (2007-01-08 17:43:59)

Offline

 

#8 2007-01-16 18:59:18

levring
Member
From: Denmark
Registered: 2006-12-16
Posts: 30
Website

Re: installing debian sarge on the DNS-323

Hi..

How have you been able to make the SSHd dunning ? After entering username and password it replies:
login as: root
Password:
Server refused to allocate pty
stdin: is not a tty

How to fix this error ?

Offline

 

#9 2007-01-16 19:27:09

magore
Member
Registered: 2007-01-05
Posts: 25

Re: installing debian sarge on the DNS-323

I created the devices listed below - I have my debian script linuxrc do this with MAKEDEV attached
I have updated my fun_plug script for debian - attached

sh-2.05b# ls -l /dev/ttyp*
crw-rw-rw-  1 root tty 3,  0 Jan 15 23:01 /dev/ttyp0
crw-rw-rw-  1 root tty 3,  1 Jan 15 23:01 /dev/ttyp1
crw-rw-rw-  1 root tty 3,  2 Jan 15 23:01 /dev/ttyp2
crw-rw-rw-  1 root tty 3,  3 Jan 15 23:01 /dev/ttyp3
crw-rw-rw-  1 root tty 3,  4 Jan 15 23:01 /dev/ttyp4
crw-rw-rw-  1 root tty 3,  5 Jan 15 23:01 /dev/ttyp5
crw-rw-rw-  1 root tty 3,  6 Jan 15 23:01 /dev/ttyp6
crw-rw-rw-  1 root tty 3,  7 Jan 15 23:01 /dev/ttyp7
crw-rw-rw-  1 root tty 3,  8 Jan 15 23:01 /dev/ttyp8
crw-rw-rw-  1 root tty 3,  9 Jan 15 23:01 /dev/ttyp9
crw-rw-rw-  1 root tty 3, 10 Jan 15 23:01 /dev/ttypa
crw-rw-rw-  1 root tty 3, 11 Jan 15 23:01 /dev/ttypb
crw-rw-rw-  1 root tty 3, 12 Jan 15 23:01 /dev/ttypc
crw-rw-rw-  1 root tty 3, 13 Jan 15 23:01 /dev/ttypd
crw-rw-rw-  1 root tty 3, 14 Jan 15 23:01 /dev/ttype
crw-rw-rw-  1 root tty 3, 15 Jan 15 23:01 /dev/ttypf
sh-2.05b#
sh-2.05b# ls -l /dev/py*
crw-rw-rw-  1 root tty 2,  0 Jan 15 23:01 /dev/ptyp0
crw-rw-rw-  1 root tty 2,  1 Jan 15 23:01 /dev/ptyp1
crw-rw-rw-  1 root tty 2,  2 Jan 15 23:01 /dev/ptyp2
crw-rw-rw-  1 root tty 2,  3 Jan 15 23:01 /dev/ptyp3
crw-rw-rw-  1 root tty 2,  4 Jan 15 23:01 /dev/ptyp4
crw-rw-rw-  1 root tty 2,  5 Jan 15 23:01 /dev/ptyp5
crw-rw-rw-  1 root tty 2,  6 Jan 15 23:01 /dev/ptyp6
crw-rw-rw-  1 root tty 2,  7 Jan 15 23:01 /dev/ptyp7
crw-rw-rw-  1 root tty 2,  8 Jan 15 23:01 /dev/ptyp8
crw-rw-rw-  1 root tty 2,  9 Jan 15 23:01 /dev/ptyp9
crw-rw-rw-  1 root tty 2, 10 Jan 15 23:01 /dev/ptypa
crw-rw-rw-  1 root tty 2, 11 Jan 15 23:01 /dev/ptypb
crw-rw-rw-  1 root tty 2, 12 Jan 15 23:01 /dev/ptypc
crw-rw-rw-  1 root tty 2, 13 Jan 15 23:01 /dev/ptypd
crw-rw-rw-  1 root tty 2, 14 Jan 15 23:01 /dev/ptype
crw-rw-rw-  1 root tty 2, 15 Jan 15 23:01 /dev/ptypf

Last edited by magore (2007-01-16 19:29:19)

Offline

 

#10 2007-01-16 19:31:12

magore
Member
Registered: 2007-01-05
Posts: 25

Re: installing debian sarge on the DNS-323

Attached is my revised debian fun_plug script

Offline

 

#11 2007-01-17 19:00:02

frodo
Member
From: Stockholm, Sweden
Registered: 2007-01-17
Posts: 259

Re: installing debian sarge on the DNS-323

magore wrote:

Attached is my revised debian fun_plug script

Why do you set the hostname to disk?

Here is a small alternative for thoose using RAID or only having one disk:

# Bind mount disk2
if [ -d $DISK2 ]
then
                mkdir sarge/$DISK2
                mount --bind $DISK2 sarge/$DISK2
fi

Cheers

Offline

 

#12 2007-01-18 23:29:37

levring
Member
From: Denmark
Registered: 2006-12-16
Posts: 30
Website

Re: installing debian sarge on the DNS-323

magore wrote:

I created the devices listed below - I have my debian script linuxrc do this with MAKEDEV attached
I have updated my fun_plug script for debian - attached

How do you manage to make your linuxrc script start by it self in Debian ? I have a couple of program i would like to load by it self as soon it enters Debian.. How to ??

Btw: Thanks a lot for the MAKEDEV thing smile

Offline

 

#13 2007-01-19 12:00:47

frodo
Member
From: Stockholm, Sweden
Registered: 2007-01-17
Posts: 259

Re: installing debian sarge on the DNS-323

levring wrote:

magore wrote:

I created the devices listed below - I have my debian script linuxrc do this with MAKEDEV attached
I have updated my fun_plug script for debian - attached

How do you manage to make your linuxrc script start by it self in Debian ? I have a couple of program i would like to load by it self as soon it enters Debian.. How to ??

Btw: Thanks a lot for the MAKEDEV thing smile

You can do like this in the fun_plug:

Code:

busybox3 chroot $DISK1/sarge /linuxrc

linuxrc is located directly under sarge.

Cheers

Offline

 

#14 2007-01-19 17:24:35

Paul
Member
From: Landshut, Germany
Registered: 2007-01-19
Posts: 35
Website

Re: installing debian sarge on the DNS-323

wow... I'm very excited about running debian on the dns-323 :-)

but it's not yet possible to boot directly with a custom kernel into debian? maybe even from an usb stick?

Offline

 

#15 2007-01-19 17:46:40

kimhav
Member
From: Klagshamn, Sweden
Registered: 2007-01-08
Posts: 56
Website

Re: installing debian sarge on the DNS-323

Lipovitan.B3 wrote:

wow... I'm very excited about running debian on the dns-323 :-)

but it's not yet possible to boot directly with a custom kernel into debian? maybe even from an usb stick?

You know what; I'm looking forward to be able to run Debian as well on the DNS-323! So I'm looking forward to see how this little project develops.

What would it take to custom kernel?


Kim Haverblad
Klagshamn, Sweden
http://kim.haverblad.se

Offline

 

#16 2007-01-19 19:35:07

levring
Member
From: Denmark
Registered: 2006-12-16
Posts: 30
Website

Re: installing debian sarge on the DNS-323

Lipovitan.B3 wrote:

wow... I'm very excited about running debian on the dns-323 :-)

kimhav wrote:

You know what; I'm looking forward to be able to run Debian as well on the DNS-323!

Well.. it works well.. I'am running Debian untop of the fun_plug. At the moment i am running:
SSH
Subversion(via ssh)
Apache 1.3 (with Apache::Gallery)(perl)

Though there is a problem. Apache uses too much memory with perl (maby memory leak), so either I have to increase performance of the conf-file, or find another gallery (or restart once in a while).

Hope this gives a little inspiration for others.

Last edited by levring (2007-01-19 19:36:50)

Offline

 

#17 2007-01-30 03:44:18

boskoe
Member
Registered: 2007-01-27
Posts: 5

Re: installing debian sarge on the DNS-323

Have managed to get KRH's fun_plug working. Now I am in search of sarge.tar ?

I don't have access to cdebootstrap.

Thanks

Offline

 

#18 2007-02-01 17:01:26

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: installing debian sarge on the DNS-323

boskoe wrote:

Have managed to get KRH's fun_plug working. Now I am in search of sarge.tar ?

I don't have access to cdebootstrap.

Thanks

Hmm, the file is quite large, ~87 Mb. Gzipped it's like 54 Mb and I think that's why no-one upload it. If you really want , I could add it to a tracker somewhere and then we can all help out seeding it. Or, if you have en ftp running then PM me the details.

/Apan

Offline

 

#19 2007-02-01 17:25:56

levring
Member
From: Denmark
Registered: 2006-12-16
Posts: 30
Website

Re: installing debian sarge on the DNS-323

The sarge-file can be found here:
http://wopr.levring.nu/sarge.tar

please notice that the archives are found here: "/var/cache/apt/archives" and not in "/var/cache/bootstrap" as the documentation says

Last edited by levring (2007-02-01 17:39:31)

Offline

 

#20 2007-02-01 17:49:49

boskoe
Member
Registered: 2007-01-27
Posts: 5

Re: installing debian sarge on the DNS-323

Thank you levring. I will see if I can find somwhere to host this.

Offline

 

#21 2007-02-01 18:11:29

levring
Member
From: Denmark
Registered: 2006-12-16
Posts: 30
Website

Re: installing debian sarge on the DNS-323

well. just download from this site.. will be running till i someday run out of space smile (long time)

Offline

 

#22 2007-02-02 15:47:44

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: installing debian sarge on the DNS-323

Hey,

Got a question, maybe someone knows. Have successfully compiled and used ctorrent (ctorrent-1.3.4-dnh2.2.tar.gz) on the debian 'side'. But; when trying to transfer it to the non-debian side it fails. And yes, I did link it as static.

The function that appears to be buggering out is the gethostbyname() function and I can't really figure out why. Any ideas?


At least gcc gave me a warning, but what does it really mean?
---
ctcs.o(.text+0x624):/root/ctorrent-dnh2.2/ctcs.cpp:75: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
---

/Apan

Offline

 

#23 2007-02-02 17:33:59

Paul
Member
From: Landshut, Germany
Registered: 2007-01-19
Posts: 35
Website

Re: installing debian sarge on the DNS-323

@apskraft

I think you need to compile your utorrent against uclibc as used in the original firmware.


btw...
because I was asked via PM ... here is a debian etch minimal release
http://dev.skcserver.de/dns323/etch.tar

Last edited by Lipovitan.B3 (2007-02-05 14:59:25)

Offline

 

#24 2007-02-07 01:08:20

magore
Member
Registered: 2007-01-05
Posts: 25

Re: installing debian sarge on the DNS-323

I have added the notes for installing Debian to the new DNS-323 Wiki http://dns323.kood.org/howto:chroot_debian

Please feel free to add to it or make changes

Offline

 

#25 2007-02-23 11:06:16

Hajonides
Member
Registered: 2007-02-14
Posts: 20

Re: installing debian sarge on the DNS-323

Previously posted in the appletalk entry; hoping to get more feedback here…

OK this is what I tried: I forgot being a 'spoiled' mac-user; found myself an old 386 on which I installed Kubuntu 'Dapper Drake' and opened a root-shell-console. So far so good...
Next I went to the chroot_debian HowTo from Mike Gore. After typing the first command <apt-get install cdebootstrap> I got back the following lines (rudely translated; next time I'll switch to English as System language):
Package lists being read... ready
Tree of required ... (?) being built... ready
E: Couldn't find package cdebootstrap

... which leaves me pretty much at my starting point...

Any help whatsoever will be appreciated... ;-)

PS System says cdebootstrap is present, when I try to copy it to disk. Is the command looking for it in another place?
Which gets me to the next question: where do I put the ubuntu image (ubuntu-6.06.1-desktop-i386.iso) and sarge.tar? They're in usr/my-account-name now.
Maybe pretty obvious for ye'all, but me linux & command line dummy…

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB