Apple TV Hard Drive Upgrade
[Turns out that I could have saved myself a lot of work by following these [1] instructions]
I recently upgraded the 40 GB hard drive in my AppleTV to a 250 GB model using instructions from AppleTVHacks[2].
Of use was Apple's tech note TN2166 [3], "Secrets of the GPT". The GPT [4] is a GUID partition table standard that Intel created to support their EFI (Extensible Firmware Interface).
Having only a PowerPC computer, I was forced to use the DD method above. It worked fine, except that the computer thought that the Media partition was still 32 GB with no free space. I couldn't fix it with Disk Utility, iPartition, or command line tools.
A few hours of research later, and it's working. HTH:
Original 40 GB Apple TV hard drive GUID partition map (after using dd to copy to 250 GB hdd):
~: gpt -v -v -v -v -v show -l /dev/disk2 gpt show: /dev/disk2: mediasize=250059350016; sectorsize=512; blocks=488397168 gpt show: /dev/disk2: PMBR at sector 0 gpt show: /dev/disk2: Pri GPT at sector 1 gpt show: /dev/disk2: GPT partition: type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, start=40, size=69632 gpt show: /dev/disk2: GPT partition: type=5265636F-7665-11AA-AA11-00306543ECAC, start=69672, size=819152 gpt show: /dev/disk2: GPT partition: type=48465300-0000-11AA-AA11-00306543ECAC, start=888824, size=1843192 gpt show: /dev/disk2: GPT partition: type=48465300-0000-11AA-AA11-00306543ECAC, start=2732016, size=40642608 gpt show: /dev/disk2: Sec GPT at sector 488397167 start size index contents 0 1 PMBR 1 1 Pri GPT header 2 32 Pri GPT table 40 69632 1 GPT part - "EFI" 69672 819152 2 GPT part - "Recovery" 888824 1843192 3 GPT part - "OSBoot" 2732016 40642608 4 GPT part - "Media" 43374624 445022511 488397135 32 Sec GPT table 488397167 1 Sec GPT header
I tried deleting and re-adding the "Media" partition, but I kept running into errors.
I fixed this by partitioning the drive in Disk Utility with 1 partition (Free Space) and GUID as the partition type.
At this point, the partition map looked like this:
~: gpt -v -v -v -v -v show -l /dev/disk2 gpt show: /dev/disk2: mediasize=250059350016; sectorsize=512; blocks=488397168 gpt show: /dev/disk2: PMBR at sector 0 gpt show: /dev/disk2: Pri GPT at sector 1 gpt show: /dev/disk2: GPT partition: type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, start=40, size=409600 gpt show: /dev/disk2: Sec GPT at sector 488397167 start size index contents 0 1 PMBR 1 1 Pri GPT header 2 32 Pri GPT table 34 6 40 409600 1 GPT part - "EFI System Partition" 409640 487987495 488397135 32 Sec GPT table 488397167 1 Sec GPT header
Next, I deleted the "EFI System Partition" since it was the wrong size, and re-created it:
~: gpt remove -i 1 /dev/disk2 /dev/disk2s1 removed ~: gpt add -b 2732016 -i 4 -s 485664919 -t 48465300-0000-11AA-AA11-00306543ECAC /dev/disk2 /dev/disk2s1 added
Adding labels as I went along:
~: gpt label -i 1 -l "EFI" /dev/disk2 /dev/disk2s1 labeled
Add the Recovery partition:
~: gpt add -b 69672 -i 2 -s 819152 -t 5265636F-7665-11AA-AA11-00306543ECAC /dev/disk2 /dev/disk2s2 added ~:gpt label -i 2 -l "Recovery" /dev/disk2 /dev/disk2s2 labeled
Add the OSBoot partition:
~: gpt add -b 888824 -i 3 -s 1843192 -t 48465300-0000-11AA-AA11-00306543ECAC /dev/disk2 /dev/disk2s3 added ~: gpt label -i 3 -l "OSBoot" /dev/disk2 /dev/disk2s3 labeled
At this point the safest point is to go back to Disk Utility. Go to the partitions tab, click on the (+), and made a new HFS+ (Journaled) partition named "Media"
P.S. All uses of /dev/disk2 above are specific to my system. To get the disk number, use Disk Utility or System Profiler.
P.P.S. gpt won't read or write any data if any volumes from the disk are mounted. I had to go back to the Finder and unmount OSBoot and Media before each step.