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

21 Comments »

  1. Hello Mr Lazy,

    if you dont mind, i have a question. what do you mean when you said “the only significant disadvantage of this is that it limits you to a transfer size of 8192”
    how many Mbps can TrueGrid achive using a wifi approx? and would i be able to stream 1080p mkv files?

    thank you in advance

    Comment by jimsta10 — August 4, 2009 @ 21:28

  2. Hi

    I’m refering to the size of the transfer window (in bytes) that NFS uses. Think of it as packet size.

    Your other questions are difficult to answer, because everyone’s environment will be different. I personally would never want to use wi-fi for streaming, certainly not for HD video.

    Re streaming 1080p files, the only way to know for sure is to try it. Some people have reported no problems streaming 1080p from NFS shares. However, I would be VERY surprised if it works over wi-fi.

    Regards

    Comment by Mr Lazy — August 5, 2009 @ 10:59

  3. how do you add these servcies if you use windows xp ?

    Comment by daskino — August 10, 2009 @ 11:14

  4. Thanks Mr Lazy. I have Win XP home. Will true grid directions work with it. I am good till bullet 12 and can confirm that NFS server is exporting shares. However when I telnet to WDTV and do mount -t nfs, I do not see anything. I would appreciate any help on how to address this

    Comment by Amitabh Bhargava — September 3, 2009 @ 16:49

  5. I don’t see why it wouldn’t work with XP (firewall might need to be turned off) but I don’t have XP so can’t be 100% (actually I do have an XP Pro laptop but it’s used for work purposes only).

    Perhaps start a new thread over at wdtvforum.com, best place to get any problems resolved.

    Comment by Mr Lazy — September 4, 2009 @ 08:54

  6. Thanks Mr. L !!

    I’ve been on the WDTV forums to see how I could do this but, but could not find a guide basic enough for me to follow with any confidence.

    I didn’t have a clue where to start and your guide is great ! I had a couple of problems getting the WDTV to recognise the shares but retraced my (your) steps, found where I’d gone wrong (schoolboy error) and now it works perfectly !! Streaming a 1.4GB MKV from my laptop – no judder – FF and RW no problem.

    Thanks again !!

    Comment by Haf — September 23, 2009 @ 06:14

  7. Well, every time i try to start the program it crashes (sfx.exe has performed etc)

    Comment by Shadow Step — October 29, 2009 @ 02:05

  8. if it is crashing, make sure there is NO BLANK line at the end of the EXPORTS file….

    Comment by mike — February 2, 2010 @ 21:18

  9. Hi, I am using windows 7 x64 and my Truegrid nfs server won’t start.I keep getting an error “windows could not start nfs server on local machine” error 1067.

    This is what i did so far I created the two folders Truegrid in c:program files (x86) and I put the etc folder in c:windows then I started cmd as administrator the portmap is started but the nfs server fails…

    Is it related to windows 7, I have a firewall should I disable it?

    Thanx

    Comment by Louis — March 9, 2010 @ 23:44

  10. Yes try it with the firewall disabled. I doubt if it’s W7 related.

    Comment by Mr Lazy — March 10, 2010 @ 11:34

  11. Hi Mr.Lazy,
    I’m running Windows 7 and I get this error message when I type “portmap add”:
    TrueGrid Portmapper Message:
    Error: Access Denied to open Service Controller

    I don’t know how to proceed. any tips?
    Thanks.

    Comment by KR — March 12, 2010 @ 01:58

  12. Never seen that before. Make sure your command prompt window has admin privileges.

    Comment by Mr Lazy — March 12, 2010 @ 11:53

  13. Ok I got it working except the vi part it shows me – net.mounts 1/1 100% and I can’t write the xmount command

    Thanx for you help

    Comment by Louis — March 13, 2010 @ 20:30

  14. The admin privileges trick worked. Also, I had to suspend the firewall to make it work. But after several iterations… Thanks!

    Comment by KR — March 14, 2010 @ 04:49

  15. In Win 7 the NFS server not start, until you put “export” in c:\windows\etc

    Comment by BlackApple — March 21, 2010 @ 22:04

  16. When I try to type in the “xmount :/test test nfs” command, I’m getting the following error msg:

    modprobe: module nfs not found
    modprobe: failed to load module nfs

    Anyone have an idea what is causing this?

    Comment by tonester — June 20, 2010 @ 07:08

  17. Are you using ext3-boot or WDLXTV? If using WDLXTV do you have the nfs app bin?

    Comment by Mr Lazy — June 21, 2010 @ 08:28

  18. Mr Lazy: I’m using WDLXTV with the nfs.app.bin

    Comment by tonester — June 22, 2010 @ 17:44

  19. Well, if you have the app bin in the root of your USB stick (or hard drive) then I have no idea. Suggest starting a new thread at forum.wdlxtv.com

    Comment by Mr Lazy — June 23, 2010 @ 09:05

  20. about “error 1067” –> Try to remove all the texts inside ‘exports’ file. Just keep one line, say, ‘/test -path=C:\tmp’.

    Comment by TERRY — October 4, 2011 @ 13:13

  21. error 1067 – Make sure you don’t have any OTHER NFS servers running. Goto your services tab and stop the other NFS Servers that are running and PORTMAP for NFS. You should be able to then click on the TrueGrid Portmapper and TrueGrid NFS Server and START them. Especially if you installed hanewin NFS as it is setup to auto start SunRPC Portmapper and NFS Server. Don’t forget to open your firewall to allow these to apps to work. You will have to manually add nfs.exe and portmapper.exe to your firewall rules to make this work. Test with firewall off first and get things working.

    Comment by JR — January 3, 2012 @ 04:19


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.