1. Michael Tharp
  2. freedos-generator


freedos-generator /

Filename Size Date modified Message
2.5 KB
1.2 KB

freedos-generator is a tool for creating bootable FreeDOS images with minimal pain.


./freedos-generator output.img file1 file2 dir3 ...


  • mtools
  • dosfstools
  • perl

Images produced by this script are the perfect size to use with a network boot menu like PXELINUX -- just use the 'memdisk' kernel to emulate a floppy. freedos-generator will print the appropriate configuration after creating an image. You can also tell memdisk a program to run after FreeDOS has booted. This makes it downright trivial to add BIOS upgrades to your network boot menu. Here's a real-world example:

./freedos-generator PE2950-020700C.flp PE2950-020700C.exe

# In pxelinux.cfg/default:
label PE2950-020700C
    menu label PowerEdge 2950 BIOS Update
    kernel memdisk
    append initrd=PE2950-020700C.flp.gz autorun=pe2950~1.exe

Note that FreeDOS does not understand files not in the form AAAAAAAA.BBB, so files with longer basenames or extensions will be mangled. You must use the mangled name in the autorun= parameter, as above. It is possible to add support for long filenames, but this takes up space that could be filled with useful programs.

The script will produce both an image with the specified name and a gzip-compressed version with the suffix .gz. memdisk can understand either of these and it is recommended to use the compressed version to eliminate time spent transferring empty sectors.

Currently only 2.88MiB floppies are supported. It is trivial to modify the script to produce smaller floppies with a standard size, see the memdisk documentation for recognized sizes. It is also possible to use nonstandard sizes, or to make hard disk images larger than a floppy will support. These require specifying exact geometry to several commands and perhaps adding a partition table. If used, memdisk will also need to be informed of the geometry.

This distribution includes the following code from other sources:

  • Unmodified binaries and boot sector assembly are provided by FreeDOS under the GNU General Public License version 2.
  • An unmodified copy of mdiskchk.com from Syslinux, also provided under the GPL v2
  • The boot sector assembly tool, written by Eric Auer, is provided to the public domain.
  • The remainder, including the generator script and this documentation, are also provided to the public domain.