An argument which is simply the name of a
device indicates that
pdisk should edit the partition table of that device.
The current top level editing commands are:
C (create with type also specified)
c create new partition
d delete a partition
h command help
i initialize partition map
n (re)name a partition
P (print ordered by base address)
p print the partition table
q quit editing (don't save changes)
r reorder partition entry in map
s change size of partition map
t change the type of an existing partition
w write the partition table
Commands which take arguments prompt for each argument in turn. You can also type any number of the arguments separated by spaces and those prompts will be skipped. The only exception to typeahead are the confirmation prompts on the
i and
w commands, since if we expect you to confirm the decision, we shouldn't undermine that by allowing you to be precipitate about it.
Partitions are always specified by their number, which is the index of the partition entry in the partition map. Most of the commands will change the index numbers of all partitions after the affected partition. You are advised to print the table as frequently as necessary.
The
c (create new partition) command is the only one with complicated arguments. The first argument is the base address (in blocks) of the partition. Besides a raw number, you can also specify a partition number followed by the letter ‘p' to indicate that the first block of the new partition should be the same as the first block of that existing free space partition. The second argument is the length of the partition in blocks. This can be a raw number or can be a partition number followed by the letter ‘p' to use the size of that partition or can be a number followed by ‘k', ‘m', or ‘g' to indicate the size in kilobytes, megabytes, or gigabytes respectively. (These are powers of 1024, of course, not powers of 1000.) The third argument is the name of the partition. This can be a single word without quotes, or a string surrounded by single or double quotes. The type of the created partition will be Apple_UNIX_SVR2, which is the correct type for use with
NetBSD. This command will prompt for the unix filesystem slice to set in the Block Zero Block bits.
The
C command is similar to the
c command, with the addition of a partition type argument after the other arguments. Choosing a type of Apple_UNIX_SVR2 will prompt for the unix filesystem slice to set in the Block Zero Block bits.
The
i (initalize) command prompts for the size of the device.
The
n (name) command allows the name of a partition to be changed. Note that the various "Apple_Driver" partitions depend on the name field for proper functioning. We are not aware of any other partition types with this limitation.
The
r (reorder) command allows the index number of partitions to be changed. The index numbers are constrained to be a contiguous sequence.
The
t (change partition type) command allows the type of a partition to be changed. Changing the type to Apple_UNIX_SVR2 will prompt for the unix filesystem slice to set in the Block Zero Block bits.
The
w (write) command writes the partition map out. In order to use the new partition map you must reboot.