pdisk

pdisk

 pdisk pdisk   device   { -diskSize  -isDiskPartitioned  -dump  -blockSize   -initialize } pdisk   device   { -partitionEntry  -partitionName  -partitionType   -partitionBase  -partitionSize  -deletePartition }   part_num   pdisk   device   { -setWritable  -setAutoMount }   part_num   { 0  1 }pdisk   device     -   makeBootable   part_num boot_addr boot_bytes load_addr goto_addr   pdisk   device -   createPartition   part_name part_type part_base part_size   pdisk   device -   splitPartition   part_num part1_size part2_name part2_type   pdisk   device -   getPartitionOfType   part_type instance_num   pdisk   device -   getPartitionWithName   part_name instance_num   

Description

Provides control over Apple partition maps on disk devices in Macintosh systems.

Options/Usage


-blockSize

Prints the block size of the specified device, in bytes, to standard output.


-createPartition

Adds a partition to the partition map with the specified name , type (such as Apple_HFS or Apple_UFS ), base (i.e., starting block number), and size (in blocks).


-deletePartition

Deletes the specified partition from the partition map.


-diskSize

Prints the size of the specified device, in megabytes, to standard output.


-dump

Prints the partition map on the specified device to standard output.


-getPartitionOfType

Prints the number of a partition with the specified type to standard output. An instance_num of refers to the lowest -numbered partition of the specified type, 1 refers to the second partition of that type, etc.


-getPartitionWithName

Prints the number of a partition with the specified name to standard output. An instance_num of refers to the lowest-numbered partition with the specified name, 1 refers to the second partition of that name, etc.


-initialize

Creates a partition map on the device.


-isDiskPartitioned

Returns 0 if the device has an Apple partition map on it, 1 if not.


-makeBootable

Sets the startup bit on a partition. This is unused by Mac OS X.


-partitionBase

Prints the starting block number of the specified partition to standard output.


-partitionEntry

Prints a line to standard output containing the name, type, base, and size of the specified partition.


-partitionName

Prints the name of the specified partition to standard output.


-partitionSize

Prints the size of the specified partition, in blocks, to standard output.


-partitionType

Prints the type of the specified partition to standard output.


-setAutoMount

Sets ( 1 ) or clears ( ) the automount bit on a partition. This option is unused by Mac OS X.


-setWritable

Sets ( 1 ) or clears ( ) the writable bit on a partition.


-splitPartition

Splits an existing partition in two. The arguments include the size (in blocks) of the first partition formed from the split, and the name and type of the second partition.


device

The disk device filename, e.g., /dev/disk0 .

Commands

pdisk enters interactive mode when invoked without arguments. Interactive commands that take arguments will prompt for any that are missing.


?

Displays a summary list of commands.


a

Toggles the abbreviate flag. When in abbreviate mode, partition type names are shortened . For example, Apple_HFS is displayed as HFS .


d

Toggles the debug flag. When in debug mode, some extra commands are enabled, including commands to display block contents and partition map data structures.


e device

Edits the partition map on a device.


E device

Should open a partition map for editing after prompting for a redefinition of the logical block size from the default 512 bytes, but doesn't appear to work at present.


h

Displays a summary list of commands.


l device

Displays the partition map on a device.


L

Displays the partition maps on all devices.


p

Toggles the physical flag. When in physical mode, block positions and sizes are reported according to the physical limits of the partitions, which may not be the same as their logical limits.


q

Quits interactive mode.


r

Toggles the read-only flag. When in read-only mode, changes to the partition map are disallowed .


v

Prints the version number and release date of pdisk . (The output is currently far out of date, listing a release in 1997, when it was still used for MkLinux.)


x device block_num

Displays the contents of the block given by block_num . While it always appears to produce a bus error when called at this level, the same functionality is available from an expert level while editing a map, where it does work.

Location

/usr/sbin



Mac OS X Panther for Unix Geeks
Mac OS X Panther for Unix Geeks
ISBN: 0596006071
EAN: 2147483647
Year: 2003
Pages: 212

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net