Mr Lazy

November 18, 2009

Auto remount of WDTV network shares on NAS startup

Filed under: NFS,WD TV — Mr Lazy @ 17:08
Tags: , , , , , , , ,

You don’t always want a NAS to be on 24×7 – some NASs have a scheduled power-off/on feature.  Unfortunately when I enabled this feature on my Synology DiskStation I discovered that the WD TV would produce a ‘Folder is empty’ message for the NFS shares after the NAS had restarted.  Playing around with the NFS mount parameters did not produce a solution.  Here’s my workaround…

The below procedure will install OpenSSH* on the WDTV via optware, set up SSH between the Synology DiskStation and the WDTV and run a script on the NAS to connect to the WDTV and re-mount the NFS shares.  A basic knowledge of Linux (ie. navigation via CLI, editing text files etc.) is required.  Although written for the DiskStation, it should work with any NAS that runs an embedded Linux and supports NFS and SSH.  I’ve tested it on ext3-boot, and hopefully it will work on WDLXTV with perhaps a little tweaking of file locations necessary.

1. first you need to ensure you have optware installed on your WDTV.  Available from: http://b-rad.cc/optware-for-wdtv

2. install OpenSSH:

# /opt/bin/ipkg update # /opt/bin/ipkg install openssh

3. now we need to set up SSH.  On the NAS, log in as root:

DiskStation> ssh-keygen Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is: c5:49:8a:39:a2:06:19:c4:26:2c:f7:a4:1a:81:ce:a5 root@DiskStation
The key's randomart image is:
+--[ RSA 2048]----+
|*.        .      |
|=*...  o + .     |
|Ooo+. + . +      |
|.E.... . .       |
| oo     S        |
|..               |
|                 |
|                 |
|                 |
+-----------------+

Obviously your fingerprint and randomart image will be different, but you can ignore these anyway.

4. on the WDTV log in as root.  Unless you’ve changed it, the home directory of the root user on ext3-boot will be ‘/’, so that’s what I’ll assume here.  Create a hidden directory called .ssh below ‘/’, set the necessary permissions and change to the new directory:

# cd
# mkdir .ssh
# chmod og= .ssh # cd .ssh

5. now you need to get the public key that was generated on the NAS over to the WDTV.  The public key was stored in the file /root/.ssh/id_rsa.pub on the NAS.  On the WDTV the public key needs to be stored in the file ‘authorized_keys’ in the .ssh directory.  There are several ways of doing this.  The most reliable is to copy the file to a network share that the WDTV has access to, then use the following command:

# mv /pathtoshare/id_rsa.pub /root/.ssh/authorized_keys

Alternatively a crude but simple method is just to use the Windows clipboard.  On the NAS type:

DiskStation> cat /root/.ssh/id_rsa.pub

and select the output (from the first ‘s’ of ‘ssh-rsa’ to the last character ie. the ‘n’ of ‘DiskStation’, but not beyond) with your mouse to copy it to the Windows clipboard.  Back on the WDTV, type echo, then space, then paste (right-click) followed by a ‘>’ followed by ‘authorized_keys’.  So the full command should look something like this:

# echo ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0rPE8n6R/rslffzIPZL3KNmIXL7Hn3176hJkL[SNIP]+wGOQ== root@DiskStation > authorized_keys

your public key will be a lot longer than this, I’ve shortened it for the sake of clarity.  I’ve also added spaces either side of the ‘>’ but this is not necessary.

6. now we need to set the correct permissions on the authorized_keys file:

# chmod og= authorized_keys

7. you should now be able to connect from the NAS to the WDTV without entering a username and password.  Try it by typing:

DiskStation> ssh root@wdtv.lan

8. now we need to set up some scripts on the WDTV to do some unmounting and mounting.  Type mount -t nfs.  Here are some of my NFS mounts:

