NAME
pdisk
—
HFS(DPME) partition maintenance
program
SYNOPSIS
pdisk |
[-lr ] disk |
DESCRIPTION
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:
-l
- List the partition map for the specified disk.
-r
- Prevents
pdisk
from writing to the disk. - 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.
COMMAND MODE
The list of commands and their explanations are given below.
- ?
- verbose command help
- C
- create a partition of a specified type
- c
- create an OpenBSD partition
- d
- delete a partition
- f
- full display of a partition
- h
- command help
- i
- (re)initialize the partition map
- n
- (re)name a partition
- P
- show the partition map's data structures
- p
- print the partition map
- q
- quit editing
- r
- reorder (swap) disk positions of two entries in the partition map
- s
- change the size of the partition map
- t
- change the type of a partition
- w
- 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.
SEE ALSO
HISTORY
The pdisk
was originally developed for
MkLinux.
It was ported to OpenBSD 2.9 by Dale Rahn.
AUTHORS
Eryk Vershen