How can I resolve the error "MediaKit reports partition (map) too small"?

I am unable to expand my Mac's hard disk. diskutility reports this error:

MediaKit reports partition (map) too small

How can I resolve this?


Solution 1:

If you start the GParted live cd: http://gparted.sourceforge.net/ On your system it will automatically detect and fix this issue. Best solution I found so far.

Solution 2:

Try to format your disk from the Terminal using diskutil command, for example:

  1. List all drives:

    diskutil list
    
  2. Unmount the drive (replace diskN with your drive):

    diskutil unmountDisk force diskN
    
  3. Erase boot sector with zeros (make sure you won't erase the wrong drive!):

    sudo dd if=/dev/zero of=/dev/diskN bs=1024 count=1024
    

    Warning: Above commands wipes all data on /dev/diskN, so make sure you've it correct!

  4. Partition using diskutil:

    diskutil partitionDisk diskN GPT JHFS+ "My External HD" 0g
    

Source: Disk Utility fails to erase/format an external HDD at reddit.

Solution 3:

This blog post was the only way I found to solve it, and it's not for the faint of heart. ;-)

http://blog.scottmroberts.com/archives/15

Basically the problem is that the GUID partition table is confused about the size of the drive. The only way to fix it is to purchase a tool that will correct the problem, or to manually correct the problem yourself by issuing commands to gpt to delete and recreate the partition table. You must create it exactly how it was before, including the partition types (UUIDs).

Also, you must be able to get a root prompt where the drive you're interested in isn't mounted. (for me, this meant popping in the install disk, booting from it, then quickly pressing Command-S to enter single-user-mode.)

Solution 4:

Why not just boot into single user mode? Hold down command+s on boot. Performcheck disk and then mount the drive.

Go to /Library/Caches and /System/Library/Caches and remove everything in those folders.

Then go to /private/var/db and remove BootCache.data, BootCache.playlist and .volinfodatabase. Reboot and use Disk Utility again. Just did this here and it worked moving from a 120GB SSD to a 250GB SSD. Was getting the dreaded medikit error too small or whatever.

You might just have to remove the .volinfodatabase. Try that first. If that doesn't work try the .volinfodatabase again and the BootCache files. If that doesn't work try what I tried.