Mount a Remote Drive via NFS

From AwkwardTV
Revision as of 12:45, 21 June 2007 by Dhausman (talk | contribs)
Jump to: navigation, search

Mounting NFS shares on APTV works "out of the box"

First you will want to make a mount point under /mnt for example:

sudo mkdir /mnt/remoteshare


After the AppleTv 1.1 upgrade you will need to copy /sbin/mount_nfs to your AppleTv and put it in /sbin/ otherwise if you are using AppleTv software version 1.0 skip this step

now mount the share using 'mount'

sudo mount_nfs ipaddress:/share /mnt/remoteshare/

You may have to add the insecure option to the export on the nfs server. e.g.:

/data/video appletv(rw,async,insecure)


You might want to try adding this to your rc.local file to make it happen every time you reboot. So:

sudo echo "mount_nfs  ipaddress:/share /mnt/remoteshare/">>/etc/rc.local

that adds the first line to the end of the rc.local file which is run everytime the system boots.

For some reason this doesn't always work and in some cases the rc.local file doesn't exist. A way around it is to use su. su is a rather dangerous command as it effectively allows you to log in as root so use it wisely!

Copy /usr/bin/su from your local OS X installation to the same location on the AppleTV.

Then issue these commands

sudo su -

touch /etc/rc.local

echo "mount_afp  ipaddress:/share /mnt/remoteshare/">>/etc/rc.local

This will log you on as root, create the file (only if it doesn't exist), add the changes to it. You can then check the changes have been made by typing:

cat /etc/rc.local

and checking the last line in the file.

Once you're happy, issue this simple command to exit the root shell:

exit