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-09-02 11:33:39

gegefr
New member
Registered: 2010-08-31
Posts: 3

DNS323 - chrooted debian squeeze armel - minidlna with inotify

And nzbget is working perfectly (check and repair).

Since I did not see this way to do things I thought I'd write it there in case some people are stuck like I was.

What I want of my DNS323:
* minidlna server (to my samsung TV), and i want it to work with inotify, I don't want to re-scan everything each time I add a video.
* download in newsgroup (I want it to download from newgroup, check, repair, unrar), I just want to have to move films from nzbget/dst to my mnidlna shared directory. (nzbget + nzbgetweb)
* samba, of course
* disks able to spin-out

I don't want to "go native" since I have no serial or anything to restore the nas if things go wrong. I don't wan't to loose my data too.

So, what I did :
* install http://code.google.com/p/alt-f/ (the reloaded package, not the firmware) and test it works (it's got the nice features in it's fun_plug to disable itself on first boot, so even if it crashed, the next boot you do, you go back to stock firmware). If alt-f cannot work with your DNS, you can stop here ... :-/
* if this works change the parameter in ALT-F in order to boot in it each time, or chmod +x it back again after a successful startup (it's nice to have this kind of security).
* prepare a chroot environment on usb stick: I took a debian squeeze armel (since alt-F uses a recent kernel, this works just fine)
* make the chroot environment OK (follow more or less http://dns323.kood.org/forum/viewtopic.php?id=4330)
* edit alt-f's user startup script in /etc/init.d for it to mount /dev/md0, proc, sys, etc into the chroot linux, and make it start/stop your services into the chrooted environment. I did it with something like :

In "start" in /etc/init.d/S99_user, call /dev/chroot_start
"/dev/sdc1/chroot_start:"

Code:

#!/bin/sh
# mount things
chroot /mnt/sdc1/squeeze /root/start

"CHROOT: /root/start"

Code:

#!/bin/sh
/root/services start

"CHROOT: /root/services"

Code:

#!/bin/sh
/etc/init.d/samba $1
/etc/init.d/minidlna $1
/etc/init.d/lighttpd $1
/etc/init.d/nzbget $1
#add there all your services

I'll let you guess for the stop.

I'm sure there is a way to have less scritps, but since I don't know how the chroot command behaves with arguments to the command, I didn't even try ;-)

I added a "/mnt/sdc1/chroot_login" too since ssh is ran by alt-f, I have to go into the chrooted debian each time (could add it to some .bashrc I guess.

Now that this is in place, all that left is to install your services like in any other debian. And doing it that way, armel + recent kernel I got no problem with minidlna + inotify (nio package, i compiled it), and I got nzbget (compiled too) to work OK with checks and repair.

Be carefull to put nzbget's "nzb" and "queue" directory in the flash disk if you want your disks to be able to rest.

I only start the necessary services (I don't start all runlevels) so I think I got the memory overhead down to the minimum (even if there is probably unused features of alt-f that use some). When nzget is not downloading or anything, I have my 16.5 mo/s reading (I don't think this device can go any faster), so everything's ok.

Last edited by gegefr (2010-09-02 11:36:03)

Offline

 

#2 2010-09-02 23:41:46

haim
Member
Registered: 2010-01-13
Posts: 83

Re: DNS323 - chrooted debian squeeze armel - minidlna with inotify

I'm guessing this is pretty obvious for many but.....

I know the alf-f firmware has minidlna, samba and lighttpd built in, so I presume there were some of the other things you needed that required hat you then had a chroot debian on the usb stick..?

Or was it just to have the controlling system on the usb so the drives were pretty much doing nothing?

Note I may have just missed something obvious in your post, if so, sorry smile

Offline

 

#3 2010-09-03 00:10:49

gegefr
New member
Registered: 2010-08-31
Posts: 3

Re: DNS323 - chrooted debian squeeze armel - minidlna with inotify

Well, in fact it has them and it is possible to install them on the usb stick ;-)
- I needed nzbget and I had to compile it, so I used the debian chroot.
- Since I have a debian I prefer to install things in it in order to have better control and support through the debian howto's and exemples.

I think the main point is not installing minidlna, samba into the chrooted debian, but having access to a chrooted, armel, debian squeeze ;-)

I posted this since I've been looking for a long time for a not-too-risky way of doing this (mainly witfin theses forums), had a hard time finding this solution (alt-f) and saw some posts of people trying to do this ;-).

But i guess for what I'm doing, the ideal would be some "minimal" linux, supporting the hardware of the DNS323 with open-ssh enabled and the necessary to chroot, based on ffp-reloaded. I do not make use of alt-f but for it's kernel and openssh :-)

Offline

 

#4 2010-09-03 22:03:53

haim
Member
Registered: 2010-01-13
Posts: 83

Re: DNS323 - chrooted debian squeeze armel - minidlna with inotify

Ok, makes sense.

I'm looking to just use alt-f with a sony blu-ray player  as it seems minidlna is the best bet for working well with it.  Won't buy the player for a while though so will wait until then to play around, figure alt-f will have a new release by then, plus it's only working with gigabyte ethernet which I don't have on my router....though will be upgrading that next week.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB