How-to: Upgrade the drive in your Apple TV

While millions thousands of people were enjoying their Apple TVs last night, we decided to take ours apart for some pictures and to upgrade the drive. Seriously, 40 GB is smaller than our iPod and we don't like to have to pick and choose what to sync. While there is little doubt that this will void our warranty, isn't it worth it? We have just updated our process, which is much much faster and no longer requires iPartition, thanks to some comments by Epomymous.We decided to double the size of the HDD from 40 GB to 80 GB; we picked up a new 5400 RPM IDE laptop drive and went to town.
You're going to need a few other items to perform this upgrade -- besides the Apple TV and the new drive, of course. First you'll need a TORX 8 and 10 driver to remove the screws and some spray adhesive to reapply the rubber mat on the bottom of the unit. You will also need either an external 2.5 inch drive enclosure or a USB to IDE adapter like the one shown with a 3.5 inch to 2.5 inch adapter.

You can also use two 2.5 inch to 3.5 inch drive adapters and a computer with dual IDE channels to do a disk to disk copy which would be much faster, but you don't get a backup of the original drive.
First we need to disassemble the Apple TV by peeling off the rubber from the bottom. Start on one corner and peal slowly so you don't tear it. There will be 4 TORX screws, one in each corner; don't remove the other 4 closer to the middle just yet.

After you remove the first four screws, gently pull the bottom away from the top. The hard drive is attached to the bottom so be mindful of the IDE cable.

Fold the bottom cover over so you don't stress the cable and gently pull the IDE cable from the main board of the Apple TV. After you're done admiring the internals, remove those other four screws on the back while holding the hard drive. Finally, unplug the IDE cable from the drive and plug it into your USB adapter.

Now we need to copy the disk -- and while there are probably 100 ways to do this, we are going to show our Linux roots by using our favorite command, "dd."
Sine we are only using one 2.5 inch to 3.5 inch hard drive adapter, first we are going to make a image of the disk onto our internal hard drive, then swap drives to copy the image back to the new disc. This will obviously take twice as long, but also gives us a backup of the original drive. If you have two USB to IDE adapters or a computer with two laptop drive adapters you can do a disk to disk copy which is much faster.
Plug the USB adapter into your Mac. From the Terminal, use diskutil to verify what disc we are working with:
*on Linux use fdisk -l instead*
diskutil list
Look for the disk that looks like this, it will have a partition named OSBoot and Media.

This tells us that the Apple TV drive is disk2 or more specifically. /dev/disk2
The tool we are going to use to copy the disk is dd, which simply means copy the input device to the output device. We are using disk2 for input and an image file in our home directory for the output. Make sure you have enough room for the entire 37GB file. Here is the command we are going to run form the terminal:
dd if=/dev/disk2 of=/Users/Engadget/AppleTV.img bs=1024k
To be clear, this command instructs the system to copy the entire disk, including all the partitions on disk2 to a image file stored at /Users/Engadget/AppleTV.img and the bs=1024k helps speed it along. If you want to only copy the parts of the drive you need add the count=1335 switch like the next command, we left it out despite the copy time so we could have a complete backup image of the original drive.
You should see the following screen when it's completed; unfortunately, there's no progress indicator.

Optional step: If you have a way to connect both drives to the computer at the same time, then use this command instead, assuming that disk2 is the source drive and disk3 is the destination:
dd if=/dev/disk2 count=1335 of=/dev/disk3 bs=1024k
When the image is finished we need to swap the drives and copy the image back to the new, bigger hard disk. Use diskutil again to verify the drive and then this command to start the copy.
** Update ** Now we are only copying the partitions we want, by adding the count= switch. It is much faster to copy 1.4 GB instead of 37 GB.
dd if=/Users/Engadget/AppleTV.img count=1335 of=/dev/disk2 bs=1024k
(If you connected both drives at the same time this step is not necessary.)
Again you will see the output confirming completion.

