Best way to install is without drive and unslinging?

LinkSys wireless Music Player and LinkSys Media Adapter
Post Reply

Which is the best installation and use approach?

Poll ended at Fri Mar 17, 2006 2:07 am

NASSetup, installing TwonkyMedia to NSLU2 RAM?
3
75%
Manual installation, unslinging and installing TwonkyMedia to HDD?
1
25%
 
Total votes: 4

timmy2
Posts:26
Joined:Mon Jan 16, 2006 8:30 pm
Best way to install is without drive and unslinging?

Post by timmy2 » Wed Feb 15, 2006 2:07 am

I think I've distilled the TwonkyMedia/NSLU2 installation down to two approaches. Below is the approach that TwonkyVision support recommended to me this morning via email. Since their firm is the creator of TwonkyMedia (I assume), and I'm close to being a moron when it comes to Linux and uNSLUng, I certainly don't question their approach.

But, if you read these and other forums, there sure are a lot of people who are adamant about first unslinging the root filesystem to the drive and installing TwonkyMedia on the drive. Some refer to the "scarce" RAM available in the NSLU2 as a big negative.

That notwithstanding, TwonkyVision support says that the best way to install TwonkyMedia is to use their NASSetup app in Windows. You start with an uNSLUng NSLU2, NO drives attached. They stress this: NO DRIVES, no unslinging (well, they wrote "unslinging is optional).

When NASSetup runs I can see that it telnets into the NSLU2 on its own (no need to first enable telnet via the GUI) and runs a few scripts which installs the main app plus several other things, including a LAME decoder and a startup script.

After the NSLU2 reboots it's ready to use, TwonkyMedia server and all. Of course a hard drive is needed for "media" but that's it.

I tried it and it works great.

So what is the benefit of unslinging and installing TwonkyMedia on the drive if one's sole goal is to use the NSLU2 as a UPnP media server and NAS?

simonhancock
Posts:87
Joined:Wed Feb 08, 2006 10:36 am
Location:Somerset, UK

Re: Best way to install is without drive and unslinging?

Post by simonhancock » Wed Feb 15, 2006 10:59 am

timmy2 wrote:I think I've distilled the TwonkyMedia/NSLU2 installation down to two approaches. Below is the approach that TwonkyVision support recommended to me this morning via email. Since their firm is the creator of TwonkyMedia (I assume), and I'm close to being a moron when it comes to Linux and uNSLUng, I certainly don't question their approach.

But, if you read these and other forums, there sure are a lot of people who are adamant about first unslinging the root filesystem to the drive and installing TwonkyMedia on the drive. Some refer to the "scarce" RAM available in the NSLU2 as a big negative.

That notwithstanding, TwonkyVision support says that the best way to install TwonkyMedia is to use their NASSetup app in Windows. You start with an uNSLUng NSLU2, NO drives attached. They stress this: NO DRIVES, no unslinging (well, they wrote "unslinging is optional).

When NASSetup runs I can see that it telnets into the NSLU2 on its own (no need to first enable telnet via the GUI) and runs a few scripts which installs the main app plus several other things, including a LAME decoder and a startup script.

After the NSLU2 reboots it's ready to use, TwonkyMedia server and all. Of course a hard drive is needed for "media" but that's it.

I tried it and it works great.

So what is the benefit of unslinging and installing TwonkyMedia on the drive if one's sole goal is to use the NSLU2 as a UPnP media server and NAS?
One point Tim - to get NASSetup to work properly, you do need to enable Telnet on the NSLU2 (with the drives still disconnected)

I had always assumed that 'unslinging' just refered to installing the uNSLUng firmware in place of the Linksys firmware on your NSLU2 and 'unslinging to a drive' was a separate issue. Does 'unslinging to a drive' actually mean that the firmware (is this whole operating system?) and the Twonkyvision software are installed on one of your external hard disks?

Perhaps your last sentence is the important one. On the http://www.nslu2-linux.org website there are loads of applications that people are running on their devices. There is obviously enough room to squeeze the Twonkyvision software onto the NSLu2, but if you also wanted to do other stuff, it may run out of room

Simon

Cheburashka
Posts:63
Joined:Tue Dec 27, 2005 5:16 pm

Re: Best way to install is without drive and unslinging?

Post by Cheburashka » Wed Feb 15, 2006 6:11 pm

simonhancock wrote: I had always assumed that 'unslinging' just refered to installing the uNSLUng firmware in place of the Linksys firmware on your NSLU2 and 'unslinging to a drive' was a separate issue. Does 'unslinging to a drive' actually mean that the firmware (is this whole operating system?) and the Twonkyvision software are installed on one of your external hard disks?
Yes. The NSLU2 has very limited memory. If you run without unslinging, the firmware uses a lot of that RAM to put the root filesystem and some other stuff on a RAM disk. If you run unslung, the root filesystem is on an external disk.

There are a bunch of similar optimizations that increase the amount of RAM available on the NSLU2 if you unsling.

timmy2
Posts:26
Joined:Mon Jan 16, 2006 8:30 pm

response to Simon about telnet and unslinging

Post by timmy2 » Wed Feb 15, 2006 6:16 pm

TwonkyVision support and actual experience disagrees with your assertion about telnet. It is not necessary to first enable telnet or do anything prior to running NASSetup other than having flashed the NSLU2 with uNSLUng. The script used by NASSetup enables telnet and then telnets into the NSLU2 on its own using the default password "uNSLUng". (This is at least partly why no drives can be attached when running NASSetup.)

To answer your question about "unslinging" I'll quote an email from Maarten Pennings:

"Unsling does two things. It copies the root filesystem to the harddisk, and it puts an "unsling" flag in the root of the harddisk. When booting, the Unslung firmware checks for this flag. If it is present, it will not use internal RAM for a ramdisk (copying the root filesystem from flash), instead it will use the hard disk.

The whole purpose of this is to free up ram, so that it can be used for (data processing)."

I asked TwonkyVision support about this and they replied:

"The twonkymedia.db HAS to be on the HDD - otherwise the performance is very poor, the application itself can be stored in the memory."

So, while you and I (and others) may have successfully used NASSetup to install TwonkMedia into our NSLU2's RAM, we now must figure out how to move the database to hard drive and (I assume) tell TM about its new location. Everytime the puzzle becomes clearer someone takes a few pieces away to further cloud it up.

JoeDiMaggio
Posts:41
Joined:Thu Jan 26, 2006 7:11 pm
Location:Stuttgart, Germany

Re: response to Simon about telnet and unslinging

Post by JoeDiMaggio » Wed Feb 15, 2006 7:01 pm

Hi guys,
i'm still waiting for my NSLU2 to arrive from amazon, but i'm already preparing to get the pieces together and this discussion and all the other threads about this topic (including timmy's WIKI) are so valuable for me. Thanks for helping to make things clearer. This is all really confusing.
timmy2 wrote: I asked TwonkyVision support about this and they replied:

"The twonkymedia.db HAS to be on the HDD - otherwise the performance is very poor, the application itself can be stored in the memory."

So, while you and I (and others) may have successfully used NASSetup to install TwonkMedia into our NSLU2's RAM, we now must figure out how to move the database to hard drive and (I assume) tell TM about its new location. Everytime the puzzle becomes clearer someone takes a few pieces away to further cloud it up.
If Twonky says that the DB has to be on the HDD, why do you assume that NASSetup puts it into RAM??

Just my thoughts...

Cheers,
Joe

timmy2
Posts:26
Joined:Mon Jan 16, 2006 8:30 pm

response to JoeD re database

Post by timmy2 » Wed Feb 15, 2006 7:28 pm

I assume it's in RAM because if I look around the hard drive using Windows I see no database; I see nothing but two folders:

admin 1
disk 1

(I haven't copied any media to it yet because I'm trying to sort out where my media folders should go so that I can use the drive for general file storage as well, and want to isolate TM's searching for media to just the media file areas.

I suggest you not follow my wiki beyond flashing uNSLUng. At this point I have not decided whether using NASSetup is the best approach, especially while the database location is an open issue. One correspondent says his system, installed using NASSetup, is working fine but he has "only 3000 tunes" on it; so maybe we'll end up collectively deciding that for smaller libaries leaving all of TM in RAM is fine but for more extensive libraries and compatibility with the rest of the uNSLUng community we should unsling and install TM manually onto the drive, which I have yet to document to my satisifaction (since I'm a moron needing explicit instructions). :shock:

JoeDiMaggio
Posts:41
Joined:Thu Jan 26, 2006 7:11 pm
Location:Stuttgart, Germany

Re: response to JoeD re database

Post by JoeDiMaggio » Wed Feb 15, 2006 7:43 pm

timmy2 wrote: One correspondent says his system, installed using NASSetup, is working fine but he has "only 3000 tunes" on it; so maybe we'll end up collectively deciding that for smaller libaries leaving all of TM in RAM is fine but for more extensive libraries and compatibility with the rest of the uNSLUng community we should unsling and install TM manually onto the drive, which I have yet to document to my satisifaction (since I'm a moron needing explicit instructions). :shock:
I have a much larger library too and my feeling tells me to follow the "unsling and manual twonky-install" path. Any description out there that you can recommend (until your Wiki is to your satisfaction :wink: )

Cheers,
Joe

timmy2
Posts:26
Joined:Mon Jan 16, 2006 8:30 pm

response to JoeD

Post by timmy2 » Wed Feb 15, 2006 7:59 pm

I have yet to find anything that covers it completely and without assuming prior understanding. Hold tight and I'll finish the wiki as soon as I can document a predictable installation.

simonhancock
Posts:87
Joined:Wed Feb 08, 2006 10:36 am
Location:Somerset, UK

Re: response to Simon about telnet and unslinging

Post by simonhancock » Wed Feb 15, 2006 8:56 pm

timmy2 wrote:TwonkyVision support and actual experience disagrees with your assertion about telnet. It is not necessary to first enable telnet or do anything prior to running NASSetup other than having flashed the NSLU2 with uNSLUng. The script used by NASSetup enables telnet and then telnets into the NSLU2 on its own using the default password "uNSLUng". (This is at least partly why no drives can be attached when running NASSetup.)

Maybe things have changed. My first installation attempt was with TW 3.0. I think the installation utility was called something like NSLUinstall, rather than NASSetup. I first ran it with my drives installed and got the message 'Telnet not enabled' and it told me where to enable it on the NSLU2 config page.
I enabled Telnet, then the setup program failed because the slug root password wasn't uNSLUng (this was because the drives were plugged in).

simonhancock
Posts:87
Joined:Wed Feb 08, 2006 10:36 am
Location:Somerset, UK

Re: Best way to install is without drive and unslinging?

Post by simonhancock » Wed Feb 15, 2006 8:59 pm

Cheburashka wrote:
simonhancock wrote: I had always assumed that 'unslinging' just refered to installing the uNSLUng firmware in place of the Linksys firmware on your NSLU2 and 'unslinging to a drive' was a separate issue. Does 'unslinging to a drive' actually mean that the firmware (is this whole operating system?) and the Twonkyvision software are installed on one of your external hard disks?
Yes. The NSLU2 has very limited memory. If you run without unslinging, the firmware uses a lot of that RAM to put the root filesystem and some other stuff on a RAM disk. If you run unslung, the root filesystem is on an external disk.

There are a bunch of similar optimizations that increase the amount of RAM available on the NSLU2 if you unsling.
So once you have unslung to the NSLU2, how can you unsling to a disk (for someone who doesn't know Linux).
Failing this, how could I move my twonky db to a drive? Could I only move it to an unslung drive?

User avatar
twonky-christian
Lynx Technology Staff
Posts:1123
Joined:Fri Sep 10, 2004 3:16 pm
AV Hardware:PC
Location:Berlin
Contact:

Post by twonky-christian » Thu Feb 16, 2006 1:06 am

Hi,

have a look at NASSetup and install.nas and install.sh if you want to modify anything.
The files are simple - the install.nas controls NASSetup and which commands it needs to do to transfer the software.
At the end it will start the install.sh file on the remote system.
From the files you can see that we asume no HD is installed on
setup - and that the twonkyvision.db is created/installed to be
under /share/flash/data/twonkymedia.db - that is the
first HD which has to be plugged in after NASSetup has finished.
You can - however - have a FAT32 harddisk installed during the
setup :-)

Anyway - you may try and modify these files for all the different
NSLU2 setups - and send them to gran@twonkyvision.com

We can than put them in the next release - so the users can use
the NASSetup with their installaltion - unling - not unsling .....

Here are the two files:

install.nas:
// For NSLU2
ENABLE_TELNET
// TELNET LOGIN
USER=root
PWD=uNSLUng
// ISSUE THESE COMMANDS AFTER STARTING FTP:
FTPCOMMANDS
!killall -9 mediaserver
!killall -9 twonkymedia
!killall -9 musicserver
!killall -9 twonkymusic
!rm /opt/mediaserver
!rm /opt/musicserver
!rm /opt/twonkymedia
!rm /opt/twonkymusic
!mkdir /opt
!mkdir /opt/etc
!mkdir /opt/etc/init.d
lcd /opt
get install.sh
get twonkymedia
get lame
get jpegscale
quit
chmod +x /opt/twonkymedia
chmod +x /opt/jpegscale
chmod +x /opt/lame
chmod +x /opt/install.sh
cd /opt
sh install.sh

##################################
install.sh:
#!/bin/sh
RC=/opt/etc/init.d/S99mediaserver

cat << EOF > /opt/etc/init.d/S99mediaserver
/bin/mount -t vfat /dev/sda1 /share/hdd/data > /dev/null
/bin/mount -t vfat /dev/sdb1 /share/flash/data > /dev/null

route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0 2>/dev/null

chdir /opt
/opt/twonkymedia -D
EOF

chmod +x /opt/etc/init.d/S99mediaserver

cat << EOF > /opt/twonkyvision-mediaserver.ini
contentbase=
contentdir=/share
friendlyname=Twonky NSLU2
dbdir=/share/flash/data/twonkymedia.db
httpport=9000
enableweb=2
scantime=90
platform=NSLU2
maxmem=15000
EOF

cp /opt/twonkyvision-mediaserver.ini /opt/twonkyvision-musicserver.ini
cd /opt

sh ${RC}



Thanks
Christian

JoeDiMaggio
Posts:41
Joined:Thu Jan 26, 2006 7:11 pm
Location:Stuttgart, Germany

Post by JoeDiMaggio » Thu Feb 16, 2006 1:17 am

twonky-christian wrote:From the files you can see that we asume no HD is installed on
setup - and that the twonkyvision.db is created/installed to be
under /share/flash/data/twonkymedia.db - that is the
first HD which has to be plugged in after NASSetup has finished.
You can - however - have a FAT32 harddisk installed during the
setup :-)
Christian,
for the newbie it would be great if you could explain a bit more detailled which Disk or Flash-Stick you assume to be plugged in at which moment of the process.
To understand your scripts it would be helpful to know which device is mounted to which /share/flash or /share/hdd.
Sorry if this is explained in the NSLU2 manual. I get mine this weekend, so i couldn't read it yet... :oops:

Cheers and thanks for your efforts,
Joe

simonhancock
Posts:87
Joined:Wed Feb 08, 2006 10:36 am
Location:Somerset, UK

Post by simonhancock » Thu Feb 16, 2006 8:12 am

twonky-christian wrote:Hi,

have a look at NASSetup and install.nas and install.sh if you want to modify anything.
The files are simple - the install.nas controls NASSetup and which commands it needs to do to transfer the software.
At the end it will start the install.sh file on the remote system.
From the files you can see that we asume no HD is installed on
setup - and that the twonkyvision.db is created/installed to be
under /share/flash/data/twonkymedia.db - that is the
first HD which has to be plugged in after NASSetup has finished.
You can - however - have a FAT32 harddisk installed during the
setup :-)

