|Trying and failing to upgrade my AppleTV hard disk non-destructively
||[Apr. 12th, 2009|08:31 pm]
I bought my AppleTV a year or so back, and I've found it a really handy way to watch TV shows I missed / aren't on freeview. Unfortunately, I've been using it so much, that it had got full!|
Most of the AppleTV upgrade guides (like this or this) assume you're an iTunes user, so after getting your new hard disk running, you'll just re-sync all your content from iTunes. However, being a Linux user, I don't have iTunes, and the great thing about the AppleTV was that it let me buy stuff from the iTunes store without needing to use windows.
So, I decided I wanted to try doing a non-destructive upgrade of the hard disk in my AppleTV, using only linux (so guides that require a mac and iPartition were out). Here's my tale...
Oh, and in case it matters, my AppleTV was running 2.0, but shipped with 1.0, had a 40gb disk before, I've bought a 160gb new disk, and I'm using debian stable (lenny). I've only got one usb hd caddy, so I needed plenty of disk space on my machine.
First up, took out the old hard disk, and took two backups of it. One was of the whole disk (/dev/sde in my case, ymmv), and another of each partition on it (/dev/sde1 - /dev/sde4, you should see all 4 if your kernel has GPT support, which you'll need)
The first thing I tried was using a GPT enabled version of parted to create 4 partitions on the new disk, the first three being identical to the EFI, Recovery and OSBoot ones on the old disk. The 4th was a new hfs+ Media partition to fill the rest of the disk. I then dd'd the 1st three partitions onto the new disk, and created a new hfs+ (non journaled) partition for the 4th, and cp'd the content from a mounted copy of the old media disk. This appeared to work fine, but the AppleTV wouldn't boot properly. It would fail to boot a few times, go to the recovery mode, and fail to do a factory restore if requested. This apparently simple route fails :(
Next, I tried dd'ing the whole of the old disk onto the new one. The AppleTV booed fine, played my content fine, but didn't see any of the new disk space (as one would expect). Then, I did a factory reset. This worked, and got me back to 1.0, and with an empty media disk, but still only using the 40gb.
With the disk in this state, I then tried using parted to create a new media partition. It warned me about the GPT not filling the disk, but after fixing that, was happy to create a ~150gb media partition to fill the disk up. mkfs.hfsplus ran fine on the new partition, and the AppleTV booted happily. It was then running 1.0, but with 150gb of free space, but no content.
This seemed promising, so next I tried restoring the OSBoot partition again (by dd'ing my save of the 3rd partition back over the top of the 3rd partition on the new disk). It booted into the recovery mode which worried me, but diagnostics passed fine, so I rebooted it. This (2nd) time, the AppleTV booted fine, and I had 2.0 with 150gb of free space (no content)
My next step then was to take the disk back out, mkfs.hfsplus to re-create the media partition un-journaled (the AppleTV had turned it into journaled, and Linux won't then write to it). I mounted this under linux, and did a "cp -ar" of all the content from the backup of my media partition onto the new one. This booted fine, and showed the extra space. All my content showed in the list. However, while my tiny bit of iTunes sync'd content played fine, all my AppleTV purchased stuff wouldn't play, giving the error "No Content Was Found". The icons for the purchased content had gone too. My best guess was that the factory reset wiped the keys.
So, I thought I'd start again, and see how far I could get before loosing access to purchased content. dd'ing the whole of the old disk over worked fine - no new space, but all my content. Next, after running parted to fix the GPT, it was all the same.
The test then was to use gpt to create a new larger media partition, mkfs.hfsplus to create a new fs on it, then to cp all the content over from the old disk's media partition. This results in an AppleTV that'll boot, see the new space, but refuse once again to play purchased content.
Now, the very odd thing is that if I use the file browser (ATVFiles) to browse to /mnt/Media/Purchased Files/, then I can play those just fine. So, whatever the required details are to play purchased files, they are still on my AppleTV.
I tried upgrading to the latest AppleTV software (2.3.1), to see if that might fix things. Alas no change though :(