Clone an MS-DOS HMI hard drive safely

6 min read · Published November 14, 2026

Yes. Pull the drive from the working twin, make a whole-disk image of it on a bench PC, restore that image to the replacement drive, and test the clone in the machine that lost its disk. A file copy will not boot MS-DOS 6.22, and the original drive stays the master copy until the clone runs the HMI.

Yes, you can rebuild the dead machine from its twin, and the method is a whole-disk clone. The working computer holds the only complete copy of MS-DOS 6.22 and the HMI software, so you copy its entire drive onto the replacement, then test the clone in the machine that lost its disk. Copy the disk, not the folders: DOS starts from disk structures a file copy never carries. Know the one limit before you start: if the HMI software is licensed to the disk or the network card, the clone will boot and the application will stop on an authorization screen. That message goes to the software vendor, and you will recognize it the moment it appears.

Copy the disk, not the folders

A drive running MS-DOS 6.22 starts at sector 0, a 512-byte boot sector that the FORMAT command builds, holding a jump instruction, an OEM signature and the BIOS Parameter Block that says where the system files, the file allocation tables and the root directory sit. On a volume of that era the root directory holds 512 entry slots of 32 bytes each, 16,384 bytes in all. Two hidden system files load before any startup command of yours runs. A copy of the visible folders carries none of that. The boot sector stays behind, the hidden files stay hidden, and the new drive answers with "Non-System disk or disk error". A whole-disk image copies every 512-byte sector in order, so the replacement carries the same layout and the same boot code, and identical hardware starts it exactly as the twin did.

What you need

  • The working twin, powered down, and an hour when it can be out of service.
  • A bench PC with an imaging tool that writes whole-disk images, and 3 GB of free space, which covers the image of a 2 GiB drive.
  • A USB-to-IDE adapter. The common ones take 2.5-inch IDE, 3.5-inch IDE and SATA, one type at a time, so use the branch your drive needs.
  • The replacement drive: same interface, same size when you can find one, for the reason the sizing question below covers.
  • Two labels: MASTER for the original, CLONE for the replacement.

Match the connector, then protect the master

A 2.5-inch IDE drive has a 44-pin connector that carries its 5 V power on the same pins. A 3.5-inch IDE drive has 40 pins and takes power from a separate 4-pin plug. Set the adapter to the branch your drive uses and connect one drive type at a time, the way these adapters are built to work.

Then the rule that saves the job: before anything writes, read the model and capacity the PC reports for the source and the destination, every time. An imaging tool overwrites the destination completely, and if the two drives are swapped it overwrites the only working copy of your control system. Make an image file first and restore it to the new drive. A wrong selection then destroys a blank drive, and the master survives as a file on the bench PC. That is the reason to image first instead of cloning drive to drive.

Clone the drive

  1. Power down the working twin and pull its drive following the machine's service procedure. Handle it by the edges.
  2. Identify the connector, set the adapter to that branch, and connect the drive to the bench PC.
  3. Open the PC's disk management and confirm the drive is listed with a model and a capacity. Write both on the MASTER label.
  4. Start the imaging tool, choose a whole-disk image, and write it to a file on the bench PC. Name the file for the machine and the date, for example hmi-master.img.
  5. Let it finish. A 2 GiB drive lands as a file of about 2.1 GB.
  6. Disconnect the master and set it where nobody grabs it by mistake. Connect the new drive, confirm the tool lists it as a second, different device, and label it CLONE.
  7. Restore the image to the CLONE drive and run the tool's verify pass if it offers one.
  8. Reinstall the master in the working twin and power it up. Confirm that machine still boots and runs before you touch the failed one.
  9. Install the clone in the failed machine and go to the checks below.

Check that the clone really works

Watch the start in stages. The machine's BIOS screen should count the drive and show its model in auto-detect. MS-DOS 6.22 should then reach its startup messages and prompt. The HMI application should then load to its normal operating screen. Last, with the machine held in its safe state, confirm the HMI shows live values from the control system, using the checks your site already runs on that machine. A DOS prompt with no HMI is partial recovery, and an HMI screen with no live values is unfinished. When both machines run, back up and restore the HMI project the safe way so the next dead drive costs you a disk, not the software, and keep a master copy of anything you cannot reinstall.

