(this is just raw draft for a hint at Mac OS X Hints. As soon as it has been published I will clean up and format it)

Apple's Disk Utility wastes 128 MB of HD space for every partition it creates.

On my PB with a 40GB disk and 3 partitions (system, user, swap) this corresponds to about 1% of wasted spave (384 MB). This is output from pdisk for that disk:

/dev/rdisk0 map block size=512
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1
2: Apple_Free 0+@ 64
3: Apple_HFS Apple_HFS_Untitled_2 9961472 @ 262208 ( 4.8G)
4: Apple_Free 0+@ 10223680
5: Apple_HFS Apple_HFS_Untitled_3 4225792 @ 10485824 ( 2.0G)
6: Apple_Free 0+@ 14711616
7: Apple_HFS Apple_HFS_Untitled_4 63166384 @ 14973760 ( 30.1G)
8: Apple_Free 0+@ 78140144

(your output might look slightly different; for no appearant reason my two PB:s pdisk out varies a little)

These Apple_Free parts are completely unnecessary and can be removed.

I won't tell exactly how to repartition your drive because if you can't figure out that yourself you probably shouldn't do it but I will give some hints on the way:

• You have to boot into single user mode (cmd - s), otherwise you will get an error message »The map is not writeable.».

• It is not until you do [w]rite the partition table something actually changes. Until then you can quit at any moment without risk.

• Let the first partition remain untouched:

1: Apple_partition_map Apple 63 @ 1

Also, save 16 blocks (=8 kB) at the end of the partition table:

5: Apple_Free Extra 16 @ 78140144

I don't know what the last 16 blocks are for but they have been there since I used pdisk for the first time on my 9600 1997.

• Just use the base of the Apple_Free as start point for the next partition on.

If you have no means for backup you shouldn't try this hint. With that said, you can split one partiton into two (or more) without losing your data if you first defragment the partition and put all data at the beginning of the partition. You can also merge two partitions and keep the data on the first partition (the data of the second partition will disappear).

If someone know exactly how big partitions any number of swapfiles requires please comment this hint. It would be nice to create a swap partition that wastes a minimum amount of space.

(To Rob G, I can add the details about changing the partition map, basically you do

1. e /dev/rdisk0

2. p

3. d
[enter the number of the partition you want to delete]
repeat 3 until you have deleted all partitions you want to change

4. c
[first block]
[length in blocks]
[name of partition]
repeat 4 until you have created all partitions as you like

5. w <-- it is not until now something destructive happens

6. restart

but I don't think people who can't figure out this themselves should play with pdisk. Let me know if you want me to add this to the hint/rewrite it)

[an error occurred while processing this directive]