[AppleTV2] NFS on Apple TV 2?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Memphiz Offline
Team-Kodi Developer
Posts: 10,794
Joined: Feb 2011
Reputation: 113
Location: germany
Post: #166
atvtwo Wrote:Regarding my setup, i'm trying to use my Macbook Pro w/ Snow Leopard as "media server". Streaming movies from a shared folder on the Mac via NFS to my ATV2 thats using XBMC.

What i found odd is that when setting up the share on my ATV2 using zeroconf the path is kinda urlencoded, i.e. all the slashes etc are shown with %20, %40 etc. This does not happen when setting up SMB using zeroconf (is there any difference btw setting up SMB using zeroconf or SMB?).

I'm wondering if this could be a permission issues but i've doubled-checked the folder on my Mac i'm trying to access from the ATV2 and it has read/write permission for everybody so shoudnt be a prob me thinks.

Its really odd, since i can see the the shared folder with correct remote path on the ATV2 but when clicking on it, it doesnt change into the folder to show its content. Would XBMC ask me for username / password to login into the NFS or does this happen automatically as with SMB?

Read the link i've posted for setting up the NFS server on snow leopard. Did you do everything stated there (especially the -N edit of the plist)? Also there is no username and password for NFS. It uses another authentication principal based on user ids.

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
prophetizer Offline
Senior Member
Posts: 283
Joined: Sep 2008
Reputation: 2
Post: #167
just use NFS Manager, it's easy

--
[Image: watched-clearlogo.jpg]
find quote
Kiskakas Offline
Junior Member
Posts: 7
Joined: Sep 2011
Reputation: 0
Post: #168
I was not able to find any concrete help regarding to this, so I thought it will be useful if I share my experience with all of you. Since in FreeNAS 8 you don’t have the possibility to adjust rc.conf from the WebUI like in FreeNAS 7, you need to add those extra lines manually to rc.conf that are described on the NFS wiki page (http://wiki.xbmc.org/index.php?title=Net...om_FreeNAS).

So let’s see it step by step:
1, ssh into your FreeNAS 8 server as a root

2, Execute: mount -wu /

3, Add the following lines to rc.conf (/conf/base/etc/rc.conf):
mountd_flags="-n"
nfs_reserved_port_only="NO"
nfs_server_flags="-u -t -n 4"

You can do it by using the “vi” editor or simply copy a prepared rc.conf file after FTP-ing to FreeNAS as a root

4, Execute: mount -ru /

5, Reboot

6, Add your nfs share as a mediasource manually from XBMC and then select your folder(s) as source.



It worked for me and I hope it will work for others as well. Of course I don’t take any responsibility if you ruin your system, so be careful.
find quote
JosephAE Offline
Junior Member
Posts: 5
Joined: Apr 2011
Reputation: 0
Post: #169
I am setting up NFS between my ATV2 and my NAS. Looking at the /etc/exports file on my NAS. I see the following configuration for the /home export:

# more exports
"/homes" *(insecure,insecure_locks,rw,sync)

# exportfs –v
/c/home <world>(rw,wdelay,insecure,root_squash,no_subtree_check,insecure_locks)


My question is how do I share my NAS with my ATV2 but not share my NAS with the world (“*”)?

Do I replace the “*” with the IP address of my ATV2 which is now 196.168.8.103 or maybe use 196.168.8.1* because this IP is constantly changing. Or is there a better approach using the UID and GID of my ATV2 which I believe is uid=501 and gid =501. And then what would this NFS command line look like in the /etc/exports file?

Thanks for all your help.
find quote
JosephAE Offline
Junior Member
Posts: 5
Joined: Apr 2011
Reputation: 0
Post: #170
Edit:
Would the easiest solution be to assign a static IP to the ATV2, something like 192.168.1.201 and then use this IP address in place of the “*” above on the NAS side?

If I should go this route do I assign a static IP on the ATV2 by going to Settings => General => Network or do I ssh into the ATV2 and set something is a file?

Thanks
find quote
Memphiz Offline
Team-Kodi Developer
Posts: 10,794
Joined: Feb 2011
Reputation: 113
Location: germany
Post: #171
JosephAE Wrote:Edit:
Would the easiest solution be to assign a static IP to the ATV2, something like 192.168.1.201 and then use this IP address in place of the “*” above on the NAS side?

If I should go this route do I assign a static IP on the ATV2 by going to Settings => General => Network or do I ssh into the ATV2 and set something is a file?

Thanks

You would do it in the Settings->General->Network ... or you could use 192.168.1.0/24 for the whole subnet ...

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
JosephAE Offline
Junior Member
Posts: 5
Joined: Apr 2011
Reputation: 0
Post: #172
If I understand how everything works. I would solve my problem this ways.

On the ATV2 go to Settings->General->Network and change the IP to 192.168.1.201 (Are there any other settings for like sub-address etc.)
Then change my NAS /home export file to match so it would look like this:

# more exports
"/homes" 196.168.1.201(insecure,insecure_locks,rw,sync)

… and that should do it.


How would I use 192.168.1.0/24 for the whole subnet and what would be the benefit? Would this change be on the ATV2 side and is this a better approach?
find quote
darkscout Offline
Posting Freak
Posts: 2,145
Joined: Jul 2008
Reputation: 12
Post: #173
How paranoid are you of people breaking into your home network with a Unix machine, setting their UID/GID to 501 and deleting your files?

[Image: aeKO.jpeg]
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
find quote
Memphiz Offline
Team-Kodi Developer
Posts: 10,794
Joined: Feb 2011
Reputation: 113
Location: germany
Post: #174
JosephAE Wrote:How would I use 192.168.1.0/24 for the whole subnet and what would be the benefit? Would this change be on the ATV2 side and is this a better approach?

on server side

Code:
"/homes" 196.168.1.0/24(insecure,insecure_locks,rw,sync)

and atv2 (or any other client) could have any ip from 196.168.1.1 to 196.168.1.254 then ...

beside that - what darkscout said ...

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
(This post was last modified: 2011-10-27 20:35 by Memphiz.)
find quote
slowpoke Offline
Junior Member
Posts: 4
Joined: Nov 2011
Reputation: 0
Post: #175
I have the same problem as a couple of users posted in a few posts above.

I run ATV2 and have a QNAP NAS to serve content. I followed the wiki (big thanks!! btw) on the QNAP section.

My XBMC on ATV2 is just the stable build installed 2 days ago (not nightly... I am not adventurous nor do I know how to update to nightly). I am looking to the NFS route in hope to solve my HD stutter / buffering problem over SMB.

I am finally able to add the source without error via the XBMC gui. I can see all the directories under the mount point. When I try to nav into the directories, by highlighting one and press OK, it just jumps to the next directory and keeps going around the list. It will not enter any directory.

I re read this whole thread and the wiki, a couple of things...

1) I used the setting in the wiki, but I was not able to connect at all -- GUI gives connection error, so I changed no_root_squash -> all_squash. This allows me to get to where I am today, see the directory listing under the mount point.

