MBFU RU

Running MS-DOS in DOSBox or a virtual machine

Emulation covers most day-to-day DOS work and costs nothing to set up. It stops being enough the moment the task depends on firmware, a real bus or a port.

What emulation is good for

A DOS emulator executes the same interrupts and file-system code as the real thing, so anything that touches only DOS and its own files behaves the same:

  • editing config.sys and autoexec.bat and seeing the effect at once;
  • learning dir, copy, fdisk and format without risking a real disk;
  • running old business software, games and QBASIC programs;
  • checking an image before it goes onto a stick, and copying files into or out of it.

DOSBox: the fastest route

DOSBox installs nothing, needs no driver and starts in a second: mount a folder as C:, mount a floppy image as A:, run the program. A bad setting costs a restart rather than a reinstall.

MBFUTool ships DOSBox 0.72 with a BEN menu and uses it for Edit MS-DOS image with DOS commands: the image is mounted as A: or C:, and copy, del, md, rd and edit work as usual. That build cannot mount an image larger than 4 GB, and paths must be Latin-only.

The emulation is not cycle-accurate: demos that count cycles and software that programs a sound card directly may behave differently. Adjust cycles to change the speed.

When a virtual machine is better

VirtualBox, VMware, QEMU and the period emulators 86Box and PCem boot a disk image for real: partition table, boot sector, everything. That makes them the place to test whether an image is bootable and to experiment with fdisk before touching hardware. Snapshots undo a mistake in one click.

  • VirtualBox and VMware need their own disk format; convert a raw image with VBoxManage convertfromraw or qemu-img convert.
  • Floppy images usually attach as they are.
  • 86Box and PCem emulate period chipsets and ISA cards, which matters for software that programs hardware directly.

When only real hardware will do

Some jobs never leave the physical machine:

  • Firmware updates. A flasher writes to the SPI flash chip through the chipset; an emulator has no chipset to write to.
  • Industrial machines. ISA cards, serial dongles and software that polls custom I/O ports have no trustworthy emulation.
  • The boot path. Secure Boot, CSM, USB enumeration and the stick's controller are invisible to DOSBox.
  • Drive diagnostics. MHDD talks to the storage controller directly; a virtual machine sees a virtual disk.

What emulation hides

A test that passes in DOSBox proves the files are right; it says nothing about whether your PC will start from the stick. Treat emulation as a check of the image and the real machine as the check of the boot.

A practical order of work

  1. Build or edit the image in DOSBox.
  2. Check the boot in a virtual machine.
  3. Write it to the stick with the USB guide.
  4. Test on the real machine, keeping the emulator open for quick fixes.

Where MBFUTool fits

MBFUTool 2.0 is a Windows x64 utility with four operations: write an image to USB, create a .mbfu image from a disk, floppy or USB stick, clone MS-DOS media to a USB stick, and edit an image with DOS commands. Editing is where the bundled DOSBox 0.72 earns its place; the .mbfu container stores a header, a zlib-compressed payload and a SHA-256 digest of the raw image.

The program ships no MS-DOS files - the image is yours, as the licensing page explains. For a first look at the command line there is MS-DOS in the browser.

Step by step

  1. Install DOSBox or create a VM. DOSBox needs no installation: unpack and run it. For a VM, create a machine and attach the image.
  2. Mount the media. Use mount for a folder and imgmount for a floppy image; in a VM convert the raw image first.
  3. Work on the image. Edit config.sys and autoexec.bat, copy files in, run the programs you need.
  4. Test the boot in a VM. Attach the image to a virtual machine and check that it reaches a DOS prompt.
  5. Write to physical media. Once the image is correct, write it to USB and test on the real hardware.

Questions

Can DOSBox replace a real PC for a BIOS update?
No. The flasher needs the actual chipset and flash chip; under DOSBox nothing reaches hardware.

Why does DOSBox refuse a 6 GB image?
DOSBox 0.72 cannot mount images larger than 4 GB. A bigger file is almost always FAT32 or exFAT, which MS-DOS cannot read.

Is a virtual machine enough to test a bootable stick?
It can boot the image file, which proves the image is bootable. It cannot tell you whether your firmware will accept that stick.

Does DOSBox run on Windows only?
DOSBox runs on Windows, Linux and macOS. MBFUTool itself is a Windows x64 program.