Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When trying to install OS X Maverick on top of Mountain Lion, the installer refuses to install on the "Macintosh HD" partition saying "This disk cannot be used to start up your computer."

My disk has both HFS+ and NTFS partitions (for "Bootcamp" -- I actually have two Windows installations in addition to OS X!), and has a GPT partition table with "hybrid MBR". I'll show my current partition tables as gdisk output:

Command (? for help): p
...
Number  Start (sector)    End (sector)  Size       Code  Name
   1          409640      1089313135   519.2 GiB   AF00  Apple HFS/HFS+
   2      1089313136      1090582671   619.9 MiB   AB00  Apple boot
   3      1142583296      1361793023   104.5 GiB   0700  Microsoft basic data
   4      1361795072      1465147391   49.3 GiB    0700  Microsoft basic data

Switching to "extra functionality" mode:

Command (? for help): x

Printing the protective MBR:

Expert command (? for help): o

...
Number  Boot  Start Sector   End Sector   Status      Code
   1                     1   1465149167   primary     0xEE
share|improve this question
    
Please post detailed partition information on your disk. Something like the gdisk output in Ilya's answer would be good. Be sure that the output includes the start and end points of all partitions and partition type code data. (If you don't know what this means, just download gdisk and show its p output on your disk.) Edit your original question to show this information. –  Rod Smith Dec 17 '13 at 4:59
    
@RodSmith LOL at treating as as a different person :) but sure, I will. –  Ilya Dec 17 '13 at 12:51

1 Answer 1

While there can be many causes (and unfortunately, the OSX Installer Log gives no hints), in my case my GPT was missing an "EFI System" partition -- i.e. while I had an EFI partition on the disk, it was missing from the GPT.

While it didn't stop the system from booting, it did stop Maverick from considering it a startup-able disk.

To restore a lost partition, the best bet is to use TestDisk, although if you know precisely your lost partition's start/end sectors, you can use gdisk as well. (gdisk can be used from within your running OS X system -- no need to boot into recovery.)

In my case, I ran TestDisk to find the lost partition, then added it with gdisk. In my case, the EFI System partition was from sector 40 to sector 409639 (yours may vary). Here are the gdisk commands to restore it.

First I print my current partition table:

Command (? for help): p
...
Number  Start (sector)    End (sector)  Size       Code  Name
   1          409640      1089313135   519.2 GiB   AF00  Apple HFS/HFS+
   2      1089313136      1090582671   619.9 MiB   AB00  Apple boot
   3      1142583296      1361793023   104.5 GiB   0700  Microsoft basic data
   4      1361795072      1465147391   49.3 GiB    0700  Microsoft basic data

Notice that the EFI Boot partition is missing. IF YOU HAVE AN EFI BOOT PARTITION AT THIS POINT, THEN YOUR PROBLEM IS DIFFERENT AND MY ADVICE IS USELESS TO YOU. PLEASE DON'T BLINDLY TAKE IT. MESSING WITH YOUR PARTITION TABLE IS DANGEROUS.

Next, adding a new partition from sector 40 to sector 409639. (You will notice my HFS partition starts at 409640 -- luckily, my EFI Boot partition is not overlapping with it :-)

Command (? for help): n
Partition number (5-128, default 5): 5
First sector (34-1465149134, default = 1090582672) or {+-}size{KMGTP}: 40
Last sector (40-409639, default = 409639) or {+-}size{KMGTP}: 409639
Current type is 'Apple HFS/HFS+'
Hex code or GUID (L to show codes, Enter = AF00): EF00
Changed type of partition to 'EFI System'

Next, we sort the partition table, because our EFI System partition is physically the 1st, not the 5th (as it was added).

Command (? for help): s
You may need to edit /etc/fstab and/or your boot loader configuration!

And here, printing the results:

Command (? for help): p
...
Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System
   2          409640      1089313135   519.2 GiB   AF00  Apple HFS/HFS+
   3      1089313136      1090582671   619.9 MiB   AB00  Apple boot
   4      1142583296      1361793023   104.5 GiB   0700  Microsoft basic data
   5      1361795072      1465147391   49.3 GiB    0700  Microsoft basic data

Finally, you should save your partition table. Make sure you know what you're doing. Messing with your partition table can be very dangerous!

P.S. If you want Windows 7 to work properly ("Bootcamp"), you have to create a "hybrid MBR" afterwards -- do this by going into gdisk's 'recovery and transformation options' (r) mode and then 'make hybrid MBR' (h).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.