which leads to:

2) QNAP does not have user 'nobody'. So the all_squash option which cause the access to default to 'nobody' won't work but I am able to connect and see a list of directories.

3) the default /etc/exports has no_root_squash. What UID does that translate to?

4) It just so happens, the first user I created on the NAS is for my self which has almost admin like privs (almost everything rw including the content I would like to mount on xbmc) is UID 501, matching the mobile user UID.

Does this mean I can take out all_squash completely?

Sorry, this whole streamer thing is new to me.

thanks
find quote
darkscout Offline
Posting Freak
Posts: 2,145
Joined: Jul 2008
Reputation: 12
Post: #176
slowpoke Wrote:My XBMC on ATV2 is just the stable build installed 2 days ago (not nightly... I am not adventurous nor do I know how to update to nightly).

Well there's your problem.

[Image: aeKO.jpeg]
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 20,241
Joined: Jan 2011
Reputation: 253
Location: Arizona, USA
Post: #177
slowpoke, there is no "stable build". The repo version you downloaded is pretty much the same thing as a realllllly old nightly build. Update to the latest nightly builds if you want help.
find quote
jamie1984 Offline
Junior Member
Posts: 27
Joined: Jun 2009
Reputation: 0
Location: North Yorkshire, England - UK
Post: #178
Kiskakas Wrote:I was not able to find any concrete help regarding to this, so I thought it will be useful if I share my experience with all of you. Since in FreeNAS 8 you don’t have the possibility to adjust rc.conf from the WebUI like in FreeNAS 7, you need to add those extra lines manually to rc.conf that are described on the NFS wiki page (http://wiki.xbmc.org/index.php?title=Net...om_FreeNAS).

So let’s see it step by step:
1, ssh into your FreeNAS 8 server as a root

2, Execute: mount -wu /

3, Add the following lines to rc.conf (/conf/base/etc/rc.conf):
mountd_flags="-n"
nfs_reserved_port_only="NO"
nfs_server_flags="-u -t -n 4"

You can do it by using the “vi” editor or simply copy a prepared rc.conf file after FTP-ing to FreeNAS as a root

4, Execute: mount -ru /

5, Reboot

6, Add your nfs share as a mediasource manually from XBMC and then select your folder(s) as source.



It worked for me and I hope it will work for others as well. Of course I don’t take any responsibility if you ruin your system, so be careful.

Excellent, I was having issues mounting a freenas v7 NFS share from XBMC. After reading your post I add the values suggested to the rc.conf directly from the System>Advanced menu, rebooted and it worked =)

[url=http://imagebin.org/200735]
http://imagebin.org/200735[/url]

----------------------------------------------------------------------------------------------------------
=)
----------------------------------------------------------------------------------------------------------
find quote
Post Reply