DISKPREP(8) FreeBSD System Manager's Manual DISKPREP(8) NAME diskprep -- a program to prepare disks for use based on a config file SYNOPSIS diskprep [--config configfile] [--label label] disk DESCRIPTION The diskprep program prepares a disk for use. The disk is specified as the device name relative to /dev. For example /dev/ad0 would become ad0. If no --config option is given, the disk is partitioned with one slice containing a disklabel with a single UFS file system occupying the entire disk. If the --label option is given or a label is specified in the con- fig file, glabel(8) is used to label the device. CONFIGURATION FILE When the -config option is given, the disk's configuration is given the values in the configfile. The file is a perl(1) fragment defining a hash named %slices. Each element of %slices is a slice number from 1 to 4. For each slice, A size in blocks and type should be defined. The type is the MBR partition type. One slice may have a size of `*' which desig- nates that it will consume all space left by the others. For FreeBSD the type is 165 or $fbsd_type. A label may also be defined. For UFS partitions, the label will be a UFS label. For other types an glabel(8) label will be applied. Addition- ally, an action may be defined to prepare the slice. The action is a command to be executed. Before execution, all instances of `__DEVICE__' in the action are replaced with the path to the slice. If no action is given and the slice is a FreeBSD partition, the slices a-h (excluding c) may be defined by type and size variables. The size argument is in blocks and allows on partition to specify a size of `*'. The type is the fstype as used by disklabel(8). In addtion to the slices hash, the $label variable may be set to set the drive's label. The following config file produces the same result as calling diskprep without the -config option: $slices{1}{type} = $fbsd_type; $slices{1}{size} = '*'; $slices{1}{'a'}{type} = "4.2BSD"; $slices{1}{'a'}{size} = "*"; FILES share/examples/diskprep SEE ALSO disklabel(8), fdisk(8), newfs(8) AUTHORS The original version of diskprep was written by M. Warner Losh based on the prep.fla.sh script by Poul-Henning Kamp . This version of was enhanced to support multiple/non-bsdlabel slices and documented in this manual page by Brooks Davis for The Aerospace Corporation. FreeBSD 7.0 July 10, 2003 FreeBSD 7.0