WDLXTV-LIVE Tips #1: Mounting NFS under ‘Network Shares’

Its often requested of me to clearly detail various feature of my firmwares. Well this is the first tip in a series I’ll try and add to occasionally. The first tip deals with a feature that I have just included in WDLXTV-LIVE, which allows you to mount NFS shares under the ‘Network Shares’ category–which means you don’t have to have any local storage connected to view 1080p goodness off your NFS!! :D

This is a momentous occasion and a great feature that I am happy to finally be able to offer.

Now this trick requires a bit of a workaround. Heres how it works in a nutshell:

  • You create on your NFS a samba/cifs share; any location, any password, any username

  • The WD TV Live detects the CIFS share and shows it under ‘Network Shares’
  • You click on the entry and enter ok for the login info (if auto-login is not enabled)
  • I intercept the login and parse a file for shares to mount instead
  • You are then displayed your NFS shares!!!

Ok, so now full details and a walk through.

Step 1
Set up a CIFS/Samba share on your NFS device. The share can be anything really, all its used for is a placeholder so that our desired shares can be mounted.

Step 2
Verify that the CIFS/Samba share you set up is being detected by the WD TV Live. If it is detected, move on to step 3, otherwise go back to step 1 get it set up correctly.

Step 3
ssh into your WD TV Live and execute the following:

config_tool -c CIFSINTERCEPTOR=ON

This turns the cifs-interceptor on.

Step 4
Now for the config file, which is a text file (with no extension) called: cifs-interceptor

cifs-interceptor is of the following format:

//cifs-server/share-name|NFS01 NFS01-label|NFS02 NFS02-label|...|

cifs-server is the ip of the server where you set up the share in step 1.
share-name is the name of the exposed share you set up in step 1.
NFS01 is the full address of the first NFS
NFS01-label is what you’d like the NFS01 to be mounted as
NFS02 is the full address of the second NFS
NFS02-label is what you’d like the NFS02 to be mounted as
continue on for as many NFS as you desire to be mounted.


Here is my example /conf/cifs-interceptor

//192.168.0.104/b-rad|192.168.0.104:/media/disk slug|

This says that the share I’ll be intercepting is //192.168.0.104/b-rad and instead of mounting it I’ll be mounting 192.168.0.104:/media/disk as slug. Now note I could easily have had multiple more NFS’s listed, each must just be seperated by a pipe ‘|’

Note the ending pipe, it is very important. Be sure to end each cifs-interceptor line with one.

cifs-interceptor needs to be uploaded by /conf, so either edit it via telnet/SSH OR ftp in and upload it directory to /conf.

When you have /conf/cifs-interceptor in place you’re ready to go.

Step 5
With CIFSINTERCEPTOR=ON and /conf/cifs-interceptor configured we can go and select the server from step 1 and *hopefully* our desired NFS shares show up instead.


NOTE:
This will ONLY intercept shares you have listed in /conf/cifs-interceptor, if its not listed in that file it will be mounted like normal. This means you can have normal CIFS/Samba shares mounted, and then a special one which will be intercepted and used to mount your selected shares under.

TIP:
I don’t like having to select ok every time when it asks me for username & password … since that information is irrelevant and I’d prefer it autolog me in. So to turn autologin on, telnet/SSH in and execute the following:

config_tool -c ENABLE_AUTO_LOGIN='1'

With that set any time you select the server it will automagically mount and display your NFS shares :D

TIP 2:
The shares we are mounting instead of the intercepted CIFS do not necessarily have to be NFS, they could just as easily be CIFS or anything else.

I’ve spent a tremendous amount of time hacking the WD TV firmware[s], so if you appreciate my efforts please donate a little something using the link below : ) Thanks & enjoy.


nppk
November 16th, 2009 12:00

thx for instruction, i hope next tips rtorrent ;)

asgard
November 17th, 2009 00:04

This works brilliantly B-RAD awesome work!

Takuru
November 17th, 2009 01:55
Torleif
November 17th, 2009 13:21

Hi b-rad.
I get my wd tv live soon.
I am running Debian on my server. I do not wish to set up samba if I can use nfs. I dont intend to use local storage. I am not sure what you mean in step 1. Do you mean that I have to have both samba and nfs running on my server and share my nfs to my samba server internally and then mount the samba share on wd tv live.

Also what is the difference between network share and media share in wd tv live?

Thanks for helping!

<<< edit: Simply put the WD TV Live does not officially support NFS. I work around this by intercepting CIFS, which it does support, and mounting specified NFS[s] instead. Network share = CIFS (or NFS with my workaround) | Media Share = UPnP. –b-rad >>>

Torleif
November 18th, 2009 00:37

Thanks b-rad!
doesnt this mean that since the nfs share is going throuh a cifs share protocol that it will not benefit from the speed of nfs?

Thanks again!