What each result tells you

  • The bench PC never lists the drive. Adapter branch or power. Shut everything down, reseat the connector on the correct branch, and look for the adapter's activity light.
  • The failed machine's BIOS does not count the drive. The jumper does not match the original. Copy the jumper position from the old drive before you retest.
  • DOS will not start. The copy was file-level or the image stopped early. Redo the whole-disk image and confirm the tool reports the full sector count, 4,194,304 sectors for a 2 GiB drive.
  • DOS starts and the HMI application is missing. The image did not carry the whole disk. Image the twin again and read the tool's log; if a project backup exists elsewhere, restore an HMI project from a USB drive without the programming software.
  • The HMI starts, then stops on an authorization or hardware message. The software is licensed to the disk or the network card. Write the message down word for word and take it to the HMI software vendor. No disk copy satisfies a check that reads a network card.
  • The HMI runs but shows no live values. Check this machine's own cable, card seating and communication settings before you touch the clone again.

Example: a 2 GiB drive from a working twin

Two identical panel computers, one dead drive, one working twin with a 2.5-inch IDE drive of 2 GiB.

  • Drive size: 2 GiB = 2,147,483,648 bytes.
  • Sectors: 2,147,483,648 bytes ÷ 512 bytes = 4,194,304 sectors.
  • Transfer rate: USB 2.0 moves 480 Mbit/s on the wire, 60 MB/s in theory, and a USB-to-IDE adapter with an old drive sustains about 30 MB/s.
  • Reading the image: 2,147,483,648 bytes ÷ 30,000,000 bytes per second = about 72 seconds.
  • Restoring to the new drive: another 72 seconds. Verify passes double both, so plan 5 minutes of bench time.
  • Disk space: the image file is about 2.1 GB, so the 3 GB of free space is enough.

The clone goes into the dead machine, the BIOS auto-detects it, DOS 6.22 reaches its prompt, and the HMI loads. The master goes back into the twin, and the image file becomes the recovery master for both machines.

The decision

Recommendation: image the twin's whole disk to a file, restore that file to the replacement drive, keep the original labeled MASTER, and test the clone only in the failed machine. Buy a replacement the same size as the original, because MS-DOS 6.22 partitions stop at 2 GiB and a BIOS of that era caps what it detects. If the HMI then stops on an authorization message, the clone is done and correct, and the remaining problem is a license tied to the disk or the network card, which belongs with the software vendor. Keep the image file as the recovery master, and put a fresh project backup on both machines the day the clone works.

Questions

Will a CompactFlash card work as the replacement drive?

Often, yes. CompactFlash cards use the same ATA command set as an IDE drive, so a card on a CF-to-IDE adapter behaves like the hard disk. Build the clone on your bench PC, move the card to the machine, and confirm the BIOS auto-detects it before you trust it. Buy two cards and keep one imaged spare.

How large can the replacement drive be?

Match the original when you can. A FAT16 partition under MS-DOS 6.22 stops at 2 GiB, so a larger drive leaves the rest unused, and a BIOS of that era may cap what it auto-detects anyway. A same-size drive also keeps the exact geometry the boot sector describes.

Does the imaging tool have to run on the old HMI computer?

No. Run the tool on the bench PC with the drives on USB adapters; the old machine only ever sees the finished clone. If your bench PC cannot boot from USB, use an imaging tool that boots from CD and writes to the drives inside that PC; those tools make the same whole-disk image.

Why keep the image file after the clone works?

Because the image is the recovery master. The original drive goes back into the working machine, so the file is the only copy outside either machine. A later rebuild takes one restore pass, about 72 seconds for a 2 GiB drive, with the working machine left closed. Keep the file on the bench PC and on a second disk.

Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.

Keep reading

Build your signAsk for a quote