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?
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.
This blog post was the only way I found to solve it, and it's not for the faint of heart. ;-)
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.)
Try to format your disk from the Terminal using
diskutil command, for example:
List all drives:
Unmount the drive (replace
diskN with your drive):
diskutil unmountDisk force diskN
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!
diskutil partitionDisk diskN GPT JHFS+ "My External HD" 0g
Source: Disk Utility fails to erase/format an external HDD at reddit.
I know it is a late response. Now only I faced this issue and I find out this blog INCREASE DISK AND PARTITION SIZE IN OS X. This solved me my issue. I am posting this because this might help someone else I hope.
Why not just boot into single user mode? Hold down command+s on boot. Performcheck disk and then mount the drive.
/System/Library/Caches and remove everything in those folders.
Then go to
/private/var/db and remove
.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.
Not necessarily a useful answer, but I fixed this problem in Yosemite by using the Repair disk option in Disk Utility. Using OSX in virtualbox, on a virtualbox host, and I changed the dynamic disk size, but OSX wouldn't allow me to resize the partition (with the error in the original question)
New in Mavericks apparently, you can boot from the installer media (cd or thumb drive) and use it's disk utility.
This works because it skips all the cached information about the drive that Jens Erat mentioned in his comment. You might notice that around step 5/6 disk utility will take some time to analyze your disk, which it doesn't do when you've booted normally. That's a good thing.
By the way, this does not work in recovery mode. Recovery Mode looks very similar to the booting from the install media. But recovery mode still boots off of the harddrive you're trying to repartition, and that causes problems.
(Thanks to Dennis at my job for helping me figure this out)
I was able to fix this issue by resetting the NVRAM (command+option+p+r at boot).
I had this problem when trying to remove some linux partitions from the disk. Reformatting them as MacOS partitions made it possible to remove them afterwards.