Maarten
November 20th, 2009 06:43

Good work, my WD TV live is on it’s way.

Any chance of adding DVD Menu support to your FW. This is something I miss and would like to have added.

Thanks already for the good work.

<<< edit: This is not the place to ask, this is about NFS…BUT; any chance of you donating a pretty large amount to speed up my development? I am working on it, but since the feature doesn’t mean anything to me its more of a proof of concept / fun project…and is going very slow. –b-rad >>>

DasEFX
November 20th, 2009 12:58

Hi, Brad, thanks for your Custom FW is Awesome, i was wondering, is there any chance to install NZBGet and Feedtime in the WDTV Live? That would be amazing. Thanks!

<<< edit: wrong place to ask ;) but yes, eventually it’ll make its way in. –b-rad >>>

BikerMike
November 21st, 2009 12:16

Thanks for your efforts.
I sent you a little more tangeable thank-you a couple days ago.
I am preparing to try this out now.
Again,
Thanks

BikerMike
AKA William M. Donovan
Sr. Eng Technician, Eurotech USA.

<<< edit: Cheers, every bit helps ;) –b-rad >>>

BikerMike
November 24th, 2009 14:36

What about username & password?
I have 1.02.10_B-RAD.CC_WDLXTV-0.5.6.1 installed, optware & samba are all there. WDLXTV and IP address come up on the screen on boot. I got PuTTY tel accessing a USB net card connected to the WDTV.
When I try to telnet in I get a prompt asking me for a password!!!
I used the sample net config file DHCP.
Can I set a user/password there?

By the way,
you’re a genius!
Thanks, BikerMike

marc
November 27th, 2009 13:32

Hi,
i am a little confused. this my be really dumb, but i have media shares and network shares under the orginal wdtv live firmware, so why would i need to install your firmware when the wdtv live comes with network share? i have a pc running windows 7 serving the network. please explain the advantages of running your firmware using network shares…

<<< edit: If NFS doesn’t mean anything to you then this article & tip is not for you ;) –b-rad >>>

Per
December 1st, 2009 11:00

Hi and thanks for the great job you do for us WDTV Live owners.
Could you please explain a little more of the tips number 2.
I have only CIFS share on my NAS. Not using NFS at all.
How will my cifs-interceptor look like then?
Like this?
//NAS1/Sharename|

(sorry for my english ;)

<<< edit: CIFS is already officially supports, NFS is not. This is to mount NFS instead of a CIFS. –b-rad >>>

Per
December 2nd, 2009 08:56

Thanks for your reply.
When I use xmount and connect a usb memory stick in the wdtv I do not get thumbnail problems(x2). I thought that we could use this method too. I proceed with the xmount with usb memory stick method ;)

Richard
December 9th, 2009 02:01

Brad,

thanks for your efforts to accomplish this firmware.

I have discovered a serious issue with your NFS mount solution. I have lost about 300GB of HD movies yesterday. I have troubleshooted this and it seems that the /bin/dmaosd does an “rm -rf /tmp/%s/%s” if an umount of the mountpoint fails! I’ve noticed that an umount of the NFS mountpoint sometimes returnes a “device or resource busy” which implies a failed umount, the dmaosd then does an “rm -rf” of the mountpoint!!

I have now exported my NFS share read-only to avoid this issue in the future, but I wanted to let you know. Perhaps a symlink in /tmp/$filer/$mountpoint would work, the actual NFS could be mounted elsewere. I had no time yet to test this.

Richard

<<< edit: ouch, hasn’t happened to me, but I’ll see about putting in some safeguards for the next release to make sure it doesn’t happen to anyone else. –b-rad >>>

Richard
December 9th, 2009 10:54

A simple solution might be:
change: busybox mount “$NFS” “$SERVER/$mLOC”
into: busybox mount -o ro “$NFS” “$SERVER/$mLOC”
in /bin/mtSMB to enforce a read-only mount…

vi /bin/dmaosd, check line 5347 and you’ll see what I mean.

I managed to capture the rm in the process list:
# ps
PID USER VSZ STAT COMMAND

7561 root 3648 S sh -c rm “/tmp/NASBOX/mov” -rf
7562 root 3712 S rm /tmp/NASBOX/mov -rf

I noticed the rm -rf running occasionally (forked from dmaosd), very very wrong coding from the WD guys…. (they should use rmdir)

Good luck with your further development.

<<< edit: It should be smbtree doing the deleting. I’ve patched the system to prevent this from happening in the future. –b-rad >>>

morten
December 14th, 2009 11:30

Running windows 7 and have shared folders.
Copied this into a net.mounts
xmount //192.168.1.34/!Kids Kids cifs
But no videos are found. What im I doing wrong?

<<< edit: Bang (!) means something special in Linux, you can’t use it without quoting or escaping it. –b-rad >>>