192.168.1.7:/volume1/OurMusic on /tmp/media/usb/USB1/OurMusic type nfs (rw,v3,rsize=8192,wsize=16384,hard,lock,proto=udp,addr=192.168.1.7)
192.168.1.7:/volume1/OurMusic on /tmp/media/usb/OurMusic type nfs (rw,v3,rsize=8192,wsize=16384,hard,lock,proto=udp,addr=192.168.1.7)
192.168.1.7:/volume1/OurMusic on /tmp/media/usb/USB1/8AA6-71D0/OurMusic type nfs (rw,v3,rsize=8192,wsize=16384,hard,lock,proto=udp,addr=192.168.1.7)
192.168.1.7:/volume1/DVD on /tmp/media/usb/USB1/DVD type nfs (rw,v3,rsize=8192,wsize=16384,hard,lock,proto=udp,addr=192.168.1.7)
192.168.1.7:/volume1/DVD on /tmp/media/usb/DVD type nfs (rw,v3,rsize=8192,wsize=16384,hard,lock,proto=udp,addr=192.168.1.7)
192.168.1.7:/volume1/DVD on /tmp/media/usb/USB1/8AA6-71D0/dvd type nfs (rw,v3,rsize=8192,wsize=16384,hard,lock,proto=udp,addr=192.168.1.7)

the items in bold are the mount points and these are what will need to be unmounted by our script.  So, I created a file called ‘unmount’ in /usr/bin that looks like this:

#!/bin/sh
umount /tmp/media/usb/USB1/DVD
umount /tmp/media/usb/DVD
umount /tmp/media/usb/USB1/8AA6-71D0/DVD
umount /tmp/media/usb/USB1/OurMusic
umount /tmp/media/usb/OurMusic
umount /tmp/media/usb/USB1/8AA6-71D0/OurMusic

notice the ‘#!/bin/sh’ at the top.  In very basic terms, this tells Linux that it’s a shell script.  The umount command does accept wildcards, but I found that this was unreliable as a) it tried to unmount files that were on my USB stick and b) if it tried to un-mount a sub-directory it would give a ‘resource busy’ error.  Of course, there will be a way to automate this, but for the sake of typing a few lines and using copy/paste I don’t see the point.

9. there’s no point creating a new script to mount the NFS shares again, because we already have one – it’s called net.mounts.  Turn the file into a script by adding ‘#!/bin/sh’ as the first line.

10. I created a script called ‘remount’ in the /usr/bin directory which looks like this:

#!/bin/sh
/usr/bin/unmount
/boot/net.mounts

of course, I could have just put the umount commands in this script, but I thought it would be useful to be able to unmount all the NFS shares at any time without necessarily wanting to mount them again.

11. set the necessary permissions on the scripts:

# chmod 755 remount unmount
# chmod 755 /boot/net.mounts
# ls -l remount unmount
-rwxr-xr-x    1 root     root           73 Nov 17 21:19 remount
-rwxr-xr-x    1 root     root          450 Oct 14 15:58 unmount
# ls -l /boot/net.mounts
-rwxr-xr-x    1 root     root         1050 Nov  9 20:57 /boot/net.mounts

12. as always, test that the scripts work by running them. For example, you should be able to just type ‘remount’ regardless of which directory you are currently in

13. if all is well, now test things from the NAS.  Type:

DiskStation> ssh root@wdtv.lan /usr/bin/remount

and check from the WDTV to watch your shares disappear from ‘mount -t nfs’ and reappear.

14. now we need to add a script to the startup of the NAS.  Go to /usr/syno/etc/rc.d and choose an appropriate name for your script.  I started mine ‘S99…’ as I figured it needed to start after most of the others services (ie. NFS, SSH) had started.  Don’t forget to add a ‘.sh’ suffix otherwise it won’t get started by the DiskStation boot process.  Just two lines:

#!/bin/sh
ssh root@wdtv.lan /usr/bin/remount

15. remember to set the correct permissions:

