Manual Page Search Parameters

PDISK(8) System Manager's Manual PDISK(8)


pdiskHFS(DPME) partition maintenance program


pdisk [-lr] disk


pdisk is a menu driven program which partitions disks using the standard Apple disk partitioning scheme described in “Inside Macintosh: Devices”. It does not support the Intel/DOS partitioning scheme supported by fdisk(8).
The options are as follows:
List the partition map for the specified disk.
Prevents pdisk from writing to the disk.
Specify the disk to operate on. It can be specified either by its full pathname or an abbreviated disk form. In its abbreviated form, the path to the device and the ‘r’ denoting “raw device” are omitted, with the partition letter being optional. For example, the first IDE disk can be specified as either /dev/rwd0c, wd0c, or wd0.


The list of commands and their explanations are given below.
verbose command help
create a partition of a specified type
create an OpenBSD partition
delete a partition
full display of a partition
command help
(re)initialize the partition map
(re)name a partition
show the partition map's data structures
print the partition map
quit editing
reorder (swap) disk positions of two entries in the partition map
change the size of the partition map
change the type of a partition
write the partition map to disk
Commands which take arguments prompt for each argument not specified in the original command. You can type any number of the arguments separated by spaces.
Partitions are always specified by their number, which is the index of the partition entry in the partition map.
The index numbers of partitions will change if partitions are created, deleted or reordered.
Creating more than fifteen partitions is not advised, for compatibility reasons.
The c (create an OpenBSD partition) and C (create a partition of a specified type) commands are the only ones 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', 'g', or 't' to indicate the size in kilobytes, megabytes, gigabytes or terabytes 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.
For the C command only, the fourth argument is the partition type. This can be a single word without quotes, or a string surrounded by single or double quotes. The c command automatically uses the type OpenBSD.
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.


disklabel(8), fdisk(8), newfs(8)


The pdisk was originally developed for MkLinux.
It was ported to OpenBSD 2.9 by Dale Rahn.


Eryk Vershen
February 23, 2016 OpenBSD-current