Disk configuration

Unless the diskimage output goes to a disk device, you must specify a disk configuration in the configuration file. The disk configuration is made up of disk attributes, most of which describe the disk's geometry. All disk attribute definitions must be enclosed in square brackets ([]). A single pair of brackets can contain one or more attribute definitions; multiple attribute definitions within a pair of brackets must be separated by whitespace.

Disk attributes

The diskimage command supports the following disk attributes:
cylinders=number
(Required) The number of cylinders on the disk. The value must be in the range 1–4294967295 (i.e., 232-1) for MBR disks or 1–18446744073709551615 (i.e., 264-1) for GPT disks.
heads=number
(Required) The number of heads on the disk. The value must be in the range 1–255.
sectors_per_track=number
(Required) The number of sectors on each track. The value must be in the range 1–63.
sector_size=number
(Optional) The number of bytes per sector. The value must be one of 512, 1024, 2048, or 4096. If not specified, a default value of 512 is used.
num_sectors=number
(Optional) The total number of sectors on the disk. This is usually calculated from the values for cylinders, heads, and sectors_per_track. If the number of sectors that the device reports isn't the product of these three, you must explicity specify the total sector count to generate correct GPT disk images. The value must be in the range 1–4294967295 (i.e., 232-1) for MBR or 1–18446744073709551615 (i.e., 264-1) for GPT disks.
align=number
(Optional) The sector count for partition alignment. Every partition is adjusted such that its first sector number is an integral multiple of this value. The value must be in the range 1–4294967295 (232-1) for MBR disks or 1–18446744073709551615 (264-1) for GPT disks. By default, the number of sectors per cylinder is used (i.e., each partition begins on a cylinder boundary).
start_at_cylinder=number
(Optional) The cylinder at which the first partition begins. The value must be in the range 0–4294967294 (i.e., 232-2) for MBR disks or 0–18446744073709551614 (i.e., 264-2) for GPT disks. The default is 0 (zero).
Note: The first few sectors of the disk are always reserved for partition table metadata. For MBR disks, the first track is reserved (= sectors_per_track sectors); for GPT disks, 2 + ((num_partitions * 128 + sector_size - 1) / sector_size) sectors are reserved. The first partition begins at the next multiple of the alignment unit size.