Oct 25, 2009

Build your own expandable NAS box !

One more step towards a networked home, I needed a NAS server where I could keep adding disks as necessary with no restrictions ! Every ready made NAS server in the merket has its own restrictions like huge cost, missing RAID capabilities, not expandable to more than four disks, missing NAS/Samba mixed usage and so on.

So build my own NAS box was the mantra. What I needed:


1. Cheap processor with low power consumption

I already had a dual core 330 Atom board at home, just had not found a use for it. This CPU would be perfect for the NAS.

http://www.newegg.com/Product/Product.aspx?Item=N82E16813121359
Cost Rs 3500.



2. Small cabinet that does not take up space or power and makes no noise.

This was the tough one, especially in India. After a lot of research, I zeroed in on the Panache T3300 as the cabinet. It is small, in fact really compact and runs off a DC power board. This means that there is no PSU in the case (hence no fan/noise) and it runs off a DC adapter like a laptop. Disadvantage is the lack of a DVD drive.



Note the Panache box kept next to a WD external hard disk and a encyclopedia to get a idea of its size ! :bleh:

http://panache.co.in/store/product_info.php?products_id=111
Cost Rs 3200.


3. Operating system for the NAS box

Lot of options here. Windows embedded, standard linux distros and more. But what caught my eye is the FreeNAS distribution. It is a embedded OS that runs off a 200mb image, configured completely from the web and works like a charm on the Atom. More importantly, very configurable and very expandable. Just perfect for my needs ! :hap2:

http://www.freenas.org/
Cost Rs 0 !


4. Install disk for the OS on the NAS box

An 3.5" disk is out of question on the small panache box. A 2.5" disk is acceptable, but still draws 4-8 watts of power for no reason. And the minimum size is 40gb when I just need one GB of space.

A little more research got me onto a fantastic solution. I found out that there are IDE adaptors for compact flash cards for about Rs 100. The bad news is that a compact flash card is expensive. But here also, I stumbled across a great solution. A CF adaptor that used cheap SD cards internally !!!



A 2GB disk for a grand total of Rs 1000 and uses 0.2 watts of power!!!

http://dealextreme.com/details.dx/sku.711
Cost Rs 100

http://dealextreme.com/details.dx/sku.22338
Cost Rs 700 + Rs 200 for a SD card (Be a little carefull when you buy a SD card. It has to support DMA access, otherwise the OS will not install on the disk)


5. Memory. Less is more in this case !!!

A 512 DDR2 stick would have been plenty, but I had a spare 1GB stick with me and used it. Can hardly see any difference in performance between this and a 2gb stick.


All set, I assembled the Atom box and made sure everything is working.




Now is the time to download the FreeNAS OS and boot off the OS with a external DVD drive. There is a nice option to install the embedded system to the disk. Choose this and install the embedded FreeNAS OS to the attached compact flash drive.

Attach the external USB drives that you want to share, assign a IP address and reboot the machine. When the machine is up, you can connect to the headless machine from a browser at http://myfreeNASipAddress and configure the machine, the attached drives, the network shares, the services and everything else from the web !!!

You are all set. The network access is extremely fast and you can add as many USB drives as you want and share them on the network either cvia NFS or Samba. You can even setup software raid for the drives that need protection.



The NAS box up and running, attached to a monitor. See the power being drawn on the side. Just 0.11 Amps, which translates to a grand total of 25watts for a fully running NAS box. :hap2:

Total cost of the setup was Rs 9k without the external hard disks. For a NAS server that is expandable to as many USB disks as you want with RAID and multiple share options, this is worth it !

Oct 23, 2009

Hack the WDTV into a networked snazzy media player and Linux box !

I had a lot of spare time yesterday and thought, what the heck, it is time to hack the one device that I have not yet touched in the house

