Mr Lazy

June 17, 2009

How to setup WD TV with NFS using TrueGrid

Filed under: NFS,WD TV — Mr Lazy @ 15:55
Tags: , , , , , ,

Purpose: describe how to set up NFS shares on a Windows Vista PC using TrueGrid NFS Server V1.1 and mount them from your WD TV.  This how-to assumes you are already running one of the community firmwares, have a working USB LAN adaptor and have set up networking (ie. your WD TV has an IP address and you can see it from your PC).

Note that TrueGrid only supports NFS version 2 – the only significant disadvantages of this are:
a) it limits you to a maximum transfer size of 8192 bytes. 
b) the maximum file size is 2GB (actually in my testing I’ve found it to be around 2.2GB).  If you want to stream files bigger than this, you probably need to look for another NFS server (ie. haneWIN etc.) or a NAS.

Also, it only supports UDP not TCP, though this should not be an issue for most users.

You may have heard some people talking about ‘NFS Dream’.  NFSDream is a GUI front-end for configuring TrueGrid which was developed by owners of the Dreambox Linux-based satellite receiver.  You may download and install it if you wish, but personnally I found that it did not help, therefore I will not be including it in this how-to.

At the time of writing I’ve only gone through this using ext3-boot, but in theory WDLXTV should work the same way.

1. Download TrueGrid NFS Server V1.1 from either of these sources:
http://www.acmeconsulting.it/pagine/opensource/download/
ftp://ftp.slac.stanford.edu/groups/glast/Online/support/nfs.zip

2. create a folder where you want TrueGrid to reside.  I created a folder in Program Files. 

3. extract the files to that folder

4. create a directory called ‘etc’ in C:\Windows

5. copy the files ‘rpc’ and ‘exports’ to the etc folder

 etc folder

6. the ‘exports’ file is where we tell the NFS Server which shares (ie. directories) we want the WD TV to be able to see.  Open up ‘exports’ into Notepad or your favourite text editor

7. see the screenshot for an example exports file:

example exports file

I’ll use the ‘test’ share for the purposes of this how-to, but before we move on take a look at the 2nd line – “/OurMusic” is how the folder will be shared with the WD TV – the WD TV will have no knowledge of the actual directory path ie. C:\Users\admin\Music.  You can either use ‘test’ to follow the rest of this how-to or set up your own share in the exports file now.

8. now we need to install and start the necessary services in Windows.  Open a command prompt window

9. cd to the directory where the TrueGrid files are

10. type:

portmap add
nfs add
portmap start
nfs start

keep the command prompt window open for the moment

11. check that the two relevant services are running by opening up the Services window.  There may be more than one way to do this on your PC depending on how you’ve customized it:

Start -> Administrative Tools -> Services
OR
Start -> All Programs -> Administrative Tools -> Services
OR
Start -> Run… -> type ‘services.msc’ -> press Enter

you should see two services called ‘TrueGrid NFS Server’ and ‘TrueGrid Portmapper’ and their status should be ‘Started’.  From now on these services should start with Windows

12. let’s make sure that the NFS server is ‘exporting’ our test share.  Back to the command prompt window and (making sure we’re still in the TrueGrid directory) type:

showmount -e

you should see something like this:

TrueGrid SHOWMOUNT UTILITY.
COPYRIGHT (C) BY XYZ SCIENTIFIC APPLICATIONS, INC., 1998
ALL RIGHTS RESERVED.  TrueGrid IS A TRADEMARK OF
XYZ SCIENTIFIC APPLICATIONS, INC.
---
/test      (everyone)

13. before we set things up permanently we’ll first test things to make sure we can see the NFS share from the WD TV.  [If you are not comfortable with using telnet/SSH and/or the command line, you don’t have to do this, but it’s a lot quicker because you don’t have to edit any files or reboot the WD TV etc.]  Login to your WD TV, using a username of ‘root’ and a blank password (ie. press return)

type the following:

xmount :/test test nfs

where is the IP address of your PC, for example xmount 192.168.1.2:/test test nfs. If the command has been successful you will receive no messages (though just because you receive no message does not necessarily mean the share is mounted)

type:

mount -t nfs

this will show you all the mounted NFS shares, if any.  If you don’t get anything back, it didn’t work.  You should see something like this:

192.168.1.2:/test on /tmp/media/usb/USB1/test type nfs (rw,v2,rsize=8192,wsize=8192,soft,intr,lock,proto=udp,addr=192.168.1.2)
192.168.1.2:/test on /tmp/media/usb/test type nfs (rw,v2,rsize=8192,wsize=8192,soft,intr,lock,proto=udp,addr=192.168.1.2)
192.168.1.2:/test on /tmp/media/usb/USB1/8AA6-71D0/test type nfs (rw,v2,rsize=8192,wsize=8192,soft,intr,lock,proto=udp,addr=192.168.1.2)

the pathnames may be slightly different with the WDLXTV custom firmware and the parameters at the end will almost certainly be different (regardless of firmware), but don’t worry about this for the moment

14. back at the PC, you can type the following into your command prompt window:

showmount

you should see something like this:

TrueGrid SHOWMOUNT UTILITY.
COPYRIGHT (C) BY XYZ SCIENTIFIC APPLICATIONS, INC., 1998
ALL RIGHTS RESERVED.  TrueGrid IS A TRADEMARK OF
XYZ SCIENTIFIC APPLICATIONS, INC.,
---
wdtv:/test

15. if it worked, you can now set things up on a permanent basis.  You need to edit the net.mounts file, either by copying it to your PC, editing it using your favourite text editor and writing it back to the USB stick (or hard drive in the case of WDLXTV) or, if you are feeling adventurous, use vi (or another text editor) directly on the WD TV.

Here’s the relevant line for our test share:

xmount 192.168.1.2:/test test nfs rsize=8192,wsize=8192

the rsize and wsize parameters tell NFS what transfer block size to use – as previously stated TrueGrid allows us a maximum of 8192 bytes, and I see no reason to use anything less.

If we wanted, we could call the share something other than ‘test’ at this point.  If I had used ‘xmount 192.168.1.2:/test movies nfs udp’ then WD TV would represent the share using a folder called ‘movies’ and not ‘test’.  I would recommend keeping export and share names consistent throughout the whole path as well as trying to keep exports similar to the directories that they reference, otherwise things could start to get very confusing.

16. you will now need to reboot your WD TV.  Test that the share is visible by going in to the relevant folder from the GUI/OSD.  Make sure the share contains at least one file of the relevant type (ie. a video file if you are going via ‘Video’).

If you have any problems disable any firewall on your PC and try again.  If  problems persist I would recommend starting a new topic at wdtvforum.com

Advertisements

Blog at WordPress.com.