DiskStation> chmod 755 S99myscript.sh
DiskStation> ls -l S99myscript.sh
-rwxr-xr-x    1 root     root          105 Nov 17 16:53 S99myscript.sh

16. and that’s it!  Test that it works by going into DSM and selecting Shutdown -> Restart.

If any WDLXTV users try this please drop me a note to let me know what you had to change, many thanks.

Now all I need is for Synology to allow users to disable the annoying startup beep🙂

*You could try using the dropbear SSH server if you want – this is pre-installed with ext3-boot or you can download the app.bin for WDLXTV.  I couldn’t get it to work, it wouldn’t recognise the correct permissions on root’s home directory even when I moved it to one level below ‘/’, but I’m now wondering if I needed to generate new host keys – I didn’t bother trying again.  The only advantage of using dropbear is if you’re running loads of apps as it takes up less space than OpenSSH.  The advantage of OpenSSH is that it’s the same as what’s running on the Synology so no worries about compatibility plus the commands are the same on both systems.

August 27, 2009

Producing thumbnails on the WD TV for AVCHD clips

Filed under: WD TV — Mr Lazy @ 11:26
Tags: , ,

The WD TV plays back the AVCHD produced by my camcorder beautifully.  But I haven’t had much time to do any editing yet, so I currently have over a thousand clips.  Windows 7 can automatically produce thumbnails from AVCHD clips and so can Vista with a little tweaking, so it’s a pity that WD didn’t focus a little more on this aspect.

The tricky part is generating the thumbnails – obviously when you have thousands you don’t want to do this by hand :-)  Because I have a Canon HF100 camcorder I used Pixela ImageMixer 3 SE – I don’t know if this will work with other camcorders – or the application that came bunded with your camcorder may also produce thumbnails.  Note that ImageMixer does not output thumbnails as a feature – I had to dig around various directories to see if the thumbnails it produced for display purposes were saved somewhere as files.

If you don’t have an application that can generate thumbnails and would rather not go down the manual route (ie. generating JPEGs from Windows Movie Maker, MPC-HC, VLC etc.) then you could try this program which I started to use before I realised that ImageMixer could generate thumbnails:
http://cfed-ttf.blogspot.com/2008/07/thumbcache-version-2.html.  It provides a means to extract the thumbnails that Explorer uses in Vista (you will need to have enabled AVCHD thumbnail generation in Vista first of course with the appropriate codecs etc).  Be warned though that this method will be VERY convoluted with a lot of manual tasks – I was going through 21 steps.

Tools I used:
– ReNamer available from: http://www.den4b.com/
– IrfanView available from: http://www.irfanview.com/
– Pixela ImageMixer 3 SE available from: http://www.pixela.co.jp/oem/canon/e/

I’m not going to give you a tutorial on each of those programs, but it should be possible to easily work out each step by reading the built-in help or documentation for each program.

If you already use ImageMixer to import video directly from the camcorder or via a card reader you will know that internally it uses filenames based on a date-time format ie. YYYYMMDDHHSS.  Although I don’t use ImageMixer for this purpose (I just copy straight from SDHC card via card reader) I chose to rename my clips using that format because that way I would be able to tell from the WD TV when a particular video clip was shot (by default, the HF100 generates filenames such as “00001.MTS” etc).  It also meant I could store all the clips in the same directory without fear of overwriting any with the same name.  To do this I used ReNamer with a rule that used the :File_DateModified: meta tag.  Unless the file has been altered in some way the Date Modified value should reflect when the video was taken (note that the act of renaming does not change this value).  FYI, it actually represents when recording stopped, rather than when recording started.

1) ensure that the ImageMixer thumbnail directory is empty – thumbnails are stored in C:\ProgramData\PIXELA\ImageMixer 3 SE\IMxLibrary\_Data\Thumbnails.  By default Vista hides the ProgramData directory, so you will need to show hidden files.  Just delete any files in here.
2) start ImageMixer 3
3) use File->Add folder to library.  This generates the thumbnails – note that they are in TIFF format
4) use ReNamer to remove the suffix (ie. “_12”) at the end of the thumbnail’s filename
5) use IrfanView Batch conversion to convert the TIFFs to JPEGs
6) copy the JPEGs to the same folder as your videos