Anyway - you may try and modify these files for all the different
NSLU2 setups - and send them to gran@twonkyvision.com

We can than put them in the next release - so the users can use
the NASSetup with their installaltion - unling - not unsling .....

Here are the two files:


Thanks
Christian
Thanks Christian,
I don't understand Linux, so I don't think I'll be changing those scripts!

I installed unslung and twonkyvision without having any drives connected (as recommended). After installation, I switched off the NSLU2, plugged in 2 hard disks that had been previously formatted to EXT3 with the old linksys firmware, then switched back on.
Are you saying that the twonky database would automatically be placed on one of these drives?
I don't really understand the NSLU2 directory naming structure. Is one drive always called /share/flash and the other /share/hdd regardless of whether they are flash drives or hard disks?

Simon

pivello
Posts:30
Joined:Mon Jan 30, 2006 3:43 pm
Location:Roma

Re: response to Simon about telnet and unslinging

Post by pivello » Thu Feb 16, 2006 9:15 am

timmy2 wrote: "The twonkymedia.db HAS to be on the HDD - otherwise the performance is very poor, the application itself can be stored in the memory."
timmy2 wrote: I assume it's in RAM because if I look around the hard drive using Windows I see no database; I see nothing but two folders:

admin 1
disk 1
I have Twonky installed on external hdd. But I am very interested to this argument. So I have a doubt:

