Kevin: January 2008 Archives

Re-Upgrading the AppleTV

user-pic
Vote 0 Votes

Let me just say something that might come as a surprise to you: I didn't follow the directions. I came close, but varied a little and now my AppleTV won't update its software to 1.1 (or 2.0) leaving me with update envy.

But really, who follows directions, anyway? I mean, I'm a man and I... should have followed the directions.

AppleTV info

What you see in this image is the way Engadget says AppleTV's partitions should look (as provided in the directions I used to update my AppleTV several weeks ago). I had followed the directions to a point when I funny thing happened. My third partition (the OSBoot partition) came up a bit small when I copied it over. I noticed the difference but decided to press on. When I finished up, hooked the Apple TV to the television and fired it up it forced me to restore the OS from the second partition before it would go into the OSBoot. Basically the AppleTV noticed something was wrong and helped me restore, which worked well. However, my OSBoot was 1.1 and my original (default) OS on this machine was 1.0 so it restored the older version. The 1.0 version worked normally and all was basically well. Until I tried to update to v1.1.

Everything downloaded and attempted to update but the installer failed. This was repeatable. So here I am cracking open the AppleTV again so I can try and fix the partition problem above and get back on the road to update nirvana.

[time passes]

So, looking back at my 100G installation on the AppleTV using gpt show disk1 I can see that my Index 1 partition starts at 69672 like the Engagdet sample, but it doesn't really need too as far as I can tell. I think I need to start this over using some other resources to get my partitions set up correctly. Basically my Index 1 needs to be 69632 in size, Index 2 needs to be 819200 in size, Index 3 needs to be 1843200 in size, and Index 4 needs to be as large as possible.

I need to remove all of the partitions and basically start over. However, it is important to note that the image above from Engadget does not contain the correct partition types! Here is what the stock partition scheme looks like on the AppleTV (albeit on my larger drive):

$ diskutil list /dev/disk1
/dev/disk1
   #:                   type name               size      identifier
   0:  GUID_partition_scheme                    *93.2 GB  disk1
   1:                    EFI                    34.0 MB   disk1s1
   2:         Apple_Recovery                    400.0 MB  disk1s2
   3:              Apple_HFS                    900.0 MB  disk1s3
   4:              Apple_HFS                    35.8 GB   disk1s4

Notice the type names: 1 is EFI, 2 is Apple_Recovery, 3 and 4 are Apple_HFS. If you look at the image and compare the types (5265636F-7665-11AA-AA11-00306543ECAC is the Apple_Recovery type) you'll see that Engadget has switched some things around. Anyways, now that I know not to create the types like they did but rather like the original partition map, here we go:

$ gpt remove disk1
gpt remove: /dev/disk1: 4 partition(s) removed
$ gpt show disk1
      start       size  index  contents
          0          1         PMBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34  195371501         
  195371535         32         Sec GPT table
  195371567          1         Sec GPT header

I'll need to recreate the partitions completely by hand, restoring them from my backup images as we go. (Click eject on the popup window)


$ gpt add -b 40 -s 69632 -i 1 -t efi /dev/disk1
$ dd if=EFI.img of=/dev/disk1s1
69632+0 records in
69632+0 records out
35651584 bytes transferred in 51.885985 secs (687114 bytes/sec)
$ diskutil eject disk1
Disk disk1 ejected

That was the EFI, obviously.


$ gpt add -b 69672 -s 819200 -i 2 -t 5265636F-7665-11AA-AA11-00306543ECAC /dev/disk1
$ dd if=OS.img of=/dev/disk1s2
819152+0 records in
819152+0 records out
419405824 bytes transferred in 626.266043 secs (669693 bytes/sec)
$ diskutil eject disk1
Disk disk1 ejected

That was the Recovery (OS) portion which helped me out last time.


$ gpt add -b 888872 -s 1843200 -i 3 -t hfs /dev/disk1
$ diskutil eject disk1
Disk disk1 ejected
$ dd if=OSBoot.img of=/dev/disk1s3
1843192+0 records in
1843192+0 records out
943714304 bytes transferred in 1307.644496 secs (721690 bytes/sec)
$ diskutil eject disk1
Disk disk1 ejected

In my first post I suggested that maybe you could proceed without copying the OSBoot image over to Index 3 and I tried this several times without success. Each time I tried to format Index 3 as HFS+ it removed my Index 1 partition and I had to start over, so don't try it. But we can format Index 4 this way.


