USB patch released. HALLELUJAH!

by editor @ AppleTVHacks.net on July 28, 2007

After numerous delays, we present you the USB patch that you guys have been waiting for. You can find the link to the patch at the bottom of this blog entry.

Just a recap for those who are not familiar with this. A few months back, AppleTVHacks.net and FatWallet set up a bounty looking for a way to use an external USB drive as a primary storage for the Apple TV. The patch must still allow the Apple TV to boot from its internal hard drive but only use the external USB drive as its primary storage.

First of all, our team would like to thank Patrick Walton of University of Chicago for sending us the original entry. We certainly appreciate his effort; it was a quite an achievement. Unfortunately, syncing did not work. By the time we realized the problem, Patrick was already too busy to fix his code.

Fortunately, Tom Anthony, our resident geek, was able to pick up where Patrick left off and fixed the syncing problem that the original patch had.

We would also like to thank Turbo for spending the time to test out the patch.

Instructions

The patch was written for and, therefore, tested on Apple TV software version 1.0. If you have 1.1, the patch might not work. Please let us know if you can get the patch to work on 1.1.

What you need:

  • An ssh-enabled Apple TV. If you don’t have that enabled yet, you can refer to this post to get it enabled. For instructions on how to enable ssh without opening the case, refer to this wiki page.
  • An Intel-Mac or Intel-based *nix. This is needed to run the script to patch the kernel on the Apple TV remotely. It maybe possible to run the install script under Windows using cygwin. However, we have not tried this.
  • An installed version of Mac OS X 10.4 Intel. Or a full copy of the contents of the “/System/Library/Extensions” folder from one.
  • An original, unmodified copy of the ‘mach_kernel.prelink’ file from the Apple TV. If the kernel on your Apple TV has not been modified yet, you can just tell the script to get it from there. Otherwise, you can obtain the file from Apple TV Software 1.1 update available here.
  • An external USB drive formatted using “Journaled HFS+” with the Apple Parition Map option (which is the default). This is the format the Apple TV expects.

The Procedure

  • Once you have all of the above, extract the zip file and READ THE README file. In it, you’ll find the instructions on how to run the script and what to do get the USB drive to work.
  • IMPORTANT: Please please please please back up the content of your Apple TV first before running the patch script. If there is one important step in performing the patch, it is BACKING UP your Apple TV.
  • Once you have your Apple TV backed up, run the script “install-atvrhd.sh” and follow the instructions. This process should take you less than 5 minutes. Once the kernel on your Apple TV is patched, the device will reboot.

Using it

  • Turn on the Apple TV without the USB drive inserted.
  • Wait for the intro sequence (flying TV screens, etc.) and insert the USB drive then.
  • Once inserted, the content of the internal hard drive will be copied to the external hard drive. This process can take a very long time. To remedy this, we recommend that you erase the content of your internal hard drive first so that there is no need to copy the content.
  • The Apple TV will restart automatically after the content is copied.
  • At this point, your Apple TV will use the external drive as its primary storage.

Uninstall

Under Unix or Intel Mac, use “uninstall-atvrhd.sh” to uninstall the patch. It should undo the changes – however, if you get really stuck, use the “Factory Restore” feature on your Apple TV.
Support

If you would like discuss about this patch (problems, praises, etc.), please use AppleTVSource.com’s Forums page for that.

And lastly

AppleTVHacks.net team would like to thank FatWallet for sponsoring this bounty and for their patience. Without them, this would not be possible.

We would also like to apologize to the community for delaying the release of this patch. We never thought that it would take this long. We know that many of you were dissatisfied (to put it lightly) with the progress. Many unforeseen events happened that resulted in the delay. Please accept our sincere apology.

Good luck experimenting with it. And, remember, BACKUP!

USB Patch

