|

|
|
|
hdiutil - manipulate disk images
SYNOPSIS
hdiutil verb [ options ]
DESCRIPTION
The hdiutil command uses the DiskImages framework to
manipulate disk image files. Common verbs include create,
mount, eject, and verify.
The rest of the verbs are: help, info, load, unload, con-
vert, flatten, unflatten, resize, and pmap.
VERBS
Each verb is listed with its description and individual
arguments. A sector is 512 bytes.
help display more detailed help.
info display information about the disk image driver
and any image files that might be currently
inserted
-verbose
be verbose; default is less output
load load the disk image driver
The disk image driver will be loaded by the Disk
Copy application or hdid(8) if an image file is
being inserted and the driver is not currently
loaded.
unload unload the disk image driver
convert imagefile -format format -o outfile [ options ]
convert imagefile to type format in outfile where
format is one of:
UDRW UDIF read/write image
UFBI UDIF entire image
UDRO UDIF read/only image
UDCO UDIF compressed image
UDRo UDIF read/only (obsolete format)
UDCo UDIF compressed (obsolete format)
UDTO DVD/CD-R master image
UDxx UDIF stub image
RdWr NDIF read/write image (deprecated)
Rdxx NDIF read/only image (deprecated, but
still usable on OS 9 and OS X)
ROCo NDIF compressed image (deprecated)
Rken NDIF compressed (obsolete format)
-align sector_alignment
default is 4 (2K)
-noext
don't add filename extension (.dmg, .img,
.toast, etc)
-pmap
add partition map
When converting a NDIF to a any variety of
UDIF, or when converting a partition-less UDIF
to UDIF, the default is true.
-quiet
no output; default is to generate output
-segmentSize [ sector_count ]
segment image into sector_count sectors
The default is 2*1024*1024 (1 GB segments).
-tasks task_count
When converting an image into a compressed
format, specify the number of processors to
use for the compression operation. Default is
the number of processors on the computer.
-verbose
be verbose; default is less output
create imagename
imagename must not already exist.
-sectors sector_count
Specify the size of the image file in 512 byte
sectors. Note that this quantity includes the
space that might be used for a partition map
or other utility partitions. One of -sectors
or -megabytes must be specified.
-megabytes size
Specify the size of the image file in
megabytes (1024*1024 bytes). Note that this
quantity includes the space that might be used
for a partition map or other utility parti-
tions. One of -sectors or -megabytes must be
specified.
-layout <NONE|SPUD>
Specify the partition map layout in the image
file. NONE creates an image file with no par-
tition map. When inserted, a single /dev
creates an image file with a DDM and an Apple
Partition Scheme partition map, with a single
entry for an Apple_HFS partition. When
inserted, multiple /dev entries would be cre-
ated, and the 2nd partition would be the data
partition (i.e. /dev/disk1, /dev/disk1s1,
/dev/disk1s2). Images with partition maps can
be resizd. Default is SPUD.
-drivers pathToDriversBundle
unused
-zeroImage
Write zeros to all sectors in the image file
before writing any data structures. Default
is false.
-align sector_alignment
default is 8
-quiet
no output; default is to generate output
-verbose
be verbose; default is less output
eject device_entry
eject (unload) a disk image and terminate the
associated hdid process
-force
forcibly eject
Similar to umount -f. Ejects the image file,
regardless of any open files on it.
-verbose
be verbose; default is less output
-quiet
no output; default is to generate output
flatten imagename
Flatten a read-only (or compressed) UDIF disk
image into a single-fork file. flatten is only
required if you have previously unflatten'd the
UDIF.
-verbose
be verbose; default is less output
mount imagename
not implemented; use hdid(8)
display partition map from image or device
image_source is either a plain file or a block
special device (ie. a /dev/disk entry).
options defaults to "xsSgcvk" and can be any com-
bination of the following:
r raw - process all without modification
x extended - process 2K & 512 entries and merge
s sectorize - return all quantities in Sectors
S sort - sort all entries By Blockno
g genfree - account for all unmapped space
c combfree - combine adjacent freespace entries
f fixfinal - extend last partition to device end
v volume synthesize - synthesize single volumes as
a single partition entry
k skip zero-length - skip zero length entries
K skip void/free - skip all free & void partitions
-verbose
be verbose; default is less output
resize imagename
For a read/write partitioned UDIF device image, if
the last partition is Apple_HFS (either HFS or
HFS+), attempt to resize the partition to the end
of the device file, or to the last used block in
the HFS/HFS+ file system. This is typically used
when working with a large device image file, when
one wants to shrink the HFS/HFS+ partition before
converting to CD-R/DVD-R format. CD-R/DVD-R con-
verted images do not include the Apple_Free parti-
tion at the end of the device, so this would
result in a CD-R/DVD-R master that would only
write the actual data.
-sectors sector_count | min | max
Specify the number of 512 byte sectors the
partition should be resized to. If this falls
outside the min/max values, an error will be
returned and the partition will not be
resized. min automatically determines the
smallest size the partition can be shortened
to and uses that value. max automatically
determines the largest size the partition can
be grown to and uses that value.
-limits
Displays the minimum, current, and maximum
values for the size of the partition in 512
byte sectors. Does not modify the device
be verbose; default is less output
unflatten imagename
unflatten a read-only (or compressed) UDIF disk
image, creating a dual-fork file
-verbose
be verbose; default is less output
verify imagename
compute the checksum of a read-only (or com-
pressed) image file, and verify it against the
stored value
-quiet
no output; default is to generate output
-verbose
be verbose; default is less output
HISTORY
Originally, disk image files were created to electroni-
cally store and transmit representations of floppy disks
for manufacturing replication. These image files are typ-
ically referred to as 'Disk Copy 4.2' images, in reference
to the application that created these image files and
restored them to floppy disks. Disk Copy 4.2 images were
block for block representations of a floppy disk, with no
notion of compression.
DART is a variant of the Disk Copy 4.2 format that sup-
ported compression of the floppy image file.
NDIF (New Disk Image Format) image files were developed to
replace the Disk Copy 4.2 and DART image formats, as well
as provide the ability to create image files larger than
floppy-sized disks. Additionally, compression and the
ability to mount disk image files in the OS 9 filesystem
as mass storage devices was introduced.
UDIF (Universal Disk Image Format) device image files
extend NDIF to provide the ability to create device
images, which include data that might appear on a given
mass storage device (DDM, Apple partition scheme partition
map, disk-based drivers, etc). This format allows items
such as bootable CD's to be created from an image file.
UDIF is a flat file format (vs. NDIF which is a dual fork
format), and is the native image format for OS X.
EXAMPLES
To verify an image file:
ing to a CD-R:
$ hdiutil convert master.dmg -format UDTO -o master
Converts master.dmg to a CD-R master image file,
appending .toast to the filename.
$ hdiutil convert CDmaster.dmg -format UDTO -o \
CDmaster.cdr -noext
Converts CDmaster.dmg to a CD-R master image file
named CDmaster.cdr.
To create a device image from a /dev entry (requires root
privileges):
$ hdiutil convert /dev/rdisk1 -format UDRW -o devim
Converts the disk /dev/disk1 to a read-write device
image file. Note access via the raw device.
FILES
/usr/libexec/load_hdi SUID executable used to load
HDI disk image driver
SEE ALSO
hdid(8)
|


|
Copyright © 2000-2010 Inside Mac Media, Inc. All rights reserved. |
Apple assumes no responsibility with regard to the selection, performance, or use of the products or services. All understandings, agreements, or warranties, if any, take place directly between the vendors and prospective users. |
| Apple, the Apple logo, Mac, PowerMac G4, PowerMac G5, Xserve, Xserve RAID, PowerBook, iBook, Airport, AirPort Extreme, iMac, eMac, iLife, iMovie, iCal, iPhoto, iTunes, QuickTime, FireWire, iPod, iSight, AppleWorks, Macintosh, Jaguar, Panther, Mac OS, Mac OS X and Mac OS X Server are trademarks of Apple Computer, Inc. |