UPDATE Jun10: I’m now using ffmpeg to produce my thumbnails using one of the following commands:

for %i in ("<pathname>\*.m2ts") do ffmpeg -i "%i" -f image2 -ss 30 -t 0.001 -s 320x180 -deinterlace -y "<pathname>\%~ni.jpg"
ffmpeg -i "<pathname>\video.m2ts" -f image2 -r 0.25 -s 320x180 -deinterlace -y "<pathname>\thumb%d.jpg"

The first command will go through all the .m2ts files in the folder and produce one 320×180 size (I’m using the wide view of MSheet) thumbnail for each video based on the frame at 30 seconds in.  The second command, when given a single input file, will generate a thumbnail for every 2 seconds of video so you can review them and choose the best one, which is ideal for home videos.  If it seems odd that I’ve used a framerate (-r) of 0.25 it’s because the HF100 stores video in interlaced format.  If your camera stores video in the more common progressive format then you will need to change this parameter accordingly (ie. 0.5 for every 2 seconds) and remove the deinterlace flag.

August 14, 2009

Converting DV files to play on the WD TV

Filed under: WD TV — Mr Lazy @ 12:46
Tags: , , , , ,

One of the reasons I bought a WD TV was to play the AVCHD video files produced by my Canon HF100 HD camcorder.  But I also wanted to play the DV files that I’d captured from my previous camcorder, a MiniDV unit.  The WD TV cannot decode the DV format, so it has to be converted (transcoded) to another format.

Anyone with a MiniDV camcorder who has captured video to a computer will know that the resultant files can be pretty big – approx. 12GB for one hour.  Like most consumer camcorders (regardless of format), my old MiniDV camcorder was capable of producing perfectly acceptable video in good light, but struggled when the light was poor.  Seeing as I wanted to keep the original DV files, I didn’t want the newly created files to take up too much disk space.  But as a great deal of the footage was of the early years of my children, I wanted the picture quality to be almost as good as the original, particularly in low light scenes.

I’ve seen many posts in forums along the lines of “what’s the best program/codec to use for converting DV?” – the answer is that there is no “best”.  It depends on what your priorities are: picture quality, audio quality, file size, easy of use, speed of conversion, control over settings, special features etc.  The only way to find out what works best for you is to try several different programs and several different codecs.

I experimented with several freeware conversion tools and a few different video and audio formats.  First I tried the software that came with the WD TV – Arcsoft MediaConverter 2.5.  It seems to convert everything to H.264 (not a problem) but I didn’t like the way it forced me to use an AVI container and MP3 audio.  It was also horribly slow.  In theory MPEG2 should be the ideal codec to use for converting DV to.  I found that SUPER was very fast at transcoding to MPEG2, was fairly easy to use with very helpful pop-up tooltips and produced reasonable picture quality.  Shame about the cramped, non-Windows-like GUI.  I also tried WinFF.  Both SUPER and WinFF are front-end GUIs for the ffmpeg command line tool, so it was not surprising that the picture quality from both was indistinguishable.  WinFF has a much simpler GUI and is great if you just want to leave all settings to the default, but I preferred SUPER because I felt it gave me more control.  SUPER was, I think, the only tool I tried that allowed me to retain the audio in PCM format, but for this purpose the video quality is more important than the audio quality.