morten
December 15th, 2009 02:23

Is the WD Tv Live running Linux?

<<< edit: ummmm… … … –b-rad >>>

morten
December 15th, 2009 02:26

what would my netmount be when sharing:
D:\!Kids (maybe renaming to Kids)
in shared called \\FILM\!Kids
pc´s ip: 192.168.1.34

<<< edit: Go to a forum and ask. –b-rad >>>

stefano
December 18th, 2009 01:28

Ciao,
thanks a lot for your great hints.
I’m not an expert user, but I did still buy the WDTVLIVE. I have no linux but just windows. How can I move on?

thanks

ste

+ts

<<< edit: by either visiting a forum or buying a book on Linux. –b-rad >>>

Matthew
December 22nd, 2009 08:05

B-rad ur da man! this shiz rocks the boat….I mean whoa, dd-wrt makes a 30 buck router become a 200 dolla holla, and ur piece of work makes the wdtv a million dolla jem! WDC shud hire yur ass for ALL dev work.\\

k, so my q is – u know in xBMC how there are buffers (local disk) how can I (you/we) create the same so that network traffic can be cached onto an attached drive during playback…this could solve a lot of playback issues ppl see when using the wdtv-live via a wireless network…k – gonna go play with deluge!!! now I am ro king!

thanks buddd — merry xmas – and you shud see some paypal from me shortly

Matt

<<< edit: Theres already a lot of caching that goes on. –b-rad >>>

mark
December 26th, 2009 12:52

I can’t get NFS or CIFs to work automatically after a reboot, if I run sh ./conf/net.mounts it will work fine until the next reboot.

xmount //192.168.1.250/Videos hsvideos cifs
xmount 192.168.1.250:/Videos nfsvideos nfs

Thanks

Chris
December 30th, 2009 12:40

b-rad

Thanks for the above and beyond support of your custom firmware. I have a WDTV-Live now and it has been working pretty flawlessly via Network share from my home pc. The issue I am having is that the thumbnails, folder-nails etc do not work as one would think, yet according to WD it is working as designed, because when you go into the folder you see the movie mkv with thumbnail and the .jpg file (so duplicate icons, of course of which only can be played).

My question is that if I use your custom firmware and mount the network share, should this fix the thumbnail issue? I honestly do not think I will use the other features of your firmware besides making small edits to the config files but this one fix would be huge to me and my kidos.

Thanks

<<< edit: With WDLXTV-Live you can mount your network shares under the local folders area where they’ll be visible as long as you also have a device plugged in. This will workaround the duplicate thumb issue. Search wdtvforum.com for net.mounts or refer to the README. –b-rad >>>

daskino
January 2nd, 2010 07:47

when u use the CIFS converter to mount a NFS share on the WDTV Live, does it no mean that you also only get CFIS “speed” on the streaming of movies to the WDTV LIVE? It has been shown many places that the NFS to NFS is much faster than CFIS sahres, dont you loose that speed gain that you had on the Org. WDTv HD when you use a CIFS converter on the Live version?

BJ
January 3rd, 2010 22:42

Had this working, then changed routers with new IP address, and can’t get it going again. With interceptor ON, it will take me to the NFS shares folder, but it doesn’t show any media.

Is the interceptor a temp fix, or should I keep trying as this will be the only way to get NFS?

Thank you for your efforts with this and the original WDTV.

<<< edit: cifs-interceptor is the only way you’ll see NFS in the network shares area. You can use net.mounts to see NFS in the local folders area. –b-rad >>>

Awaaug
January 31st, 2010 18:52

I see a lot of reference to Telnet to the WDTV after patching to fix things but, what is the user ID and PW to use to get to the box.

<<< edit: root/blank –b-rad >>>

February 6th, 2010 00:14

Hey

I just installed 0345.
I must say I like the background.

Now for my issue.
My WDTVLIVE refuses to use dhcp (it simply fails after a while – afaik, it used to fail that before too, which is strange, since all other network devices use dhcp just fine) and when I set the ip manually, the setting isn’t saved! It says so, but when checking in system information it isn’t saved (0.0.0.0 in all places).

Can I set the network info in a file on the usb or am I simply doing something wrong? Until I have a working ip I can’t telnet into the wdtv and check if there are any complaints.

Please advise.
/Kim
NoSubstitute (on the forum)

February 6th, 2010 00:29

Excuse me for being an iiidit (spelling intended).
After flashing the wdtvl I had forgoten to re-attach the tp-cable. Sorry.

February 6th, 2010 02:46

Mounted NFS as “Local USB disks” for now. Worked just fine. Will maybe try the interceptor another day.

Great work, b-rad!

Kelad
February 14th, 2010 21:49

