Linux Commands Examples

A great documentation place for Linux commands


Create a blank MS-DOS formatted hard disk image

see also : syslinux


mkdiskimage [-doFMz4] [-i id] file cyl head sect

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


if [ "none$ENV $KNO" != "none" ]; then
dd if=/dev/zero of=$KNO/usb1GiB.img bs=1M count=982
mkdiskimage -4 $KNO/usb1GiB.img 0 64 32


This is a convenient tool to generate a hard disk image, pre-formatted according to the MS-DOS specification, and having stated properties.

A disk image named file will be created, large enough to have cyl cylinders, head heads, and sect sectors. Using -M, the value of cyl will instead be interpreted as size in MBytes.

Additional settings include ZIP type disks, FAT32 formatting, and the inclusion of an emulation header.



Use the fourth partition table entry. This is the standard for ZIP-disks.


Format the partition using a FAT32 file system.


The argument cyl is given in Megabytes. Recalculate this to get the count in cylinders.


Add a DOSEMU header.

-i id

Specify the MBR identity field as id.


Print to stdout the file system offset.


Use a ZIP-disk geometry. This needs heads=64 and sect=32.


More information about the Syslinux project can be found on the homepage at <>.

see also



mkdiskimage was written by H. Peter Anvin <hpa[:at:]zytor[:dot:]com>.

This manual page was written by Mats Erik Andersson <debian[:at:]gisladisker[:dot:]se>.

How can this site be more helpful to YOU ?

give  feedback