Obligatory warning: You seem to have found your way to fdisk
. Keep in mind that, like most BSD-Unix-style command line fdisk
tools, the Mac OS X fdisk
's editing feature does not 'do' safeguards, it has even less safeguards than whatever other platform's command line fdisk tool you're thinking of. It will happily let you accidentally use the erase
command (which removes all the partitions) or edit a partition that Mac OS X is currently using (rendering your system unbootable) and even has few safeguards against putting numbers that just plain don't make any sense under any circumstances right into the partition table, so please be careful. Its only saving grace is that the changes are only in memory until it writes them, so if you are careful you can exit
without saving.
You can use fdisk
in interactive mode to edit the entries in the partition table. For instance, to edit the partition table on disk 1:
sudo fdisk -e /dev/rdisk1
Then edit your first blank partition table entry (e.g. edit 3
), set it to type AF
, press return for the default to the CHS mode
question, press return to accept the default of starting the partition after the end of the last one, then enter the end sector number you want (the default is the end of the disk; to figure out one for a size you want: divide the size you want by 512 bytes to get the number of sectors you want, and then add that to the start sector number and subtract one to get the end sector number ). Do a print
to make sure it looks okay (nothing has been saved yet, so if there's a mistake you can just exit
(not quit
) at this point and run fdisk
again to start from the beginning.) Then write
to save the partition table over the old one on the disk. Then exit
.
If you get a warning at write
that the changes will require a reboot, that's okay; answer y
, and reboot Mac OS X after exit
ing.
Now the partition table has been updated, but the partition itself still has the whatever old blocks of data were in that space before; Run Disk Utility, and from the Erase tab, choose the new partition, give it a name, and Erase it.
For all my partitioning, I use and recommend iPartition. It will allow you to resize partitions without deleting any data. It also works for Boot Camp volumes and other PC disks.
With iPartition, resizing a partition is as simple as selecting it, grabbing the resize handle and dragging. Not only that, but if you have several operations to perform, iPartition lets you queue them up and run them one after another, so you can have a cup of coffee while iPartition works. This feature, coupled with iPartition’s ability to automatically rearrange your existing partitions when necessary, makes iPartition the easiest partitioning tool that you’ll ever use.
Best Answer
Use the following steps.
Open the Disk Utility application. Highlight the appropriate drive. Below is an example.
Click the the icon labeled Partition. The following popup pane will appear.
Determine the size you want for the new partition. Subtract this value from the size of the current partition. In this example, I need a 30 GB partition, so the difference will be 69.656 GB. Replace the current "Size:" value with this difference, then press the return key. Below is the result.
Highlight the new partition by clicking on the pie piece.
First, select the "Format:", then enter a name in the "Partition:" field. Finally, click on the "Apply" button.
When finished, click on the "Done" button.
The final result is shown below.