PDA

View Full Version : Guide to accessing NFS Share


daemon666
January 19th, 2009, 06:03 PM
Hi,

I have been struggling to getting a NFS share from my QNAP Nas mounted on my Apple TV.

I have tried to transfer mount_nfs to the apple tv and change permissions with chmod, but still I am unable to finally mounting it.

This thread will hopefully end up with a complete guide to NFS mounting on the Apple TV for people with a ATV Take 2 out of box model.

A couple of useful links

http://wiki.awkwardtv.org/wiki/index.php?title=Mount_a_Remote_Drive_via_NFS

http://xbmc.org/forum/showthread.php?t=41287&page=2

Any one? :)

skorch
January 19th, 2009, 06:07 PM
Good luck man! I don't have the time to tinker too much so I hope you succeed and pass on the knowledge.

daemon666
January 20th, 2009, 08:19 AM
The Guide:

Mounting the shares manually
Get the intel combo update from here:

http://support.apple.com/downloads/Mac_OS_X_10_4_9_Combo_Update__Intel_

Using MagicISO open the .dmg and extract Archive.pax.gz from the MacOSXUpdCombo10.4.9Intel.pkg/Contents folder

Open Archive.pax.gz with WinRAR and extract the mount_nfs file.

Open a SSH connection and copy mount_nfs to the ~/frontrow folder. Using putty log on to apple.local and browse to the frontrow folder

/mnt/Scratch/Users/frontrow or something like that.

issue the following

sudo cp mount_nfs /sbin/

sudo chmod 775 /sbin/mount_nfs

Now you can mount using the following command:

sudo mount_nfs -P 192.168.1.36:/Public /mnt/Scratch/Users/frontrow/QNAP

Make sure that you created the folder you are mounting to, in this example QNAP

The -P is what makes the permission denied error go away, something with different ways to handle nfs by bsd and linux...I dont know the details.

Make the shares mount each time you boot the ATV

Copy the rc.local to your local machine, edit it with a unix capable editor, that is not notepad! Add a pause 60, you might not need the 60 seconds, but I put them to ensure that my wireless connection was established before issuing the mount commands. Then add as many as you like of the mount commands:


sudo mount_nfs -P 192.168.1.36:/Public /mnt/Scratch/Users/frontrow/QNAP/Public

Copy the new rc.local to the ~/frontrow folder. From the frontrow folder issue the following commands:

sudo mv /etc/rc.local /etc/rc.old
sudo cp rc.local /etc/rc.local

Next time you start up your apple tv it should mount your shares automatically.

Hope it works.

skorch
January 20th, 2009, 04:39 PM
Great! I'll give it a try this weekend.

pilkster
January 20th, 2009, 09:06 PM
Great guide.

If I understand correctly I can use this to mount (for example) a folder from a windows PC on my network to the ATV. Can you confirm that this folder will be indexed by boxee and that the content should be recognised? I'm having problems with boxee recognising content on network shared folders. Will the ATV or boxee have a problem if the folder is unavailable at boot (if I don't have the PC switched on?)

Thanks :)

daemon666
January 21st, 2009, 09:41 PM
If I understand correctly I can use this to mount (for example) a folder from a windows PC on my network to the ATV.

No, Windows uses SMB (Samba) shares. However if you extract the mount_smbfs and give it the same chmod command as the mount_nfs got you should be able to mount a SMB as well. You probably do not need the -P in the mount command.


Can you confirm that this folder will be indexed by boxee and that the content should be recognised?

I dont see any indexing performance problems compared to using a simple unmounted SMB share through Boxee. Generally speaking the indexing works OK for me.


Will the ATV or boxee have a problem if the folder is unavailable at boot (if I don't have the PC switched on?)

My experience is that the contents of the database is actually not deleted if Boxee is started without network access. I thing Boxee scans all the Media Sources when it starts. This scan seems to be much faster with NFS mounts compared to SMB through Boxee.

/Anders

skorch
January 24th, 2009, 12:59 PM
Got it working! Great guide! Thanks a bunch.

For those who are using a mac, and find they can't get the Archive.pax.gz to extract properly, try this command:
pax -r -z -f Archive.pax.gz

The only issue is that Boxee isn't scanning the mount points I've created. I'll continue to play around...

Update: It might have just been taking a long time to re-index... In the end I just mounted it to the Movies folder in the ~frontrow folder, but I'll probably point it to another folder so nothing else interferes with the mounting (you can't mount if there's something in the folder) - then add a new local source.

I can confirm that NFS is _much_ better than the built-in SMB. For one, I can boot right into boxee when the ATV loads. Secondly, the files which I had encoded with Handbrake, which were stuttering, work flawlessly now. It's quicker to buffer... all and all, it kicks butt!

duckmanjbr
February 25th, 2010, 03:42 PM
I know this is an old thread but it seemed like the best place to match a post....

Does anyone know if the latest AppleTV 3.0.2 w/ Boxee Beta kills the rc.local? I didn't have a /etc/rc.local so I created it. Permissions are correct per the etc dir and my rc.local looks like so:


pause 60

sudo mount_nfs -P <IP_Address>:/<NFS_Share /mnt/Scratch/Users/frontrow/Movies

sudo mount_nfs -P <IP_Address>:/<NFS_Share /mnt/Scratch/Users/frontrow/Music


Problem is that it doesn't automount on reboot. The commands both work 100% if I do it by hand. I can't find any errors in any /var/log/ that can start pointing me in the right direction.

Any insight?

Brian
July 15th, 2010, 08:22 PM
I know this is an old thread but it seemed like the best place to match a post....

Does anyone know if the latest AppleTV 3.0.2 w/ Boxee Beta kills the rc.local? I didn't have a /etc/rc.local so I created it. Permissions are correct per the etc dir and my rc.local looks like so:


pause 60

sudo mount_nfs -P <IP_Address>:/<NFS_Share /mnt/Scratch/Users/frontrow/Movies

sudo mount_nfs -P <IP_Address>:/<NFS_Share /mnt/Scratch/Users/frontrow/Music


Problem is that it doesn't automount on reboot. The commands both work 100% if I do it by hand. I can't find any errors in any /var/log/ that can start pointing me in the right direction.

Any insight?


use autofs.......


I've been using NFSv3 with Boxee from the beginning (Linux). I just switched over to NFSv4 with Kerberos Authentication with EXT4 ACLs. I love it. Incredibly fast and secure.

Always use autofs. If attempting NFS4 with KRB5, I have a nice python script I put together that automatically renews the TGT and service principal tickets--if you're interested.

-Brian

jonyroger
July 20th, 2010, 05:06 AM
These thread is really informative. This thread will hopefully end up with a complete guide to NFS mounting on the Apple TV for people with a ATV Take 2 out of box model.