I read on Twonky User Manual about database:
... the directory which is given with the option dbdir.
Set this option to a full qualified pathname, where the MediaServer can store a persistent database.
Default: dbdir=
As default, the MediaServer will create a directory twonkymedia.db; within the first content
directory which was specified with the option contentdir.


I don't now after installation on NSLU RAM how is setted contendir

maybe after installing TV on NSLU2 memory dbdir could be changed:
dbdir=/share/hdd/data/public/mediaserver.db
but this option there isn't in web config interface so it would have to be set up in .ini file. But I do not Know how make this on Linux.
Last edited by pivello on Thu Feb 16, 2006 11:12 am, edited 3 times in total.

JoeDiMaggio
Posts:41
Joined:Thu Jan 26, 2006 7:11 pm
Location:Stuttgart, Germany

Re: response to JoeD re database

Post by JoeDiMaggio » Thu Feb 16, 2006 9:24 am

timmy2 wrote:I assume it's in RAM because if I look around the hard drive using Windows I see no database; I see nothing but two folders:

admin 1
disk 1

timmy2,
just in case you didn't see the thread.
Christian from TwonkyVision clarified here http://www.twonkyvision.de/forum/viewtopic.php?t=929 that NASSetup installs the mediaserver in memory and the DB on HDD

He also recommends NOT to unsling the OS to disk.
So it seems, that your WIKI is pointing to the right direction.

Cheers,
Joe

Schlitz
Posts:43
Joined:Tue Apr 11, 2006 1:33 pm

Post by Schlitz » Wed Aug 22, 2007 9:46 am

Hello,

can anybody tell me what the solution to this problem with max memory of 15000 is ? How can I find out, if my NSLU2 uses the RAM or the HD for the database ? And how can I change that ?
I have about 30.000 songs on my HD attached to the NSLU2 and the maximum RAM (maxmem=15000) is reached, so not all songs are listed.

Can somebody help me with that ?

Volker

Post Reply