In the end I settled on using Handbrake, using the H.264 codec and AAC for audio.  The video produced had less grain (noise) than the MPEG2, though perhaps at the expense of a little sharpness.  I chose to use MP4 as the container format as a) with MKV the video would pause on the first frame for about a second wheres the MP4 would start playing straight away and b) MP4 allows cover art to be embedded and displayed on the WD TV.  I experimented with three different bitrates: 1500kbps (Handbrake’s default), 3000 and 5600.  The difference in video quality between the three was minimal, which just goes to show the efficiency of the H.264 codec.  I chose 3000kbps as it was a good compromise between file size (1.32GB per hour) and picture quality.  A 1500kbps bitrate meant that there was some pixelation (ie. “blockiness”) especially on facial shots and in poorly lit scenes.  A bitrate of 5600 gave only a slight improvement over 3000 – not enough to make the sacrifice of disk space.  After reading the website, I used the Decomb filter to deinterlace as opposed to the Deinterlace filter.  I discovered that I had to turn off “CABAC Entropy Encoding” otherwise the WD TV would not play back the video.  For anyone else attempting such a conversion project, let me know if you want to see screenshots of my settings. UPDATE 25Aug09: screenshots added as requested.

UPDATE 27Aug09: I produced thumbnails for the MP4 files by using Windows Movie Maker to select an appropriate frame to use as the thumbnail, then using the “Tools -> Take Picture from Preview…” feature to produce a JPEG.  I then used Irfanview to batch resize the JPEGs down to 268 x 200 (preserving the aspect ratio).  Finally I used Mp3tag to add the “cover art” to the MP4 file.

Screen1    Screen2

Screen3    Screen4

August 4, 2009

Auto-mount of NFS shares on PC startup

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

I’m saving up for a “proper” NAS, so at the moment I’m running my NFS shares off my main PC.  I don’t keep the PC on 24×7 but the WD TV does tend to stay on and I got tired of either rebooting the WD TV or manually re-mounting the shares if the PC had been re-started for whatever reason.  So, being the lazy type, I automated it, so that whenever the PC starts up it connects to the WD TV and runs the necessary xmount commands.

For this I used a program call ‘plink’ which comes as part of PuTTY http://www.chiark.greenend.org.uk/~sgtatham/putty/

I created a text file containing all my xmount commands and called this wdtv_commands.txt.  I saved it in the PuTTY directory which is probably not logical but it could go anywhere.

I then created a Windows Command Script (.cmd) file on the desktop containing the following two lines:

cd C:\Program Files (x86)\PuTTY
plink.exe wdtv-ssh -pw "" -batch -m wdtv_commands.txt

wdtv-ssh is the name of a PuTTY saved session which simply creates a SSH connection to the WD TV and uses the username of ‘root’

-pw “” tells plink to use a blank password

-batch tells plink to disable interactive prompts

-m tells plink to read commands from a file

I then set up a task in Task Scheduler to run the command script at Windows Startup.  A condition is also set to ensure the PC’s Ethernet is up, and the task is also delayed by one minute to be safe.

Obviously the advantage of putting the script on the desktop is that I can easily run it at any time.

Of course I still have the xmounts on the WD TV, and this way whether my PC restarts or my WD TV restarts, the NFS shares are mounted.  There can be times when the mounts are duplicated on the WD TV, but this does not seem to cause a problem.

On a related subject I created a desktop shortcut to run the ‘showmount’ command that comes with Truegrid NFS.  Again it’s a command script (.cmd) that contains the following line:

CMD /K "C:\Program Files (x86)\Truegrid\showmount.exe"

The ‘/K’ parameter stops the window from closing once the command has completed.

How to setup NFS shares on WD TV using haneWIN

Filed under: NFS,WD TV — Mr Lazy @ 13:16
Tags: , , , , , ,

Purpose: describe how to set up NFS shares on a Windows Vista PC using haneWIN NFS Server 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).  I’ve only tested it with ext3-boot, but it should work with WDLXTV (plus the NFS app pack of course).