Share and Enjoy:
  • Digg
  • del.icio.us
  • StumbleUpon
  • Facebook
  • MySpace
  • Technorati
  • Google Bookmarks
  • Fark
  • Furl
  • LinkedIn
  • Live
  • Meneame
  • NewsVine
  • Ping.fm
  • Propeller
  • Reddit
  • Slashdot
  • Tumblr
  • TwitThis
  • Wikio
  • Yahoo! Buzz
  • Well after trying multiple times and getting stuck at the Apple startup, i found that if you format the drive as Extended and not Extended (journaled) it works.
    I hope this saves someone some frustration.
  • dalia
    do i need to download boxww or xbmc first on my mac before make the patchstick?
  • Can someone post a comment with a list of supported Apple TV versions? I have 2.1, and I don't know if this works with it because this article was made when 1.x was used.
  • faroz06
    Can someone post a comment with a list of supported Apple TV versions? I have 2.1, and I don't know if this works with it because this article was made when 1.x was used.
  • faroz06
    What versions does this support?
    I have 2.1 (because 3.0 stinks).
    Can someone post a list of the supported versions?
  • telefon_dinleme
    Isn't the Apple TV already backed up, since it *has* to be tied to an iTunes library in the first place? Backing it up seems a bit redundant and almost confusing, since it isn't entirely clear how to actually back one up given the fact that it can't be plugged in like an iPod to copy content from.
  • Hello,

    is it now also possible to run the appletv with external usb drive as fileserver? Can i access the external harddrive via NFS or SAMBA or CIFS?
  • does this work with 2.2 software update?
  • wants an apple tv
    does this work with 2.2 software update?
  • Philzmac
    i cant get that new script to work i deleted the old script and pasted in the new one but it saying this document can no longer be saved using its original western (mac os Roman) encoding please choose another , i tryed it with utf-8 and a few other but when you save it and try and run it opens terminal just doesnt run the script can anybody help
  • Does anyone already know whether there is a valida patchstick available for the 1.1 version?
  • does anyone know if all this works for apple tv take 2?
  • yes,you did well job.
  • Do you have a detailed how to guide for non-geeks. I have installed the atv-usb creator software for ssh and boxee/xmbc. That works great. I just get not seem to get the USB drive to work.

    Thanks
  • roulette system
  • docf
    I´m also interested to plug my USB harddrive to my upgradet appletv.
    Please post if the old steps work
    Thanks
  • dr4m4
    I have a new apple TV. It's been upgraded to 2.2. i've patchsticked it.. to get boxee and xbmc on it.
    Which works great.
    But.. now i want external USB storage enabled..
    Do the old steps still apply?

    My mac is updated to the latest version of Leopard. Is that a problem?

    Thanks.

    -D
  • dkkdds
    Hi!

    The USB-support works great, but I'm not able to make the external harddisk as primary harddisk. I think, it depends on "killall". I've original Mac OS X 10.4 cds, but I've no idea how I get the "killall" and when I'm copying the 10.5 killall I get a "Bus error".

    Thanks for your help.

    dkkdds
  • zanzibar
    Yes, this works on the current version of Apple TV 2.0.16
    For those of you having trouble with script, put all the files out of the download folder and in the top level, next to your system folder. Then cut the old script out and paste in this one:

    #!/bin/sh
    echo "Apple TV External Hard Disk Tool v1.20"
    echo "Copyright (c) 2007 Patrick Walton but freely"
    echo "redistributable: see the COPYING file for details."
    echo "Modifications and additions by Tom Anthony - AppleTVHacks.net."
    echo "------------------------------------------------------------------------"
    echo "Hi, I'm the install program for the Apple TV External Hard Disk tool."
    echo "This tool allows you to seamlessly use an external USB drive as the "
    echo "primary storage for your Apple TV. Please note that there is no warranty"
    echo "for this tool."
    echo ""
    echo "Before proceeding, please ensure that you have all of the following:"
    echo " - A connected Apple TV, modified at least with SSH capability. For"
    echo " information on how to modify your Apple TV to enable SSH, please see"
    echo " ."
    echo " - An installed version of Mac OS X 10.4 Intel, or a full copy of the "
    echo " contents of the /System/Library/Extensions folder from one."
    echo " - An original, unmodified copy of the 'mach_kernel.prelink' file from"
    echo " the Apple TV. I can try to retrieve it automatically from the Apple"
    echo " TV, but if you have modified the version on your Apple TV you'll need"
    echo " to tell me where I can find the original."
    echo " - A copy of 'prelink_tool', which is located in the prelink_tool "
    echo " folder. The binary there is precompiled for Mac OS X Intel, but if"
    echo " you aren't running that you'll need to compile the included source"
    echo " yourself."
    echo ""
    read -e -p "Are you ready to install? [yes] " resp

    if [[ $resp && $resp != "yes" ]]
    then
    echo "Okay, not installing."
    exit
    fi

    echo "I need to know the IP address of your Apple TV. You can find this in the"
    echo "Settings > Network menu on the Apple TV."
    echo ""
    read -e -p "What is the IP address of your Apple TV? " ip

    echo "First thing I'll need to do is to get a copy of the kernel. If you have"
    echo "a copy (called 'mach_kernel.prelink'), then I can use that, but it must"
    echo "be unmodified (in particular, without Turbo's USB hack). If you don't"
    echo "have it on your disk, then I can try to fetch it from the Apple TV, but"
    echo "again it must be unmodified."
    echo ""
    read -e -p "Do you have a copy of the kernel on *this* computer? [no] " resp

    if [[ $resp && $resp = "yes" ]]
    then
    read -e -p "Where can I find it? [./mach_kernel.prelink] " compk
    if [[ !$compk ]]
    then
    compk=./mach_kernel.prelink
    fi
    else
    echo "Okay, I'll get it from the Apple TV then. When prompted, enter "
    echo "'frontrow' (no quotes) as the password."
    scp -1 frontrow@$ip:/mach_kernel.prelink ./mach_kernel.prelink
    compk=./mach_kernel.prelink
    fi

    echo "Uncompressing the original '$compk'..."
    /prelink_tool/prelink_tool -d $compk mach_kernel.ou.prelink
    echo "Patching the original '$compk'..."
    bspatch mach_kernel.ou.prelink mach_kernel.nu.prelink \
    /kernel/kernel.uncompressed.patch || exit 1
    echo "Compressing the new '$compk'..."
    /prelink_tool/prelink_tool -e mach_kernel.nu.prelink mach_kernel.n.prelink

    echo "I'm going to upload the patched kernel to the Apple TV now. When "
    echo "prompted, which will likely happen several times, enter 'frontrow' (no "
    echo "quotes) as the password."

    ssh -1 frontrow@$ip "sudo mount -rw /dev/disk0s2 /; sudo mv /mach_kernel.prelink /mach_kernel.preusbhd.prelink" || exit 1
    scp -1 ./mach_kernel.n.prelink \
    frontrow@$ip:/Users/frontrow/mach_kernel.n.prelink || exit 1
    scp -1 ./mach_kernel.nu.prelink \
    frontrow@$ip:/Users/frontrow/mach_kernel.nu.prelink || exit 1
    ssh -1 frontrow@$ip "sudo mv /Users/frontrow/mach_kernel.n.prelink /mach_kernel.prelink; sudo mv /Users/frontrow/mach_kernel.nu.prelink /mach" || exit 1

    echo "Now I'll need to package up the necessary Mac OS X 10.4 kernel "
    echo "extensions. If you're running Mac OS X 10.4 Intel, then they'll be"
    echo "located in the system location, '/System/Library/Extensions', and you"
    echo "can just press Return here. Otherwise, enter the location where they're"
    echo "stored."
    echo ""
    read -e -p "Where are the kernel extensions? [/System/Library/Extensions] " \
    kextdir

    if [[ !$kextdir ]]
    then
    kextdir=/System/Library/Extensions
    fi

    thisdir=`pwd`
    cd $kextdir
    tar cf $thisdir/usbhd-kexts.tar IOStorageFamily.kext \
    IOSCSIArchitectureModelFamily.kext IOUSBMassStorageClass.kext || exit 1
    cd $thisdir

    echo "I need to send this package to your Apple TV now. When prompted, enter"
    echo "'frontrow' for a password as before."

    scp -1 usbhd-kexts.tar frontrow@$ip:/Users/frontrow/usbhd-kexts.tar
    ssh -1 frontrow@$ip "sudo mv /Users/frontrow/usbhd-kexts.tar /System/Library/Extensions; sudo sh -c 'cd /System/Library/Extensions; tar xf usbhd-kexts.tar; chown -R root:wheel *'" || exit 1

    echo "Now I need to install the 'atvrhdd' program, the 'atvrhdctrl' and "
    echo "'backrow_patch' helper scripts onto your Apple TV. These enable your"
    echo "Apple TV to automatically detect and use an external USB drive when "
    echo "you insert one. When prompted, enter 'frontrow' as your password."
    scp -1 /usr/bin/killall frontrow@$ip:/Users/frontrow/killall
    scp -1 /atvrhdctrl/atvrhdctrl.sh frontrow@$ip:/Users/frontrow/atvrhdctrl.sh
    scp -1 /backrow_patch/backrow_patch.pl frontrow@$ip:/Users/frontrow/backrow_patch.pl
    scp -1 /atvrhdd/atvrhdd frontrow@$ip:/Users/frontrow/atvrhdd

    ssh -1 frontrow@$ip "sudo cp /Users/frontrow/killall /usr/bin/killall; sudo cp /Users/frontrow/atvrhdd /usr/bin/atvrhdd; sudo cp /Users/frontrow/atvrhdctrl.sh /usr/bin/atvrhdctrl.sh; sudo cp /Users/frontrow/backrow_patch.pl /usr/bin/backrow_patch.pl; sudo chmod a+x /usr/bin/killall /usr/bin/atvrhdd /usr/bin/atvrhdctrl.sh /usr/bin/backrow_patch.pl; sudo sh -c 'echo /usr/sbin/diskutil mountDisk disk1 >> /etc/rc.local'; sudo sh -c 'echo /usr/bin/atvrhdd >> /etc/rc.local'"

    echo "Finally, I need to restart your Apple TV. When prompted, enter"
    echo "'frontrow' as your password."
    ssh -1 frontrow@$ip "sudo shutdown -r now"
    echo "All done! Have fun."

    That's what worked for me. Good Luck!
  • zanzibar
    rather than change the script I put all the files in the top level

    ================================================
    prelink_tool: mach_kernel.prelink file processor
    by Paul Bartholomew (oz_paulb)
    ================================================

    Loaded input file: './mach_kernel.prelink', size = 7811870
    Decompressing 0x77319e (7811486) byte payload ... Done
    (decompressed size = 0xe41548 (14947656))
    Wrote output file: 'mach_kernel.ou.prelink' (size = 0xe41548 (14947656))
    Patching the original './mach_kernel.prelink'...
    bspatch: kernel/kernel.uncompressed.patch: No such file or directory
    mpkalishnakov:~ vault$

    Any ideas?
  • zanzibar
    Is anyone else getting this on take 2?

    Do you have a copy of the kernel on *this* computer? [no] no
    Okay, I'll get it from the Apple TV then. When prompted, enter
    'frontrow' (no quotes) as the password.
    Password:
    Response:
    mach_kernel.prelink 100% 7629KB 1.9MB/s 00:04
    Uncompressing the original './mach_kernel.prelink'...
    /Users/mac/Desktop/AppleTVHacks_USB_patch/install-atvrhd.sh: line 63: ./prelink_tool/prelink_tool: No such file or directory
    Patching the original './mach_kernel.prelink'...
    bspatch: kernel/kernel.uncompressed.patch: No such file or directory
  • zanzibar
    Is anyone else getting this on take 2?

    Do you have a copy of the kernel on *this* computer? [no] no
    Okay, I'll get it from the Apple TV then. When prompted, enter
    'frontrow' (no quotes) as the password.
    Password:
    Response:
    mach_kernel.prelink 100% 7629KB 1.9MB/s 00:04
    Uncompressing the original './mach_kernel.prelink'...
    /Users/vault/Desktop/AppleTVHacks_USB_patch/install-atvrhd.sh: line 63: ./prelink_tool/prelink_tool: No such file or directory
    Patching the original './mach_kernel.prelink'...
    bspatch: kernel/kernel.uncompressed.patch: No such file or directory
    mpkalishnakov:~ vault$
  • […] Appletvhacks is reporting that a hack is now available that allows Apple TV to work with external USB drives. With the most storage space you can get on an Apple TV unit being a bit sparse for some, this is great news. […]
    ___

    http://buycheapmevacor.weebly.com
  • zwalex
    Does this patch also enable an external DVD drive?
  • disposableidentity
    What about hacking the Apple TV to run FTP?

    Remote syncing with my main media library?
    Yes please.
  • brenden
    does anyone know if all this works for apple tv take 2?
  • Wilco
    I am having the same issue as jonbags was having.
    My apple tv goes into a continuous reboot cycle once I turn on and plug in the external USB drive.
    I have tried formatting the drive in mac os extended with and without journaling - it makes no difference.
    Any ideas on how to get this to work?
  • Jaime
    Does anyone know if the apple Time capsule can be used as a usb storage device. i know its a wireless storage device and has a usb port for a printer...but it would be nice to use it as the external usb drive for my apple tv and also as my wireless N router =) since i WAS planning on purchasing the apple airport extreme anyway, but this way it will all be consolidated into one thing
  • luck
    Willy, you go ahead. I am more comfortable staying outside of a jail cell rather than being in one.

    Now, that's just me.
  • willy
    It would be nice to create a website of ripped appleTV Movies? Don't You think?
  • Ben
    It'll be huge favor if someone could nicely make a working patchstick for 1.1 version!!!!
  • No clue to be honest...
  • Mattijs
    Does anyone already know whether there is a valida patchstick available for the 1.1 version?
  • So if I'm correct this works now??
  • Richard
    Does this still allow syncing with a mac? I have a MacPro with all my media on and I would like to use an Apple TV with an external drive. Would I have to copy everything across to the external drive manually or will the Apple TV sync as if it where an internal drive? Thanks.
  • Paul
    Do you have a copy of the kernel on *this* computer? [no] no
    Okay, I'll get it from the Apple TV then. When prompted, enter
    'frontrow' (no quotes) as the password.
    frontrowssh: connect to host 10.0.1.2 port 22: Operation timed out
    Uncompressing the original './mach_kernel.prelink'...
    ================================================
    prelink_tool: mach_kernel.prelink file processor
    by Paul Bartholomew (oz_paulb)
    ================================================

    Error loading input file: './mach_kernel.prelink'!
    Patching the original './mach_kernel.prelink'...
    bspatch: mach_kernel.ou.prelink: No such file or directory


    2Z694-5248-45.dmg is downlod on desktop and open.


    Which false I make???
  • Paul
    Hello from Germany

    I NEED STEP BY STEP HELP!

    I stop at this question:


    Do you have a copy of the kernel on *this* computer? [no]

    And Now???

    ( 2Z694-5248-45.dmg downlod on desktop )


    Paul
  • Sergio
    hello, I was wondering if you know of anybody who can hack my apple tv in the Los Angeles area. I would like to be able to connect an external hard drive to it.
    Please let me know.

    thank you.
  • Did anyone got it working yet?
  • Phillip
    Ok, please excuse my previous post. I figured out how to enter the correct ccmmands and got everything working with one issue. I now have a 1.83TB AppleTV :-) However, It keeps locking up while syncing for some reason. After a few gigs, sometimes it will just lock up and stop copying. I have an all apple 802.11n network here. I don't know what the problem is. I just powered down the apple tv and unplugged the hard drive to see if I could manually drag n drop 1TB of stuff (my way of testing the drive :-)) Anyways, besides for the external having problems, could this have anything to do with the script? Is there a way I could drag the folders over, plug it into the apple tv and have the atv recognise the "new library"? I'm thinking not...
  • Phillip
    I'm a unix idiot here. I have enabled ssh but I don't know how to execute the file. i type "install -atvrhd.sh" and nothing happens. I do this in terminal with or without being connected via ssh and no results.. I know it's something stupid. Please help.
  • dna
    quite a few folks here looking for a simplified gui app to do all steps easily: (1) bring unit back to 1.0 version (would be nice if we could still have our youtube btw--possible?), (2), ready the appletv with remote ssh, (3), enable larger USB support, etc.

    anyone making any progress on this? would love to see an update from luck, turbo, etc. keep up the great work and keep up the MOMENTUM!!!
  • jonbags
    #
    130
    casiogtm Says:
    August 8th, 2007 at 3:33 am

    Well after trying multiple times and getting stuck at the Apple startup, i found that if you format the drive as Extended and not Extended (journaled) it works.
    I hope this saves someone some frustration.

    Question Answered.

    Duh me.
  • jonbags
    Hello, having some problems with this script.

    I followed the instructions (Enabled SSH, formatted the disk etc) and attempted to do the patch but noticed I was running the apple 1.1 version, it seamed to copy some files over but sometimes it did one, when other times it did more, either way it just ignored the drive and carried on as normal. I figured that it must be something to do with the fact that its 1.1 so i restored my factory setting and started again.

    Did the same things as i did last time, did the patch (both times i've tried this, towards the end of the install-atvhd.sh there is something about directories not being found but I dont think they're important as its after all the files have been copied and has told me that its rebooting my appletv, maybe wrong though)

    Right, so this time i've done it and more files have been copied over to the USB HD. As soon as i plugged it in, it just rebooted on its own so I though "wow its worked" but now it wont boot at all, it just seams to go in and endless loop of the silver apple logo, then going to Apple recovery.

    Im thinking an apple restore will bring my appletv back to normal but without the usb HD being used. Am i missing something?
  • Diggerdan
    Hey,
    Is there any simple way of remotely enabling ssh for appletv? I keep going round in circles loking for it as the whole notion of doing it with with code and soforth is way out of my league - if there's a simple way that a layman can do it then great, but if not that is also cool - at least I'll know where I stand...

    I guess the crux of it is that I'm not confident in pulling the machine apart to do all of this, however some sort of guidance on how it could possibly work without disassembling the apple tv would be more than appreciated...

    Cheers
    D
  • dr0d
    i see martin has the same issue that i am having. the script hangs on line 63. has any one found a solution for it? i moved the folder in t
  • luck
    Will do, dna. Thanks for the feedback.
  • dna
    Luck says:

    >>So you need to combine the instructions on both articles to make this work. >>If this is still confusing to you, I might consider writing another guide with >>more detailed instructions.


    Please do already. Thanks.
  • BJD
    Tried modifying line 65 of the script to "texas teachers retirement fund." It still failed. Is that case sensitive? :)

    Anybody have any other suggestions?
  • BJD
    I got the problem on a different spot than other have listed, at line 65.

    Output was:

    Loaded input file: './mach_kernel.prelink', size = 6143072
    Decompressing 0x5dbae0 (6142688) byte payload ... Done
    (decompressed size = 0xc64548 (12993864))
    Wrote output file: 'mach_kernel.ou.prelink' (size = 0xc64548 (12993864))
    Patching the original './mach_kernel.prelink'...
    install-atvrhd.sh: line 65: bspatch: command not found

    That's odd, since the command should exist...nothing after that. The script just terminates.
  • luck
    Martin, take a look at comment post.

    http://www.appletvhacks.net/?p=73&cp;=11#comments

    Let me know if you still have problems.
  • Martin
    Any help would be awesome.....I'll stuck at this "line 63".
    What am i doing wrong.


    Thanks in advanced.
    Martin


    mach_kernel.prelink 100% 6159KB 1.5MB/s 00:04
    Uncompressing the original './mach_kernel.prelink'...
    /private/var/root/Desktop/AppleTVHacks_USB_patch/install-atvrhd.sh: line 63: ./prelink_tool/prelink_tool: No such file or directory
    Patching the original './mach_kernel.prelink'...
    bspatch: kernel/kernel.uncompressed.patch: No such file or directory
    Harrys-Macbook-Pro:~ root#
  • simon
    I'm trying to enable ssh followed the instructions but when I insert the usb drive nothing happens, when I restart it asks for the language and the wireless network, then I see the apple logo and then the intro screen.

    The only thing im not sure about is the file boot.efi, it says you need it in the instructions but does not mention what to do with it.


    help
  • victor
    hola porfavor hay algun manual en español. gracias

    hi, please manual in spanish.thanks
  • RS1000
    I was able to install and run the atv using the external drive. when i accessed the atv and external drive using afp, i noticed that the directories in the external drive consisted of media and media files. On the other hand there still seems to be osboot, frontrow and media directories under the internal apple tv being recognized and containing directories like movies, music, pictures, etc. why is this so? how can you copy files into the external using afp or ssh (without sync)? To which directories should you copy into?
  • jimh
    ok... so i fallowed the instructions and i have a 500GB drive attached via firewire. my apple tv still shows as a 40GB appletv. but when i disconnect the usb drive and connect it to my computer all the items show up as copied to the external drive. so is it supposed to be showing me a capasity of 500gb, or is this just a way to mirror the internal hd to an external drive? what am i doing wrong to make it show as a 500gb appletv?
  • Lukaszs
    Hi There ,

    thanks for the advice...

    I'll look forward to the updated instruction guide..

    Kind regards

    Lukasz
    #
    122
    luck Says:
    August 3rd, 2007 at 12:21 am

    Lukaszs, the AppleTVHacks.net article on installing OS X on the Apple TV was written before anyone can figure out how to do the hack without opening the case.

    To enable SSH on the Apple TV, you want to do is to first create a boot drive with OS X installed on it and then plug that drive into the Apple TV USB port to make it boot OS X. From then on, you should be able to use a script or manually enable SSH on the Apple TV.

    So you need to combine the instructions on both articles to make this work. If this is still confusing to you, I might consider writing another guide with more detailed instructions.
  • Dmit
    I have never used any Mac, either Intel nor PPC one (Macs are too rare animals in our region). But I'm quite good at Linux though. Loved that AppleTV look-like and bought one recently.

    I think there is one really BIG problem for people wanting to exploit their ATV in case there is no "Intel Mac" around. After a lot of reading and googling, I have finally patched my ATV box using a quite decent Open Darwin ISO from Apple Developers.

    So my question is:

    can I use this same Darwin CD booted in single mode to apply this USB patch? I mean if I can fdisk, partition and format my USB drive from that CD?

    The second question is if I can install that Darwin distro to an external USB drive so I can patch SSH on a new ATV without opening it?
  • casiogtm
    Well after trying multiple times and getting stuck at the Apple startup, i found that if you format the drive as Extended and not Extended (journaled) it works.
    I hope this saves someone some frustration.
  • Nick
    I would like to do this with my Apple TV but do not have experience doing these types of things. If I follow all the directions, is it something a noob like me can figure out?

    Also, how does one cotinue to update the Apple TV and add new content to it, once this hack has been performed? Can you still do it through iTunes or do you have to add things to the external hard drive manually?
  • Richard
  • RS1000
    Ivo, Thanks for the help. I will try this out this weekend and hopefully I can get it going.
  • Richard
    http://wiki.awkwardtv.org/wiki/Enable_SSH_Witho...

    ssh without opening the apple

    hope this helps
  • luck
    Lukaszs, the AppleTVHacks.net article on installing OS X on the Apple TV was written before anyone can figure out how to do the hack without opening the case.

    To enable SSH on the Apple TV, you want to do is to first create a boot drive with OS X installed on it and then plug that drive into the Apple TV USB port to make it boot OS X. From then on, you should be able to use a script or manually enable SSH on the Apple TV.

    So you need to combine the instructions on both articles to make this work. If this is still confusing to you, I might consider writing another guide with more detailed instructions.
  • Lukaszs
    Hi , Like Ivo and Kurt,

    I read that to enable shh you need to open the case, I look at the link to wiki which shows the instructions which in step one advises
    Step 1
    Install full Mac OS X onto the device, using semthex's kernel and instructions detailed here: Apple TV Hacks - Mac OS X running on Apple TV. If you're installing to a small device you'll want to read the instructions for a minimal install Here.

    The link provided by wiki then refers to your site 'http://www.appletvhacks.net/2007/04/01/mac-os-x-running-on-apple-tv/' and the instructions which require the case to be opened.
    How to install

    This is the process that was used to turn the Apple TV into a full blown Mac OS X machine:

    1) remove the drive from the Apple TV

    I'm not worried about competition rules but just do not want to open the thing up

    what am I missing
  • Tim
    Just wanted to report that reformatting the drive did end up working for me as well. I changed it from GUID Partition Table to the Apple Partition format and everything worked right off the bat.

    I have to say it's a pretty slick combo to use the patchstick method to enable SSH and AFP without opening the Apple TV, and then use this script to enable the external USB storage. Once I got the procedure right it only took a couple of minutes to go from a factory restored Apple TV to one with SSH, AFP, and running off an external USB disk.

    Thanks for your help Ivo and Luck!
  • Ivo
    RS1000
    No problem for the query. I would not have succeeded if it wasn't for all the tips and advice here.

    When you download the patch and extract it, you get one single folder. This folder contains a couple of files and a couple of folders. Now, I did NOT place this one downloaded folder in my root. I placed the CONTENT of this one downloaded folder in my root. So in my root I ended up with a couple of files and a couple of folders. And most importantly, one of the files directly in my root is the script.

    The disk I finally attach to the Apple TV, as Luck said, is simply formatted as MAC OS Extended (Journaled).

    Being a UNIX newbie, only after I did this all, I'm beginning to understand what exactly it is I did. The sole purpose of the GUID disk with OS X on it is to SSH enable the Apple TV. Once that is done, you opened up the Apple TV for the script.
  • RS1000
    IVO, just to clarify, did you put all the files in the USB patch folder and placed that folder in the root? or did you put the USB patch folder on the root then separately placed the other files all in the root? As for the USB disk, how did you format the USB disk? Not GUID so you used Apple Partition Map or Master Boot Record? But still used Mac OS Extended (Journaled)? Sorry for the long query. Have just been frustrated for so many days already without getting anywhere on my installation. Thanks.
  • luck
    Ivo, congratulations. You are one very persistent man.

    By the way, do you really have to do it all over again? You should just be able to get another drive, partition it as Journaled HFS+ (Apple Partition Map, which is the default), and attach it to the Apple TV. That's it. Your Apple TV has already been modified.

    By the way, if you unattach the drive, the Apple TV would revert to using the internal drive.
  • Ivo
    SUCCESS!!!

    Finally got it to work!!!! The biggest mistake I made was that I wanted to connect the USB disk that I used for SSH-enabling the Apple TV. In other words, I wanted to attach the OS X disk. WRONG! Like Luck stated: it needs to be a data disk, so I just attached an empty USB disk and voila!!!

    Going to get me a big disk tomorrow and do it all over again!!
  • Ivo
    Again one step further. Initially got stuck at a frozen Apple logo. I restored to factory settings and re-enabled SSH (as far as I know I did nothing different than before). Now the Apple TV did start up. However, it does not seem to do anything with my USB disk. And that might be related to the fact that I partitioned as GUID (got that from: http://0xfeedbeef.com/appletv/usbboot; however, those were instructions for replacing the internal Apple TV hard disk). Will try again with Luck's suggestion where I partition the USB disk as a data disk.

    I'll be back!
  • Ivo
    Yes! Finally I got the script to work. Thanks people for all the suggestions! I think what I did wrong was put the map containing the script and the other files on my desktop. What finally did work for me, was put all the maps and files from the patch in the root (so one level higher than my desktop). And then it worked!!

    However, now I am stuck at the exact same point where Tim got stuck: the Apple logo, restore etc. Diagnostics says everything is ok! I do not think this has anything to do with the partition on the USB disk as, after running the script successfully, my USB disk never touched the Apple TV, since I never got to the flying TV's.

    I will never lose faith!! With your help, I get a little closer every day!!!
  • Zac
    Ivo, RS1000, I have a solution.

    Firstly, you have to, in terminal, cd into the directory of the USB patch. From there, you run the install-atvrhd.sh file (type ./install-atvrhd.sh to open it). As long as you've copied the mach kernel from the AppleTV update to the same folder, you should be able to just hit continue through it all. This'll fix that problem.

    Problem number 2 - line 74. Nothing particularly bad is on this line, it's just trying to make a backup of a file by renaming it. The problem is that even though the other failed attempts failed before this step, the file was for some reason renamed. Therefore, just type

    ssh -1 frontrow@appletv.local

    replacing appletv.local with your IP address if necessary.

    Once in, type

    sudo mv mach_kernel.preusbhd.prelink /mach_kernel.prelink

    That'll bring the file back to the original name. Now, as long as you're running the installer from the right directory (by changing to that directory in terminal before starting the installer), everything should run smoothly.

    I hope this has helped you guys get it up and running. Now it's just time for me to go ahead and reinstall the AppleTV files hack.
  • RS1000
    Ivo, how did you manage to get past line 63? Did you modify anything on the script?
  • Tim
    Thanks for the suggestion. I will try tonight without the GUID option set and see if that helps.
  • luck
    Tim, please do not use the GUID partition for this. Apple TV is looking for a data disk. GUID partition is normally used if you want to boot from that partition. So, give that a try.
  • Tim
    Ivo, try copying the mach_kernel.prelink file from the Apple update image to the directory that contains the script. That's the default place it looks for it if you tell it to use one on your computer (./mach_kernel.prelink).

    You can also feed the path to the image when the script asks for it, but I think it's easier to just copy the image myself and hit enter when it asks for the path.

    Yes, I did choose the GUID option when I formatted the disk using Disk Utility.
  • luck
    Thanks for the information, Tim. It will probably be tomorrow befoe I can get back to you on how my installation goes. I'll let you know then. Don't lose faith!
  • Ivo
    Luck, thanks! Managed to get past line 63, so please also see my post #90.

    Tim, don't know if this may be the cause of your problem, but did you use the GUID Partition Table as your partition scheme for the USB drive?
  • Tim
    I plugged in the drive during the opening sequence (videos flying around). I also tried waiting a little longer and a waiting a little less time to see if it was a timing issue. The files were being copied to the USB drive, so I think the timing was right, but the AppleTV never got past the Apple logo after that.

    For people having problems with the script, try running it from a path that includes no spaces. There seemed to be a bug in the script near where it was calling the tar command that caused problems if the path to the directory had spaces in it. I had to rename the folder I placed the files in to get the script to work for me.
blog comments powered by Disqus