Talk:Prepare a Hard Drive

From AwkwardTV
Revision as of 17:28, 17 July 2009 by Maury Markowitz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In the article there are references to /dev/disk4. I think that is supposed to be /dev/disk2 (which makes sense).

I believe you are correct. I've taken the liberty of changing the reference to /dev/disk2.

-- 2 notes from my rebuild experience...
1) I seemed to have issues doing this step by step the first time with a new drive... seemed that once I went step by step thru the whole thing more than 2 times it started to go as described. Not new to all this either, I even customized my restore image a while back to include SSH, so I'm confident that I was following the directions, but what the result I had wasn't matching what this pages was saying I should have. It's odd to describe, but it seemed like I had to have the OSBoot and Media partitions formated before I issued the GPT add commands for the respective partitions, which is almost what happens if you do all the steps, some not working, then do the whole thing again starting by destroying the GPT, but as soon as you read the GPT partitions, it senses that the partition is already formated and things seemed to start working.
2) Maybe we can change all /dev/disk2 references to a disk number less likely for someone to have? In my "infinite wisdom" i copied and pasted a command, forgot to change disk2s3 to disk8s3 (in my case)... and poof... there whet the "Boot OSX" partition on disk 2 of a 4 disk RAID set. Not certain if i've done serious damage yet or not as I still need to reboot and check. Anyhow, /dev/disk99 is my suggestion. --Jasonrm 07:29, 13 February 2008 (CET)

Empty GPT layouts including partition type + GUID for recovery

Could someone maybe construct empty layouts including partition type and GUID for the recovery partition and then dd+gz them for several disk sizes? If you don't have a MacOS hanging around it's hard to reconstruct the partition table. Linux is able to handle the GPT tables but parted and the like don't know about the GUID that is required for the recovery partition. --Heinz Peter 10:20, 18 February 2008 (CET)

The standard parted does not know about setting the proper GUID for the recovery partition. A patched parted does. See the linux forums as there are detailed instructions for creating a patched parted.

GPT and dd dont mix well. GPT has a secondary partition map at the end of the disk sectors. This means that a correct GPT formatted disk involves knowing the exact number of sectors. When you dd a disk, you can restore back to the original because the max number of sectors is the same. When you dd to another disk, the max sectors can be different and the secondary partition map is not placed in the correct position. For cloning a disk with proper GPT tables, you must create the GPT partitions from scratch then dd the individual partitions.

Found the solution by using a FreeBSD based system - I will document that. --Heinz Peter 22:29, 18 February 2008 (CET)


I have lots of time on my hands this weekend, so I tried the simple method:

  • put old drive in mac
  • sudo dd if=/dev/disk2 of=appletv.dmg bs=1m
  • put new drive in mac
  • sudo dd if=appletv.dmg of=/dev/disk2 bs=1m
  • put new drive in ATV
  • factory restore

The drive still says it's 32 gig. Any ideas?

After several tries, I can report that the "simple alternative method" does not work as documented. Maury Markowitz 19:28, 17 July 2009 (CEST)