Skip to content

Creating a FDI based FreeDOS installer

shidel edited this page Feb 1, 2019 · 14 revisions

This document is obsolete and only applies to FreeDOS 1.2

Creating a FDI based FreeDOS installer from scratch

(The easy way)


Starting with FDI Preview 17, creating a FDI based build environment for deploying a customized release of FreeDOS 1.2+ is very easy. These instructions are for a Macintosh using VirtualBox. However, the entire process can be ported without too much difficulty to other operating systems and virtual machine environments. The whole process takes under 10 minutes. You can follow these instructions or watch the Youtube video Building a FreeDOS 1.2+ Release.

The FDI Build Environment

Let's assume you already have downloaded and installed VirtualBox.

Now, head on over to http://up.lod.bz/FDI and download the latest Floppy image and at least one USB stick image. You will probably want both the 512mb and the 32mb images.

Extract all those zip files and move all of their files into the same directory. Avoid just using FDI as the directory name, it can cause you problems later. Call it something like FDIDEV.

Now, we will need two floppy images. So, copy the FDI.img floppy image to FLOPPY.img.

Start VirtualBox.

  • Create a new virtual machine
    • Call the new VM FreeDOS Builder
    • Use existing virtual drive FDI-USB.img
    • Select storage and the Controller: IDE
    • Add a hard drive, as a fixed disk, with the name FreeDOS Builder, of type vmdk with a size of 2gb.
  • Let FDI partition the new blank drive.
    • Boot the virtual machine and let the FreeDOS install program start.
    • Pick the English language
    • Select Continue with the install
    • FDI will ask if you want to partition drive D:, please do so. And then select reboot.
    • Once the virtual machine restarts, FDI will once again prompt for your language.
    • Pick the English language
    • Now, do not continue. Exit to DOS.
  • Install/Convert then blank drive to the build environment.
    • From the command line type fdidev and press RETURN
    • Ignore the WARNING and press RETURN
    • Type yes and press RETURN
    • Wait a couple minutes for the FDI Build environment to be installed and configured.
    • The Virtual Machine will power off when finished.
    • We are almost done. :-)
  • Fix the drive boot order
    • With the VM powered off.
    • Go into the virtual machines System settings.
    • Make the Hard Disk first.
  • Adjust the drive images
    • With the VM still powered off.
    • Go back into the virtual machines Storage settings.
    • Remove the FDI-USB image.
    • Make the remaining hard drive IDE Primary Master (Build Environment)
    • Make the CD-ROM IDE Secondary Slave or remove it.
    • Add the 32mb (SLIM) USB image as IDE Primary Slave (Slim USB Image)
    • Add the 512mb USB image as IDE Secondary Master (Big USB image)
    • Make the Floppy Device 0 to use the FLOPPY.img image. (Normal Boot Floppy)
    • Add a second floppy device using the FDI.img image. (El Torito CD Boot Floppy)

You now have a FDI based build environment that can reproduce the FreeDOS 1.2+ Floppy, Slim USB, USB and El Torito floppy images with any customizations you need. However, there is one more tweak you should make on a Macintosh. With VirtualBox closed, locate the virtual machine and rename the FreeDOS Builder-flat.vmdk file to use the img extension and edit it's reference in the FreeDOS Builder.vmdk settings file to use the renamed file. When the virtual machine is powered off, this will allow you to mount the virtual drive that contains all of the FreeDOS source packages by just double-clicking the img file.

Updating your application packages

  • Mount the FDI Build Environment drive image.
    • With the Virtual Machine powered off.
    • If you adjusted the FreeDOS Builder-flat image to use the img extension, you can simply double-click the file on a Macintosh to mount the image.
  • Add or update the package to the Build Environment.
    • There are some existing categories. Like BASE, GAMES and UTILS. You can just drop your ZIP archive package into one of those. Or, create a new directory like LEGACY or other new grouping.
  • Unmount the FreeDOS Builder-flat image.
  • Boot the virtual machine.
  • Update the package information file.
    • Run mkFDI info to update all packages.
    • Or just update a single package like V8Power Tools, mkFDI info v8power

Modifying the package sets

There are 3 primary package sets

  • FDI\SETTINGS\PKG_BASE.LST (BASE Install)
  • FDI\SETTINGS\PKG_ALL.LST (ALL Install)
  • FDI\SETTINGS\PKG_XTRA.LST (Included with the Big USB and CD-ROM, but not installed)

The are simple text files. They are simple lists with comment lines starting with the ";" character. They can be modified easily by hand. Also, the FDIMPLES /lists utility can be used. It will read the current BASE, ALL and XTRA package lists. Allow updates and changes. The create new files for those lists in the current directory.

The boot media

There is an additional package set called PKG_FDI.LST in the FDI\SETTINGS directory. It is used to determine what software and packages comprise the FLOPPY and other versions of the installation media. However, there is also a CLEANUP.LST file in the same directory that is used to weed out things that are not needed to reduce the size of the OS on the installation media. Basically, during the creation of each install media, the package from PKG_FDI.LST are installed to a temporary location. Then files and directories that exactly match an item in the CLEANUP.LST are removed. Finally, the install media is created from what is left in the temporary location.

Release settings

Release settings are contained in the FDI\SETTINGS\VERSION.CFG file. Here you can easily change items like the Operating System Name and Version. Changes in this file effect will effect both the installer and the installed operating system. For example, if you were creating a FreeDOS based Operating System called J-DOS, you could do something like this:

  • PLATFORM=J-DOS
  • VERSION=1.0-RC1
  • VOLUME=JDOS2016

Building the FreeDOS images

Here comes the hard part.

  • Boot your FDI Build virtual machine.
  • Type mkfdi all off and press return.
  • Wait a while.
  • Wait a little more.
  • Once completed, the virtual machine will shutdown.
  • Except for the Bootable CD image your done

The image files in that FDIDEV directory you made have been updated.

Creating the EL Torito boot CD-ROM

This is fairly complicated to setup. So, I am only going to give some general instructions for this process.

  • Setup and configure a linux virtual machine.
    • The linux distribution is not important. I've been using openSUSE Tumbleweed.
    • It requires access to the Floppy and USB images that were updated by the FDI Build environment. If you cannot provide access to them on the HOST machine, you will need to create an hard drive image to contain them and the created CD-ROM image.
    • Ensure mkisofs and any other required utilities are installed.
    • Copy the FDI/TOOLS/mkFDI-CD.sh script to a convenient location.
  • Make sure the FDI Build environment is shutdown.
  • Boot the Linux CD Building environment.
  • From a terminal run the mkFDI-CD.sh bash script.
    • It will promote to super-user.
    • The first time you run it, it will prompt for the PATH/FILENAME of the proper images and will not proceed until they are correctly entered. These are the FDI Build Environment drive B: floppy image (FDI.IMG) and one of the USB images. You probably want to use the Big USB image. It will save these settings to a file called mkFDI-CD.cfg.
    • It will copy this to a temporary directory under /root. Mount and unmount stuff through the loopback device. And in general, it will make all of the adjustments needed and output the iso to the current directory. It will then cleanup the temporary files under the /root directory.