**Update**
We removed the iPartition steps, they are no longer necessary, now we do it manually and free.
First we eject the disk, we have to do this every time we run gpt or you will get an error.
diskutil eject disk2
Just in case lets try to recover the partition table.
gpt recover disk2
diskutil eject disk2
Then we remove the old Media Partition. (don't remove the wrong one!)
gpt remove -i 4 disk2
diskutil eject disk2
Then find our new start and size.
gpt show disk2
This will return this.
It we look just above the Sec GPT table we will see that the empty space starts at 3141672 and is 74998455 in size so we will use those in our next command.Eject the disk again.
diskutil eject disk2
Then create the new partition, using the info from the last step.
gpt add -b 3141672 -i 4 -t hfs /dev/disk2
Last, we format the drive.
diskutil eraseVolume "Journaled HFS+" Media /dev/disk2s4
Now before we dismount the drive, verify that there are no .Spotlight folders on the partitions by typing this command in the Terminal:
ls -a /Volumes/Media
and
ls -a /Volumes/OSBoot
If there are, then use this command to remove them, but be very careful, this command can delete everything.
sudo rm -rf /Volumes/OSBoot/.Spotlight-V100
or
sudo rm -rf /Volumes/Media/.Spotlight-V100
Now dismount and disconnect the drive and then install it back into your Apple TV.
diskutil eject disk2
It will boot like the first time again and now you should now be able to go into the Apple TV menu and see the size as well as in iTunes.

Stayed tuned as we learn more about what we can make this thing do.

















Reader Comments (Page 1 of 3)
dLeet @ Mar 23rd 2007 9:07PM
Call me an ignoramous if you want, but if anyone can answer me this: There is no way that apple can prevent, say, a perpendicular type of HD from working with this setup, right? As long as it has the same IDE connector? thnx
Alexander @ Mar 23rd 2007 9:40PM
It will work with any HD, that can be converted to the laptop IDE cable.
SDD would work. Also if you hacked up a cable and put it to a desktop-IDE cable end, and had some way to power the drive then you could use a desktop drive... It'd look kinda wonky, but they just released new 1TB drives...
Mark M @ Mar 23rd 2007 9:12PM
What you really want is this neat USB-to-IDE adapter:
http://www.usbgeek.com/prod_detail.php?prod_id=0208
but note that the 2.5" side unfortunately won't work on a laptop that does not provide adequate power via USB *cough*PowerbookG4*cough*
JP @ Mar 24th 2007 5:42PM
Your problem is the drive, not the Powerbook. The USB specification only allows for 0.5 amps MAX one a single port. Only low power drives can use this adapter, as most use something like 0.6-1.2 amps, at spin-up anyway. If you got the same drive to work on a different computer, the hub or adapter you were using had VERRY sloppy power management. That is why most USB 2.5" adapters use a pigtail cable to siphon more power from other ports. Many of these adapters have a way to use a PSU with them, contact your manufacture to see if they offer one.
TJ Fontaine @ Mar 23rd 2007 9:38PM
dd has a progress indicator, it shows itself when hit with the USR1 signal it's an easy way to see how far along you are, usage: `kill -USR1 `pidof dd`` running that in a sepearte terminal should cause dd to spit out information about how far and how fast it's running
you may also consider ddrescue (http://www.gnu.org/software/ddrescue/ddrescue.html) which is a bit of a change to regular dd which comes with a decent enough progress indicator by default and a means to try and get at hosed disks in case you ever drop your apple tv.
as far as partioning freely you might use any number of free live cds say for instance one from Ubuntu and use gparted. As a bonus all tools dd, ddrescue, and gparted would likely be found on said live cds.
wf @ May 5th 2007 7:51PM
Just FYI, kill -USR1 stops dd. To get status, use kill -INFO.
Chris B @ Mar 23rd 2007 9:46PM
I am just wondering how to do this without linux and with mac os x, can it be done in vista or xp to copy the drive
Matt @ Mar 23rd 2007 9:54PM
Dude they did that with OS X. Didnt you read the artrical?
Chris B @ Mar 23rd 2007 9:56PM
yeah but is it possible with xp or vista
Chris B @ Mar 23rd 2007 9:57PM
and how?
Andrew Rahimi @ Mar 24th 2007 9:27AM
Its probably possible to do in windows but I don't remember the name of a disk imaging utility off the top of my head. And you'll need to find a partition manager that can handle resizing the mac partition. You can do it, but it'll be more of a pain. Just boot a linux live cd for the disk copy. If your pc can run vista, it can run linux
scottstrash @ Mar 23rd 2007 9:46PM
correct me if i'm wrong, but isn't the apply tv basically doing what any iPod Video should do with in a dock hooked up to a tv? except, perhaps the whole network thing. but seriously, it just seems like iPod video should be able to do all of this - drop it in the apple dock, and have 80 gigs of your pictures, music and videos - and the little apple remote - a menu SHOULD pop up on the screen like this one.. if you ask me, apple just dosent allow the ipod to do this, to get this to market - and seems mighty pointless to me.
Steve K. @ Mar 24th 2007 4:10PM
AppleTV is supposed to handle HD content. iPods and iPods do not.
hongkongtechkid @ Mar 23rd 2007 9:59PM
A free way to partition the drive, and one that supports every filesystem under the sun is the GParted LiveCD. Pop it in the drive and it will recognise all drives including externals and usb keys, and as it's a linux gui it's self-intuitive.
Ignacio @ Mar 23rd 2007 10:13PM
Yea, a free way that unfortunately doesn't work ;)
From the GNU Parted features page (the library GParted uses):
"Parted can only shrink HFS and HFS+ filesystems."
http://www.gnu.org/software/parted/features.shtml
http://gparted.sourceforge.net/features.php
TheClashRocker @ Mar 23rd 2007 10:00PM
So engadget hates the apple ipod, but loves the apple TV.
Justin Y @ Mar 23rd 2007 10:11PM
I may have a free way to do the resize step instead of using iPartition for those who are on OS X 10.4. First of all make sure you have updated to 10.4.6 as the a useful feature was added to diskutil in this update to hlep bootcamp resize drives.
It will add 'resizeVolume' functionality to diskutil. I've done this before when resizing drives to triple boot my Macbook. I dont recall the exact syntax required, but follow the link below and change it around depending on your drive size.
If this works for anyone let me know :-)
http://www.macgeekery.com/tips/cli/nondestructively_resizing_volumes
Ben @ Mar 23rd 2007 10:20PM
I spent many hours trying to use diskutil's resizeVolume to work, but it seems it can only make volumes smaller not larger.
I originally bought iPartition for the same reason some time ago, I wanted to remove Boot camp and wasn't able to reclaim all my drive space with diskutil. Other than reformatting the disc of course.
Seems like the same limitation as gparted according to Ignacio.
Ignacio @ Mar 23rd 2007 10:15PM
(By the way, my previous comment was a response to hongkongtechkid, not Justin Y)
Alex @ Mar 23rd 2007 10:26PM
Just out of curiosity, but did you guys try booting your Mac from the Apple TV drive? I know its a long shot, but just curios.
Carl M @ Mar 23rd 2007 11:06PM
You could probably use a tool like Winhex to copy the drive in XP/Vista.
Not sure what you'd use to change the partition size.
Carl M @ Mar 23rd 2007 11:21PM
Oh, and for a free way to clone the drive, just use Cygwin.
Only trick is finding the proper /dev:
http://www.cygwin.com/cygwin-ug-net/using-specialnames.html
(in short, /dev/sda = first hard disk, /dev/sdb = second disk, etc.)
Once you figure out the right device, just proceed as in the article above (ie, use the 'dd' command). As always, be careful or you can wipe your main hard drive!
Carl M @ Mar 23rd 2007 11:32PM
To add one more bit about Cygwin and /dev names:
Use the Windows Disk Manager (right-click on My Computer, Manage, Disk Management) to find out the Windows drive number for every attached disk. Then just convert:
Disk 0 -> /dev/sda
Disk 1 -> /dev/sdb
Disk 2 -> /dev/sdc
etc.
Skylar @ Mar 24th 2007 5:23PM
ENOUGH APPLE TV CRAP, OMG IM GOING TO PUKE IT ISNT EVEN A UNIQUE PRODUCT ENOUGH
zmanforever @ Mar 24th 2007 12:03AM
Hey scottstrash, no offense, but how the hell can an iPod get up to 1080i resolution via and HDMI adapter. Sorry but the apple tv and ipod are 2 really different things.
scottstrash @ Mar 24th 2007 12:43AM
alright, sounds viable. but i thought the appletv put out at 720p - that and if they had a high quality dock for the ipod, you could store high quality/play high quality files off it - sure apple tv can do this - and at your high def; but i'm just saying it seems like they are really releasing this device, a plugged in; modified ipod (minus a screen, plus networking ability - which may not be far off on the ipod) or maybe more of what i'm saying is if they made a better dock for the ipod basically the same thing can be accomplished. yet, they dont allow any sort of menus' through ipod video when on a dock, with a remote.
zmanforever @ Mar 24th 2007 10:45AM
Sorry bud no such thing, no offense sounds like you havent even tried to connect your video ipod to your tv. It looks horrible, all blurry and grainy. If you look at the engadget modded pics of the apple tv the resolution they have it set to it 1080i. I understand what you mean by how you want one product to do this all, well it would have to be a big unit to fit all the processors in. Maybe in 2045 with the new iPhone lol.
Robinator @ Mar 24th 2007 2:43AM
Out of the box I still think this is an overrated product. Apple have done a great job with a nice UI etc but it is a very very limited product (compared to say XMBC).
Issues :-
(1) Does not stream! (if you have more than 40GB of media on your server - start getting selective!)
(2) Limited video format support (e.g. no DIVX, WMV etc)
(3) No true TV support (no TV streaming, recording, PVR functionality whatsoever)
(4) Limited HD (no 1080p for example)
For the price other greater alternatives exist, however it will still do well due to the Apple name.
Aaron @ Mar 24th 2007 5:10AM
Upgrading the drive, eh? Hmm. How about we first have a "How-to: Make your Apple TV useful in the first place"?
OK, so that sounds more like flamebait than I had intended, but I'm still not the first to say it: This thing is kinda lame.
Not Engadget's fault, though. Kudos for the haxx0ring skills, I always like to see that kind of stuff.
mike @ Mar 24th 2007 6:58AM
I think the Apple TV is going to be one of the most Mac Hacked devices ever! After all it does need some overhaul'n.
http://www.switchingtomac.com/
Jesus @ Mar 24th 2007 9:37AM
I thought this device was for non geeks? Who didn't want a hard setup. Seems like the product can either be:
A) Easy without much use
B) Somewhat useful without ease
t-bone @ Mar 24th 2007 9:42AM
I thought the extensive coverage of the iPhone was bad. Engadget, you don't have to post every single little bit about the iTV you can find. This is ridiculous.
Mike @ Mar 24th 2007 10:10AM
I don't know why people keep getting this wrong, but AppleTV does stream, and does it quite well. I have far more than 40GB of content on my Mac Pro and I just sync part of it-- the rest I am able to stream from both it and also from my Macbook Pro.
faddah @ Mar 24th 2007 10:15AM
ok, first, i'm counting the minutes and seconds until the author and engadget get slapped with with a big-apple-legal-death-star™ "cease-and-desist" order on this article, so i've saved it as a *.pdf just in case i ever buy one of these boxes.
#2 - does anyone know if there's a ROM upper limit as to the size of the hard drive built in? i know earlier desktop mac g4's from a couple years ago were crippled with only being able to see 128 gb on an ata drive, even if you bought a 250 gb or bigger. does anyone know if such a limit exists here? because it's easy enough to go out and find a 200gb drive for this puppy, but what if the ROM will see no more than 80 gb of it? i know there are software hacks around this sort of thing, but might be more trouble than it is worth on this kind of closed system.
JP @ Mar 24th 2007 6:41PM
They were not "crippled" as you say, it was a limitation of the drive controller that was used and it effected many computers of that age and older, not just macs.
Check out this article for the details;
http://en.wikipedia.org/wiki/Advanced_Technology_Attachment
(3rd paragraph up from the bottom of "History"
Basically though, if there is going to be an easily attainable size restriction, it will probably be that same 128GB limit.
obladda @ Mar 24th 2007 6:30PM
After resizing the media partition using gpt or pdisk do a fsck -yp /dev/disk2s4. It will see a lot of unallocated blocks that aren't in the free blocks table and with correct it. That's why you don't usually find a resize up utility on posix/unix/bsd systems. fsck has always had the grow function/assumption built in.
Chris @ Mar 24th 2007 10:25AM
9 hours to get the original disk image, and another 8 to write it back to the new disk. Ouch!
Robinator: It does stream. Maybe not from the 'net, but from other machines on the same LAN. (Who wants to watch youtube on an HDTV?)
Ben @ Mar 24th 2007 10:27AM
We're pretty sure this is a problem on our end, but didn't spend the time to figure out why. The first 9 hours was when we were sleeping and the second we were at work. If we used a linux live CD with real IDE bus,(rather than usb) it would prob take closer to 15 mins each.
zmanforever @ Mar 24th 2007 10:47AM
Now I did remember reading somewhere someone had made a high quality dock which was sending 1080p movies to a tv they were playing TOY STORY, it was here, but no release date and no real outcome from that, just someone did it, so I guess somewhat possible.
Nehemoth @ Mar 24th 2007 11:24AM
Course in windows this could be made more easy.
For the image use Norton ghost, for create the image or from a disk to disk copy (be track by track or raw, or other of so many option) and even more easy for the drive resize you would use partition magic or any other partition tool for windows.
Course in this upgrade i would prefer a 7200RPM disk...
Anyway very very cool....
PS . : Norton Ghost & Partition magic has progress indicators...
Larryi5 @ Mar 24th 2007 11:27AM
linux MCE pwns apple tv by a long shot
Ben @ Mar 24th 2007 6:33PM
Thanks obladda,
I just wrote a revision, once I test it I will update the post.
I am still trying to figure out a way to test this without having to start over completely and without buying another drive.
Ben @ Mar 25th 2007 10:55AM
I tried this and just using fsk says it is a bad superblock and no matter what super block I specified it was unsuccessful.
I also tried fsck_hfs -f and it doesn't find any problems, but the volume is still the original size despite the new size of the partition which is recognized in Diskutility.
Thanks
Charles Ying @ Mar 24th 2007 11:26PM
Ben, thanks so much for posting this article in such a timely manner.
First, can you confirm that 128GB is the limit due to the PATA bus so no use putting in any drive bigger than 128GB?
Second, after upgrading the disk, were there any more noise due to more fan use or heat issues?
Third, any hints that Apple will support external USB drive in the next firmware release?
Charles
Lar @ Mar 25th 2007 12:53AM
how long should the Media partition resize take with iPartition ?
obladda @ Mar 25th 2007 7:43PM
There is a much easier way than a long drawn out fsck. Make a sparse disk image backup or a tar backup of the Data partition. Delete and recreate the partition as a larger partition then restore the files from the mounted image or tar file.
Nathan @ Mar 24th 2007 9:48PM
wouldnt it be cool if you could have some sort of browser on this hey.. just an idea
Ben @ Mar 24th 2007 11:27PM
Charles,
I don't know of any limit.
I didn't notice any extra noise with the WD 80GB 5400 rpm drive I used.
No idea, but it is certainly possible.
James @ Mar 25th 2007 12:44AM
Aside from the geek-cred (which I appreciate), what the hell is the point of replacing the hard drive (or even having one in the first place)? The AppleTV streams beautifully over wireless G and especially N. NO lag, NO stutter. Why are people so obsessed over the most useless feature of this device? The hard drive just seems like a failsafe for me (should your network or computer go down for some reason).
Seriously, you can remove the hard drive from my AppleTV and I wouldn't even notice. Upgrading the hard drive on these things is like upgrading the spare tire for your car.
tg3 @ Mar 25th 2007 11:31AM
James @ Mar 25th 2007 12:44AM
"Aside from the geek-cred (which I appreciate), what the hell is the point of replacing the hard drive (or even having one in the first place)? The AppleTV streams beautifully over wireless G and especially N."
The point? Album art. Streamed music will not show the album covers, a problem for many of us that have >> 32G music.