• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

"Hacking" your NAS to enable linux

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

jokers_greg

Member
Joined
Jan 31, 2005
Location
Mississauga, Ontario
Hey guys, I'm writing this guide for those who have no idea how to navigate linux at all, but desperately want to run mediatomb or something of the sort on their NAS device. This guide is for the Dlink DNS-323, and it will show step by step how to get telnet going, and setting up mediatomb to work with your PS3 at home.

What you need to download before we start:

Fun Plug
Fun Plug/tgz (This is what's called a 'tarball' file, essentially linux's version of winrar, DO NOT unrar this file leave it as it is)
Putty for Windows (a program that will allow you to use telnet to communicate with your DNS-323)

-------------------- Step 1:Getting Started--------------------​
Throw in a drive into the NAS, and connect the ethernet port to your router via ethernet cable. The Dlink DNS-323 supports gigabit connections, so a gigabit switch or router is ideal. (oh and turn the thing on!)

-------------------- Step 2: Finding Your NAS' IP Address--------------------​
You need to figure out the IP adress of your NAS. You can use the "Easy Search Utility" from the provided CD buried inside the box. But also, you can find the IP looking at your network locations, or looking at the list of LAN connections. This can be done by looking under the admin page for your router. Check your router make, and look up what it's IP is here
For simplicity of this guide. Let's assume your NAS' IP address is: 192.168.0.25

-------------------- Step 3:Format Your Drive(s)--------------------​
Once you know your NAS' IP address, you'll have to format the drive you put in there. This can be done by typing:

192.168.0.25 into your browser url bar.

For the DNS-323 type in "admin" under admin and leave password blank. This will prompt a wizard that will format your drive to EXT2 or EXT3.

-------------------- Step 4:Mapping A Network Drive--------------------​
Map the drive. This can be done by hitting the "map network drive", call it whatever drive letter you'd like, I use X: because it sounds badass. In the folder path you will need your NAS IP address again:

192.168.0.25 into your browser url bar.

Then under folder path type:

\\192.168.0.25\Volume_1


That is your DNS-323's primary drive's root folder.

-------------------- Step 5:Move Downloaded Files to Root Folder--------------------​
Copy the Fun Plug files (including the .tgz file) into this root folder

-------------------- Step 6:Reset Your NAS--------------------​
Reset your NAS by going to that admin page again and typing in the username and password. (refer to Step 2 and 3). Once inside, under
Tools-->System-->System Restart

-------------------- Step 7:Install Putty--------------------​
Once the device has reset, it's time to install Putty on your computer.

-------------------- Step 8:Using Telnet--------------------​
Open up Putty. Under Hostname (or IP Address) type:

192.168.0.25

And select "telnet" under connection type. This will change the port to 23

hit "open"