$ gpt add -b 2732072 -i 4 -t hfs /dev/disk1
$ diskutil eject disk1
Disk disk1 ejected
$ diskutil eraseVolume "Journaled HFS+" Media /dev/disk1s4
Started erase on disk disk1s4

Erasing

Mounting Disk

Finished erase on disk disk1s4 Media
$ diskutil eject disk1
Disk disk1 ejected

Now we can see the new partitions -- they are almost ready to go:

$ gpt show disk1
      start       size  index  contents
          0          1         PMBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6         
         40      69632      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
      69672     819200      2  GPT part - 5265636F-7665-11AA-AA11-00306543ECAC
     888872    1843200      3  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
    2732072  192639463      4  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  195371535         32         Sec GPT table
  195371567          1         Sec GPT header

[Here is a guide for reading the types of GPT partitions over at Wikipedia.]

Finally a little cleanup.


$ sudo rm -rf /Volumes/OSBoot/.Spotlight-V100
Password:
$ sudo rm -rf /Volumes/Media/.Spotlight-V100
$ diskutil eject disk1
Disk disk1 ejected

[You could probably also cleanup the .Trashes but I didn't.]

And it works. Version 1.1. Now I'm waiting for the 2.0 release sometime later this month!

Upgrading the AppleTV

user-pic
Vote 0 Votes

AppleTV

Just wanted to post some links here that I used to upgrade the harddrive in our AppleTV from the 40GB it came with to a 100GB drive. There are many how-to guides available to walk through the process, but none of them were able to keep me from ripping the rubber mat that makes up the bottom of the box. And a big thank you goes out to my brother who aided my cause with a late-night meeting where he gave me his Torx screwdriver set that I needed. I never start these projects early enough...

As I prepared to go to bed for the night, letting the dd disk copy do its thing on the whole 37GB of the useable disk (of which only about 1.4GB was actually information) I stumbled upon this page showing a faster route by which only the first 3 partitions are copied over, saving a ton of time. So instead of this torn apart machine on the dining room table for the next couple of days, I was able to get the transfer done before it got terribly late. Really there is no difference in the directions as far as the outcome (other than the time savings) because either way you are recreating the Media partition.

And now we have about twice the space on our AppleTV. Time will tell if there are any adverse effects to the switch, but I feel good about switching in a 4200RPM drive instead of the faster and hotter 5400RPM drives some have tried.

UPDATE: I'm just guessing here, but I really think that a person could just copy over the EFI and the backup OS partitions and not worry about the other two main partitions' data. The partitions would probably need to be created, but you could do that in much the same way as you create the expanded Media partition. I think the outcome would be that the machine would do a factory restore, which is what I ended up having to do anyway after I mistakenly selected the "streaming only" option in the initial setup. I'm quite sure it redoes (maybe even fixes the partitions?) of the OSBoot and Media partitions during that time. If I had more time, I would check that out because it would cut the time to do this upgrade down by half or more.

Happy New Year

user-pic
Vote 0 Votes

Happy New Year 2008!

Last year I made several predictions which I'll repeat here:

+ We will still be living at 542 W Park St Ext (barring catastrophe) in 2008
+ Sydney's hair will be straight
+ We will have grass in our front yard instead of mud
+ Jill and I will finally eat at Eddie Merlot's

Got them all pretty much right. We are still living at the home on Park Street; Syd's hair is mostly straight, although it might be curling up some; we do have grass in the front yard except for where I drove through the snow last week; Jill and I did eat at Eddie Merlot's, but won't be going back.

2007 kids photo

As for the present... Here's a picture that we took the other day with the kids in their "Christmas clothes" -- looking good!

Now for the future... I predict that:

+ we will have a baby girl and she'll be our last for at least many, many years
+ Jill will have a new vehicle by the end of the year
+ Sydney will walk by February
+ baby Reid will sleep through the night in the first two weeks she's home
+ we will have a snowfall of over 18" in one day this winter
+ we will have a terabyte of storage for photos and movies by the end of the year (currently we have about 1/4 of that)

I don't go too far out on a limb, as you can tell.

Before you go, check out our family page with this year's updated pictures!

About this Archive

This page is an archive of recent entries written by Kevin in January 2008.

Kevin: December 2007 is the previous archive.

Kevin: February 2008 is the next archive.

Find recent content on the main index or look in the archives to find all content.