1*008fa9baSkrw.\" $OpenBSD: pdisk.8,v 1.31 2016/02/23 03:34:17 krw Exp $ 2116aad93Sjmc.\" 3116aad93Sjmc.\" Copyright 1996,1997,1998 by Apple Computer, Inc. 4116aad93Sjmc.\" All Rights Reserved 5116aad93Sjmc.\" 6116aad93Sjmc.\" Permission to use, copy, modify, and distribute this software and 7116aad93Sjmc.\" its documentation for any purpose and without fee is hereby granted, 8116aad93Sjmc.\" provided that the above copyright notice appears in all copies and 9116aad93Sjmc.\" that both the copyright notice and this permission notice appear in 10116aad93Sjmc.\" supporting documentation. 11116aad93Sjmc.\" 12116aad93Sjmc.\" APPLE COMPUTER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE 13116aad93Sjmc.\" INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14116aad93Sjmc.\" FOR A PARTICULAR PURPOSE. 15116aad93Sjmc.\" 16116aad93Sjmc.\" IN NO EVENT SHALL APPLE COMPUTER BE LIABLE FOR ANY SPECIAL, INDIRECT, OR 17116aad93Sjmc.\" CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 18116aad93Sjmc.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, 19116aad93Sjmc.\" NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 20116aad93Sjmc.\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 21116aad93Sjmc.\" 22*008fa9baSkrw.Dd $Mdocdate: February 23 2016 $ 23ae2e8cefSmartin.Dt PDISK 8 2440a900baSdrahn.Os 2540a900baSdrahn.Sh NAME 2640a900baSdrahn.Nm pdisk 2740a900baSdrahn.Nd HFS(DPME) partition maintenance program 2840a900baSdrahn.Sh SYNOPSIS 2940a900baSdrahn.Nm pdisk 3068d0f91bSkrw.Op Fl lr 317fa76d5cSderaadt.Ar disk 3240a900baSdrahn.Sh DESCRIPTION 3340a900baSdrahn.Nm 34dce63815Sdrahnis a menu driven program which partitions disks using the standard Apple 35918d1947Sraydisk partitioning scheme described in 36918d1947Sray.Dq Inside Macintosh: Devices . 37ae2e8cefSmartinIt does not support the Intel/DOS partitioning scheme supported by 38d587cd26Sjmc.Xr fdisk 8 . 3940a900baSdrahn.Pp 4040a900baSdrahnThe options are as follows: 4140a900baSdrahn.Bl -tag -width Ds 4240a900baSdrahn.It Fl l 439c148747SkrwList the partition map for the specified 447fa76d5cSderaadt.Ar disk . 4540a900baSdrahn.It Fl r 46dce63815SdrahnPrevents 4740a900baSdrahn.Nm 487fa76d5cSderaadtfrom writing to the disk. 497fa76d5cSderaadt.It Ar disk 507fa76d5cSderaadtSpecify the 517fa76d5cSderaadt.Ar disk 527fa76d5cSderaadtto operate on. 537fa76d5cSderaadtIt can be specified either by its full pathname or an abbreviated disk form. 54*008fa9baSkrwIn its abbreviated form, the path to the device and the 557fa76d5cSderaadt.Sq r 567fa76d5cSderaadtdenoting 57*008fa9baSkrw.Dq raw device 58*008fa9baSkrware omitted, with the partition letter being optional. 597fa76d5cSderaadtFor example, the first IDE disk can be specified as either 607fa76d5cSderaadt.Pa /dev/rwd0c , 61*008fa9baSkrw.Pa wd0c , 627fa76d5cSderaadtor 63*008fa9baSkrw.Pa wd0 . 648764211bSmpech.El 6540a900baSdrahn.Sh COMMAND MODE 6640a900baSdrahnThe list of commands and their explanations are given below. 6740a900baSdrahn.Bl -tag -width "update" 686506bbe3Sjmc.It Em ?\& 699c148747Skrwverbose command help 7040a900baSdrahn.It Em C 7196a612b0Skrwcreate a partition of a specified type 729c148747Skrw.It Em c 739c148747Skrwcreate an 749c148747Skrw.Ox 759c148747Skrwpartition 7640a900baSdrahn.It Em d 7740a900baSdrahndelete a partition 789c148747Skrw.It Em f 7996a612b0Skrwfull display of a partition 809c148747Skrw.It Em h 819c148747Skrwcommand help 829c148747Skrw.It Em i 839c148747Skrw(re)initialize the partition map 849c148747Skrw.It Em n 859c148747Skrw(re)name a partition 869c148747Skrw.It Em P 879c148747Skrwshow the partition map's data structures 889c148747Skrw.It Em p 899c148747Skrwprint the partition map 9040a900baSdrahn.It Em q 919c148747Skrwquit editing 929c148747Skrw.It Em r 93d9e7eca0Skrwreorder (swap) disk positions of two entries in the partition map 949c148747Skrw.It Em s 959c148747Skrwchange the size of the partition map 969c148747Skrw.It Em t 9796a612b0Skrwchange the type of a partition 989c148747Skrw.It Em w 9996a612b0Skrwwrite the partition map to disk 10040a900baSdrahn.El 1013316fe2dSmpech.Pp 1027c688b09SkrwCommands which take arguments prompt for each argument not specified 1037c688b09Skrwin the original command. 1047c688b09SkrwYou can type any number of the arguments separated by spaces. 1053316fe2dSmpech.Pp 106dce63815SdrahnPartitions are always specified by their number, 107cac582dfSjmcwhich is the index of the partition entry in the partition map. 1087c688b09Skrw.Pp 1097c688b09SkrwThe index numbers of partitions will change if partitions are created, 1107c688b09Skrwdeleted or reordered. 1113316fe2dSmpech.Pp 1126c897cf8SdrahnCreating more than fifteen partitions is not advised, for 1136c897cf8Sdrahncompatibility reasons. 1143316fe2dSmpech.Pp 115dce63815SdrahnThe 11640a900baSdrahn.Em c 1175b6ed18dSjmc(create an 1185b6ed18dSjmc.Ox 1195b6ed18dSjmcpartition) and 1207c688b09Skrw.Em C 1217c688b09Skrw(create a partition of a specified type) 1225b6ed18dSjmccommands are the only ones with complicated arguments. 1237c688b09Skrw.Pp 124dce63815SdrahnThe first argument is the base address (in blocks) of the partition. 125dce63815SdrahnBesides a raw number, you can also specify a partition number followed 126dce63815Sdrahnby the letter 'p' to indicate that the first block of the new partition should 127dce63815Sdrahnbe the same as the first block of that existing free space partition. 1287c688b09Skrw.Pp 129dce63815SdrahnThe second argument is the length of the partition in blocks. 130dce63815SdrahnThis can be a raw number or can be a partition number followed by the 131dce63815Sdrahnletter 'p' to use the size of that partition or can be a number followed 1323158466dSkrwby 'k', 'm', 'g', or 't' to indicate the size in kilobytes, megabytes, 1333158466dSkrwgigabytes or terabytes respectively. 134dce63815Sdrahn(These are powers of 1024, of course, not powers of 1000.) 1357c688b09Skrw.Pp 1367c688b09SkrwThe third argument is the name of the partition. 137dce63815SdrahnThis can be a single word without quotes, or a string surrounded by 138dce63815Sdrahnsingle or double quotes. 1393316fe2dSmpech.Pp 1407c688b09SkrwFor the 14140a900baSdrahn.Em C 1427c688b09Skrwcommand only, the fourth argument is the partition type. 1437c688b09SkrwThis can be a single word without quotes, or a string surrounded by 1447c688b09Skrwsingle or double quotes. 1457c688b09SkrwThe 14640a900baSdrahn.Em c 1475b6ed18dSjmccommand automatically uses the type 1485b6ed18dSjmc.Ox . 1493316fe2dSmpech.Pp 150dce63815SdrahnThe 15140a900baSdrahn.Em n 152dce63815Sdrahn(name) command allows the name of a partition to be changed. 153dce63815SdrahnNote that the various "Apple_Driver" partitions depend 154dce63815Sdrahnon the name field for proper functioning. 1552b65e200Sjmc.Sh SEE ALSO 1562b65e200Sjmc.Xr disklabel 8 , 157b42d9302Smartin.Xr fdisk 8 , 158b42d9302Smartin.Xr newfs 8 159b42d9302Smartin.Sh HISTORY 160b42d9302SmartinThe 161b42d9302Smartin.Nm 1627c688b09Skrwwas originally developed for MkLinux. 1633158466dSkrw.Pp 1643158466dSkrwIt was ported to 1653158466dSkrw.Ox 1663158466dSkrw2.9 by Dale Rahn. 1672b65e200Sjmc.Sh AUTHORS 168b42d9302Smartin.An Eryk Vershen 169