-------------------- Step 9:Navigating To Root Folder Using Putty--------------------​
Ok here's the tricky stuff, you've now enabled linux on your NAS box, and this is where things begin to get confusing (If you've never used linux before).

Ok so before it gets crazy, go to your mapped drive and make any folders (using windows) that you wish to stream from to your PS3. As an example, I made "Movies", "TV Series", and "My Videos" folders.

with putty open, type

cd mnt/HD_a2

hit enter, then type

ls (that's a small L, not a capital I)

hit enter

if you've already made those folders in the root drive you should see your folder names in the putty dialog box.

-------------------- Step 10:Copying Mediatomb Build--------------------​
Download Mediatomb pick the current build, and copy the file into your Volume_1 root folder

-------------------- Step 11:Installing Mediatomb On Your NAS Device--------------------​
with putty open, hit ls again, and you should see the tar file in the directory. type the following

tar xzf mediatomb-0.12.0-SVN1903-static-dns323.tar.gz


or (depending on which version you downloaded)

tar xzf mediatomb-0.12.0-SVN2017-static-dns323.tar.gz

this tar function, will automatically "unrar" the files, and will create a new folder called "mediatomb12"

-------------------- Step 12:Editing Mediatomb Configuration File--------------------​
still using putty, go to the mediatomb config folder meaning type:

cd mediatomb12/config

(you can always hit ls to after, to make sure you're in the correct directory)

once in that folder type:

vi config.xml

this will start up the built-in text editor. How do you use the text editor? look here

-------------------- Step 13:Editing Config, and Resetting NAS--------------------​
With the text editor up, you will have to change a couple of things so that mediatomb works with your PS3. The answers are right in the code. It'll say someting like "uncomment the lines below for the PS3". All you have to do there is delete the:

<!-- at the beginning of a comment and
--> at the end of a comment

there are a couple of instances where that needs to be done in the config.xml file, make sure you do them all. If you screw something up and get lost, you can always delete the mediatomb12 older and tar the file again (see Step 11). Once changes have been made to the config file, you will have to reset your DNS-323 for them to take place, so do that now.

-------------------- Step 14:Starting Mediatomb--------------------​
Once that is done, open up putty again (See Step 8) and type:

cd mnt/HD_a2/mediatomb12

that will get you back into the mediatomb12 folder, then type

./mediatomb.sh

this will start mediatomb. You can close Putty now.

-------------------- Step 15:Configuring Mediatomb (web-based)--------------------​
Back to windows, start up your browser and type your NAS IP address with a :49152 at the end. Following previous examples,

192.168.0.25:49152

this will bring up the mediatomb page. Click on "filesystem", go to mnt, HD_a2 and you'll find your "Movies", "TV-Series", and "My Videos" folders there.

Click on one of the folders (but don't expand it) and you'll see a plus sign at the top right of your screen, with a refresh symbol around it. Click that icon and set to these settings:

Scan Mode: Timed
Scan Level: Full
Recursive: check


leave the others the way they are. and hit "set". Do this for each of the folders you'd like your PS3 to stream.

-------------------- Step 16:Check--------------------​
Once the folders are scanned in, they will show up under the "database" side of things. expand PC directory, mnt, HD_a2 and your scanned folders should appear there.

To be safe, select those folders again (in the database side) and hit that icon you used in Step 15, and set it to the same settings (if it isn't already)

That's it you're done!

You can now copy any of your video files from your computer into its appropriate folder on the NAS drive (Movies, TV Series, My Videos etc.) and it will scan them in automatically. Since you set the scans to recursive, the NAS will look every 1800s if there are new files uploaded to it. And it will then put them in the database automatically.

You never have to run putty again, unless you turned off your NAS. If you turn off your NAS, and want to turn it back on again and stream to your PS3, you will have to repeat Step 14, to start mediatomb again. That's it!

This guide is really rough, I'll do some editing once I get a little a time. In the meantime feel free to offer some suggestions on how I can fix this thing up, or if you have some shortcuts that can be explained in "english" and not hardcore linux syntax lol
 
Last edited:
Again, this is very rough, I'll edit it later, right now im exhausted. please constructive criticism only, this is my first "guide" and I can tell by looking at it, it's difficult to read, and not very neat. Please help
 
Great guide and nice descriptions. I've ran into a problem where mediatomb doesn't start. I'm getting an error about not finding the transcoding command. I believe there is a package missing, but don't know which or how to install it. Any help? I'm using my DNS323 to stream to a Sony Blu-ray player, not PS3. Also aside from creating the config.xml from the sample, I didn't change anything in the config.xml. Also attached the block on the madwav transcoder. Thanks!

/mnt/HD_a2/mediatomb12 # ./mediatomb.sh
2011-05-14 02:12:41 INFO: Loading configuration from: /mnt/HD_a2/mediatomb12/config/config.xml
2011-05-14 02:12:41 INFO: Checking configuration...
2011-05-14 02:12:41 INFO: Setting filesystem import charset to ASCII
2011-05-14 02:12:41 INFO: Setting metadata import charset to ASCII
2011-05-14 02:12:41 INFO: Setting playlist charset to ASCII
2011-05-14 02:12:41 ERROR: error in configuration, transcoding profile "madwav" could not find transcoding command madplay in $PATH

<profile name="madwav" enabled="yes" type="external">
<mimetype>audio/wav</mimetype>
<accept-url>no</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>no</accept-ogg-theora>
<agent command="madplay" arguments="--output=wave:%out %in"/>
<buffer size="1048576" chunk-size="131072" fill-size="300000"/>
</profile>
 
Back