Mount a Remote Drive via AFP

From AwkwardTV
Revision as of 15:26, 13 September 2007 by PycWra (talk | contribs)
Jump to: navigation, search

centro benessere sicilia troie giapponesi tutto su eros ramazotti www video game it intel pentium 4 640 calendario casalinghe genova www charming italia it cyborg mares la ragazza in vetrina il diamante del re foto guernica www zex69 com stone island spiaggia cavalliere scanner epson perfection 2580 photo van de sfross spartiti the king of the golden hall www melissap net vacanza edoardo vianello testi canzoni evanescens samsung mp3 gb sony sdms95as i cacciatori del lago dargento promo brasil filtri lavatrice www ilmuro it nike tennis citycourt morellato cuore vacanze italia emilia video porno de michelvieth remote control bob cha fantastica storia e la vita testo canzone my band valered traigo una rosa quadro agp uan su 1 000 000 giacca militare gli aironi neri testo di vertigo cristina davena www e familybnl it supalova club joe t vannelli david bowil lettiera gatti two small wings lewiscounty com trasporti adr tesine gratis tanz den herakles www ci sarai it vertigo u2 midi hillsong lyrics ventagli videoclips musicali porno valkyrie nuove immagini da killzone www cittadifavara it belinea crt acquisizione video takethat videos de erre way lc alimentatore visitare la toscana www zozzone it www universita it memphis cose fare tre colori rosso cucinotto da campeggio sprint ringtones ephedrine talking ringtones cheap clomid cool ringtones lg ringtones online sibutramine norco online cheap lipitor motorola ringtones order synthroid cheap ortho cheap flonase klonopin online cheap ambien cheap flagyl free punk ringtones cheap diethylpropion free audiovox ringtones cheap celebrex valtrex online cheap celebrex wwe ringtones ephedra online southwestairlines norvasc online zyban online phentermine free cheap ringtones used bmw auto cheap wellbutrin cheap sibutramine order bontril pharmacy online clonazepam cyclobenzaprine online phendimetrazine online cheap clomid cheap amitriptyline cheap levitra humour ringtones cheap zocor cool ringtones cheap alprazolam free nokia ringtones cheap albuterol zocor online cheap ambien free love ringtones cipro adipex online cheap ultram but diovan christian ringtones tv ringtones free cellphone ringtones free alltel ringtones free cellphone ringtones metal ringtones buy adipex ritalin online amoxicillin online norvasc online music ringtones buy darvon free lg ringtones celebrex online venlafaxine online cheap zovirax alcatel ringtones You must be logged into the Apple TV via SSH and have AppleTV software version 1.0 After the ATV 1.1 upgrade mount_afp is no longer working. (But it can be re-enabled - see Mount a Remote Drive via AFP under 1.1)

1. Enable Personal File Sharing on the network machine you wish to access.

2. From the ssh prompt on the Apple TV, create a folder to mount the share, such as: mkdir /Users/frontrow/afp

3. Mount the share while still at the Apple TV ssh prompt. Here's the command I used:

 mount_afp -i afp://joey-imac/Macintosh\ HD /Users/frontrow/afp

"joey-imac" is the name of the machine on my network

"Macintosh HD" is the drive I want to mount (notice you need the \ to escape sequence the space

"/Users/frontrow/afp" is the mountpoint on the Apple TV

You will get a strange errors such as the following:

 mount_afp: the mount flags are 0000 the altflags are 0020
 /mach: No such file or directory
 Can't open /mach for reading - No such file or directory
 kextload: can't map module files
 kextload: can't check load addresses of modules
 kextload: a link/load errtouch or occured for kernel extension /System/Library/Filesystems/AppleShare/asp_tcp.kext
 /mach: No such file or directory
 Can't open /mach for reading - No such file or directory
 kextload: can't map module files
 kextload: can't check load addresses of modules
 kextload: a link/load error occured for kernel extension /System/Library/Filesystems/AppleShare/afpfs.kext

However, you can change to the directory of the mountpoint (e.g. /Users/frontrow/afp) and access files on the remote machine!

If you boot up with / mounted RW automatically (as in Mount ReadWrite) it will generate the /mach.sym file, which will fix the kext loading issues. If you then make it boot RO by default, it will not delete the /mach.sym file.


You can also mount drives by putting your ID and password into the command:

mount_afp  afp://myusername:mypassword@192.168.0.2/nixon ~frontrow/Movies/nixon
mount_afp  afp://myusername:mypassword@192.168.0.2/Silver ~frontrow/Movies/silver

Will mount my main and external drives under the Movies folder where ATVFIles will find it.

Obviously enter your own ID and password on your machine which has all the files. Nixon is the name of my computer's main hard disk, and silver the external. For some unknown reason the AppleTV seems to have problems with mountpoints with capital letters in them, so make sure you give your mount point a lower case name (i.e. silver not SIlver)

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

sudo echo "mount_afp  afp://barry:mypasword@192.168.0.2/nixon ~frontrow/Movies/nixon">>/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  afp://barry:mypasword@192.168.0.2/nixon ~frontrow/Movies/nixon">>/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