Mounting NFS as ‘local usb’ works a treat as does the cifs-interceptor (v. clever !). One question relates to inside File Management. I would like to be able to copy media from a usb stick to the ‘Mounted NFS local drive’ (i.e copying from usb stick to my networked NAS). The mounted NFS local drive shows up a SOURCE and i could copy from it, but it does not show up as a DESTINATION (only USB1 and USB2 do). Is this more a question fro the forum? Regards & Thanks, kelad.

cippa
February 16th, 2010 03:09

it is possible to use CIFSINTERCEPTOR to mount ftp? how?

Andrea
February 17th, 2010 14:58

Hi b-rad. Thaks for your work. I have a question. With the last official wdtv live firmware (1.01.24) windows network share (Video -> Network shares) works without problems. With your last firmware (1.01.24_B-RAD.CC_WDLXTV_LIVE-0.4.0.0) it doesn’t work. The only way to see a windows shared folder is adding an xmount in the net.mounts file. But so, the share is seen in “Local drives”. Is only a my problem? Is it possible accessing my windows network share by “Video -> Network shares” with your firmware?

Thank in advace, Andrea

<<< edit: noones reported a problem like that, on the contrary more windows people have told me it works this time around. There really isn’t much of anything I do to affect how the ‘network shares’ acts, I had changed the windows resolve order in previous versions–but that is what I change back like the official version in 0.4.0.0. If you’d like to try a different resolve order, telnet/ssh in and execute: config_tool -c SMB_RESOLVEORDER='lmhosts host wins bcast' then wait 30s & unplug & replug in your wdtv live. –b-rad >>>

gigio
February 18th, 2010 10:46

the tip2 is not very clear for me.

What does it mean whit: “The shares we are mounting instead of the intercepted CIFS do not necessarily have to be NFS, they could just as easily be CIFS or anything else.”

anything else what?
also means ftp/ftps – ssh/sshfs?

or for ftpfs, sshfs there is always need to have a USB device inserted?

<<< edit: Ask on the wdlxtv forums. –b-rad >>>

Andrea
February 18th, 2010 15:06

Hi b-rad. I have a news. executing config_tool -c SMB_RESOLVEORDER=’bcast lmhosts wins host’ it’s works fine. But still remain the problem with youtube. “Any content”. Any tips?

Thanks

<<< edit: its been reported that some people have to flash to official fw 1.01.24, then reset settings to default, then flash 0.4.0.0 to get youtube to work. Consult the forum for further assistance. –b-rad >>>

February 20th, 2010 21:57

Hi B-Rad

I have no clue on how to setup NFS Mounts, i dont understand ssor samba anyway someone can dumb it down for me?

<<< edit: Not me ;) Google and the forums will be your best bet. –b-rad >>>

under
March 3rd, 2010 06:01

can we pass command params in cifsinterceptor to configure the nfs mount? like tcp,rsize=32768,wsize=32768? where? cifsinterceptor seems to support only address and label.

<<< edit: first paramter = address, second parameter = label, third paramter = options. –b-rad >>>

knate
March 10th, 2010 15:52

Hi B-RAD,

first of all great work!

Now to my problem. At first I configured cifs-interceptor with Firmare 3.4x and it worked fine. After an upgrade to a newer Version it didn’t worked. So I thought in the next Versions it will be fixed but I it doesn’t work with Version 0.4.1.7.

Some days ago I tried to connet the samba server while I was using Lilibabe theme and it worked?

I didn’t change anything in my configs of the samba server. I’m using a Debian Squeeze for the Samba, NFS and CIFS stuff. Are there any known bugs?

Greetz

knate

<<< edit: I’ve never encountered a bug, its a simple mount swap. debug further if needed on the wdlxtv forums. –b-rad >>>

Achim
April 8th, 2010 02:06

first paramter = address, second parameter = label, third paramter = options. –b-rad

@b-rad: Can you be a little more specific?

Will something like this work:
//192.168.1.101/Fotos|192.168.1.101:/Filme Filme nfs tcp,rsize=32768,wsize=32768|

Regards, Alex.

<<< edit: Ask on the wdlxtv forums and I’ll clarify it there. –b-rad >>>

craig
April 15th, 2010 11:50

Can the CIFS share that gets intercepted be just a share on a windows box?

<<< edit: Thats what CIFS is ;) –b-rad >>>

craig
April 18th, 2010 06:16

Thanks b-rad! I figured the CIFS share could be hosted on a windows box. Unfortunately I can’t get the cifs-interceptor to work using HaneWin NFS Server 1.1.68 on Window 7 Enterprise.

This worked falwlessly for me when I was using SAMBA on Ubuntu so maybe an issue with HaneWin? Oddly enough I can mount the NFS shares exported by HaneWin using net.mounts, but then I am stuck having a USB thumb drive attached.

Any suggestions to help troubleshoot?

<<< edit: Yes, the home brew forums. –b-rad >>>

*Name
*Mail
Website
Comment