Create an image for a partitioned medium, such as a hard drive, SD card, or MMC
diskimage -c configfile -o imgfile [-hMmpSvz] [-b bootstrapfile] [-G number | -g] [-s number]
Linux, Mac, Microsoft Windows
Write to the specified image file.
On Neutrino systems, imgfile may also be a disk device. In this case, the disk-related configuration parameters (cylinders, head, sectors-per-track, sectors, sector size) are acquired directly from the device and need not be specified in the configuration file.
The option must be avoided if the file did exist before, because arbitrary data might remain in areas where all zeroes are expected.
By default, diskimage will just seek() across unused regions of the output image file, to increase performance. If the output file already exists and has previously been written using a different configuration, then stale data may be retained in the image. This doesn't affect the functionality, but may be undesired. The -z option forces diskimage to actively zero-fill all unused regions in the output image.
The diskimage utility creates an image for a partitioned medium. The partitioned medium image can contain any number of filesystem images (for example, Power-Safe filesystems that were created using mkqnx6fsimg or mkqnx6fs). After an image is successfully created, it can be copied to a hard drive, SD card, MMC, USB stick, and so on. Options are available to adjust Power-Safe filesystems in the image so that they are bootable. With this command, you can also specify the IPL file to write into the master boot record (MBR).
You must use a configuration file to specify the disk image content and layout. For details of the configuration file contents, see diskimage configuration file.
Create an image:
diskimage –c mydisk.cfg –o mydisk.img
Create an image and specify a primary boot loader (IPL):
diskimage -c mydisk.cfg -b C:\qnx660\target\qnx6\x86\boot\sys\ipl-diskpc1 -o mydiskipl.img
Create an image with a GUID partition table (GPT disk):
diskimage -g –c mydisk.cfg –o mydisk.img