The WDTV has been a great media player for me over the last year, plays every damn file I throw at it, but I do not quite like the UI and more importantly, it is a pain to keep shuttling the attached hard disk to the computer to update the movies. So here is how I hacked my WDTV into a networked snazzy little linux box !!!


Step 1: The simplest and best hack for the WDTV :

http://b-rad.cc/wdlxtv

Just download the binary firmware file and place it in the root of a USB stick and reboot the WDTV. It should pick up the new firmware and update it. Step one done with the full fledged linux running on the WDTV !

By the way, there are quite a few options for hacking the WDTV. Two of the options I have listed below are for the advanced users who love to fiddle around in linux.

http://b-rad.cc/wdtv-firmware-dvd-enabled


http://wiki.wdtv.org/doku.php?id=ext3-boot-releases

Blow away the firmware files from the USB stick, from here on you will need the USB stick for your hacks.



Step 2: You need logs from here on to see what is happening on the WDTV.

Download : http://b-rad.cc/log-saver.app.bin

Place it on the root of the USB stick, boot the WDTV and when you shutdown, you should be able to see the boot log files on your USB stick.



Step 3: You need to buy a USB wireless network adaptor for the WDTV to go wireless !

There are a limited set of options here for what adpator you can use. See:
USB Wireless adaptor support

It seems like any adaptor that uses the rt2870 chipset is your best bet. The rt73 seems to be the easiest to get in India. The Dlink DWA-110 (1.4k) and the Dlink DWA-140 (2k+) adaptors are both available in ebay India for your reference and both use chipsets that work well on the WDTV.

I personally have the BELKIN Wireless G Plus MIMO Network Adapter which uses the rt2870 chipset :

http://www.newegg.com/Product/Product.aspx?Item=N82E16833314026




Step 4: You need the driver pack for the network adaptor.

See this thread:

http://wdtvforum.com/main/index.php?topic=1029.0

Follow the thread properly, get the dat file and the bin file for the adaptor drivers and drop them into the root of the usb key. Now reboot and if you have done the steps properly, you should see the adaptor lighting up and connecting to your router. I personally use WPA-AES encryption on my router and it works perfectly.



Step 5 : Install Samba server and NFS client on the WDTV

This is the part where I screwed up a lot as I had a lot of trouble trying to get the Samba server to export the USB devices. Anyways, it was just a matter of editing the smb.conf file to export your USB devices and bingo, the USB device attched to the WDTV is now visible on the network from any Windows box. Now I copy new movies sitting on my computer to the hard drive attached to the WDTV. It takes time as the processor is slow, but what the heck is 10 minutes extra when it saves me from moving the hard disk all over the place every second day.

Follow this post and you should be able to setup Samba pretty easily:
http://b-rad.cc/609/wdlxtv-app-pack-samba

Note that it is possible to mount NFS drives to the WDTV so that you can view media remotely, I have not yet attempted that. That is a experiment for another day, another time !



Step 6: Making the WDTV interface look better !!!

This was the fun part. Use custom packs to snazzy up the UI.

http://wdtv.free.fr/osdmod/


This changes the icons and makes the WDTV menus look snazzy. Like this:





Step 7: Show movie information for every movie.

This is something that I always wanted, go to a movie folder and get all information about the movie before I play it !!! There is a program called tvixie that does this. Download the point it to the movies folder in your hard disk and it downloads all the information in JPG form for all the movie to the same movie folder. And this is how it looks:




Here is the link : http://www.tvixie.com/



Step 8: Use the TVIXIE information on your WDTV.

See this thread below and use the plugin. As simple as that !!!

http://wdtvforum.com/main/index.php?PHPSESSID=d914fdbda1cd13578366c3a7941c1262&topic=1039.0

When you do this, this is how you browse your movies :




And clicking on any movie gives this screen full of info :




This was the way the WDTV was meant to be used !!!




P.S : I have provided links to the original author's webpage wherever there was a need to refer to someone else's work. This means that they have the full credit for their work and I do not mean to infringe on anyone's copyright.