HeyZeus.org : Personal Blog of Zeus

Restoring an Apple TV 1 from Scratch on Mac OS X

So I’ve had to do this a few times because my Apple TV keeps ‘acting’ up. It kept freezing during tv shows I downloaded and converted via iSquint. The ATv would then restart and not recognize what was on the hard drive (Format not recognized by Apple TV). It was pissing Mandy and I off enough for me to try to do another ‘from scratch’ restore. I’ve followed these directions before referencing Smallnum’s directions and AwkwardTV’s Wiki. I’m saving them here, because it’s more concise and may help others. These are directions for a mac OS X Leopard 10.5.6 . Download the latest Apple TV image from here and find the full url of the dmg file to download. It doesn’t matter what size the drive is you want to do this with. Assuming, /dev/disk2 is your disk. All these commands are done from terminal unless otherwise noted.

1. Connect your hard drive to a Macbook using an IDE-to-usb/firewire dongle.

2. Clear any partition information and create a new partition table (you can also just format the drive with DiskUtil, you also need to run ‘diskutil unmountDisk /dev/disk2’ after each gpt command) :

gpt destroy /dev/disk2
diskutil unmountDisk /dev/disk2
gpt create /dev/disk2

3. Create the partitions using ‘gpt’. There should be four partitions: EFI (200m), Recovery (400m), OSBoot (900m), Media (rest of the disk). The EFI and Recovery partitions can be completely blank, but those sizes must be exact.

gpt add -b 40 -i 1 -s 409600 -t efi /dev/disk2
diskutil unmountDisk /dev/disk2
gpt add -b 409640 -i 2 -s 819200 -t 5265636F-7665-11AA-AA11-00306543ECAC /dev/disk2
diskutil unmountDisk /dev/disk2
gpt add -b 1228840 -i 3 -s 1843200 -t hfs /dev/disk2
diskutil unmountDisk /dev/disk2
gpt show /dev/disk2  {*Review the next partition size and enter in the large value*}
gpt add -b 3072040 -i 4 -s 231369575 -t hfs /dev/disk2
diskutil unmountDisk /dev/disk2

4. Remounts drives with file permissions and names, this combines two things in one.

diskutil eraseVolume "Journaled HFS+" OSBoot /dev/disk2s3
diskutil eraseVolume "Journaled HFS+" Media /dev/disk2s4
diskutil unmountDisk /dev/disk2

5. Restore the image. Use disk utility, click on OSBoot, and restore the image you downloaded.

Note: I did not create and restore the recovery parition I have done this once and it was a pain. If I ever do it again I’ll document it here.