VBoxManage modifyhd OSX\ Dev.vdi --resize 40960
Solves "MediaKit reports partition (map) too small" error from Disk Utility
- Mount virtual image via nbd
sudo qemu-nbd -c /dev/nbd0 OSX\ Dev.vdi
- Use
sudo gdisk /dev/ndb0
to destroy and recreate a partition table. - Unmount virtual image
sudo qemu-nbd -d /dev/nbd0
Solves "Couldn't modify partition map because file system verification failed" error from Disk Utility
- Boot OSX in single user mode (pass
-s
to bootloader) fsck -fy
- Boot OSX normally
- Open Disk Utility
- Select (now larger) drive on left
- Partition tab
- Drag up and then down
- Click Apply
Hi!
I've followed your instructions as closely as I could, but when I boot OSX, the drive is still the previous (smaller) size.
One point is not very clear to me: how to destroy and recreate the partition table. I ran the command (gdisk....) and then quit, but the disk size does not change in OSX.
If I try to make further manipulations in gdisk (deleting and re-adding the partitions), I can no longer boot OSX to single user mode: it keeps saying "still waiting for root device". I forgot to mention It's my root partition that I want to make larger.
Can you help me?
Samuel