Enable NFS Server

From AwkwardTV
Revision as of 20:27, 6 December 2007 by Medius (talk | contribs) (Set up your appletv to act as a NFS server.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

AppleTV 1.0 software (Or Safe Update 1.1)

  • First we have to setup up the export: To do this we use the nicl command. (the netinfo command line utility) Since netinfo uses the / to separate path components, and we have / characters in the entry we want to create, those / have to be escaped. This is done with the backslash, \, and since we are running in a shell, we need to double them up. After the shell is done examining the command, the string \\/ becomes \/ which is what we need to pass to nicl.
sudo nicl . -create /exports/\\/mnt\\/Scratch\\/Users\\/frontrow

This will create an export for the frontrow users directory. We need to use the /mnt/Scratch/Users/frontrow path instead of /Users/frontrow because /Users/frontrow is actually a link which NFS doesn't like.

  • We can list all of the current exports on your appletv with:
sudo niutil -list . /exports

In our example that should result in something like:

89       /mnt/Scratch/Users/frontrow
  • If we wanted to delete this export we would do this (example):
sudo nicl . -delete /exports/\\/mnt\\/Scratch\\/Users\\/frontrow
  • Once we have our exports set up to our liking we need to start the mountd daemon and the NFS daemon. We would also have to start portmap, but it is already running on the appletv.
sudo /usr/sbin/mountd
sudo /sbin/nfsd -t -u -n 6

These commands start the mount daemon as well as the nfs daemon. The command arguments to nfsd just mean, enable TCP, enable UDP, and start with 6 threads.



AppleTV 1.1 software

  • I have not tested this.