UPDATE 27Aug09: after having tried again with haneWIN, I have finally settled on TrueGrid.  The day after I started using haneWIN again, the NFS service would not start for no obvious reason, even after I’d deleted and re-created the exports file (something which had previously fixed this problem).  Another time, the service simply refused to stop.  I can’t recall ever having had problems with TrueGrid.  The way I see it, the only reason to use haneWIN over TrueGrid is if you have files larger than 2.2GB (I’ve yet to try Labtam ProNFS other than just a brief test).

Note: although the program states that there is a 30-day evaluation period, in my experience the program keeps on working.

1.  Download haneWIN NFS Server from http://www.hanewin.net/nfs-e.htm

2.  install the software using the setup utility.  By default, the program installs into Program Files\nfsd, but I chose to install to Program Files\haneWIN, as it’s more meaningful

3.  this should also automatically install and start the two necessary services.  To check: Start > All Programs -> Administrative Tools -> Services

screenshot of nfs service hanewin

screenshot of sunrpc service hanewin

 4.   from either the Desktop or the Start menu, select the NFS Server program.  Note that this ‘control panel’ doesn’t have to be running for the NFS server to work (just the two Windows services above, which should start with Windows), it is only used to setup the server.  You can also start the program from the Windows Control Panel

screenshot of start menu hanewin

5.  select the Exports tab and select the ‘Edit exports file’ button.  The exports file is how you tell the NFS Server what shares you want to share with your WD TV.  An example exports file is included with haneWIN and this will have opened in Notepad when you selected this button

6.  modify the exports file according to your needs.  You need to insert the Windows path, followed by a space, followed by ‘-name:’ and then the name you want to call the share (this is how you will reference it from the WD TV).  Below is an example:

screenshot of exports hanewin

Note that the exports file has no extension – the filetype is just ‘File’, so don’t try and save it with a .txt extension because haneWIN won’t like it.

7.  select the ‘Restart Server’ button

NOTE: when you make changes in the future, I would advise you to stop the NFS Server service before editing the exports file.  Then, either restart it manually or select the Restart Server button.  This is because sometimes I found that the exports file would get corrupted if I tried to edit it whilst the server was still running and I had to delete and create a new exports file.

8.  the Exports tab should now auto-update.  This is what my Exports tab now looks like:

screenshot of exports tab hanewin

Notice that the Exports tab shows only the name I gave the share, not the full path.

That should be all we need to do on the PC side – you should be able to leave all the other haneWIN settings at default.  Before we set things up permanently on the WD TV we’ll first test 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.] 

10.  login to your WD TV, using a username of ‘root’ and a blank password (ie. press return)

11.  type the following:

xmount <IP address>:/DVDs DVDs nfs

where <IP address> is the IP address of your PC, for example xmount 192.168.1.2:/DVDs DVDs 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)

12.  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:/DVDs on /tmp/media/usb/USB1/DVDs type nfs (rw,v3,rsize=8192,wsize=8192,soft,intr,lock,proto=udp,addr=192.168.1.2)
192.168.1.2:/DVDs on /tmp/media/usb/DVDs type nfs (rw,v3,rsize=8192,wsize=8192,soft,intr,lock,proto=udp,addr=192.168.1.2)
192.168.1.2:/DVDs on /tmp/media/usb/USB1/8AA6-71D0/DVDs type nfs (rw,v3,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 may be different (regardless of firmware), but don’t worry about this for the moment

13.  on the haneWIN control panel, select the Mounts tab.  It should now reflect the shares that the WD TV has mounted:

screenshot of mounts tab hanewin

14.  if all is well, you can now set things up on a permanent basis on the WD TV.  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 my share:

xmount 192.168.1.2:/DVDs DVDs nfs udp,rsize=32768,wsize=32768

the UDP parameter forces haneWIN to use the UDP protocol as opposed to TCP – most people, including myself, have found UDP to be faster.   The rsize and wsize parameters tell NFS what transfer block size to use – because haneWIN supports NFS v3, it allows us a maximum of 32768 bytes.  However, you may have better results using a smaller size depending on your network etc.

15.  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

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

Blog at WordPress.com.