PartUtil

Dual boot operating systems without installing a boot manager.

Overview

Download link: partutil_2025-07-07.zip

If you want to have more than one operating system installed on your hard drive you can partition it and install an operating system in each partition. FDISK supports this by letting you create partitions and set one of them to be active.

When running DOS this can cause drive letter mappings to change. Later versions of DOS usually will be able to see and map drive letters to the earlier versions of DOS, while earlier versions of DOS will ignore the newer filesystems that they don't understand. If you have additional drive letters in an extended partition those are also affected. Imagine having a drive letter for common utilities that keeps moving around each time you switch DOS versions ... that is annoying.

The general solution to this is to install a boot manager that can hide or unhide partitions as needed. Hiding a partition means changing the partition type in the MBR to something that the active operating system does not recognize, and thus no drive letter is assigned to it. Boot managers are a good solution for later systems but I really don't want to install one on a PCjr. I want something that I know runs under any version of DOS, runs on any class of PC, and only touches the MBR. (No special installation procedure or hidden data on the drive should be needed.)

My solution to this was to write a simple partition switcher - you told it what primary partition you wanted to activate, and it would unhide that partition, set it active, and hide the other primary partitions. That worked for years and I managed to lose the source code, so when I wanted to add features to it I had to start from scratch. And here we are ...

Usage

PartUtil is a stand-alone program that you just run - no installation is needed. It runs under all versions of DOS and is less than 20KB in size.

No changes will ever be made to your hard drive without giving you a chance to confirm the changes.

At startup it will read the drive geometry from the BIOS and read the Master Boot Record (MBR) from sector zero of the first hard drive. It will then show you the partition table of the hard drive.

The current and pending partition table display:

Basic commands:

Hide and unhide only work on a limited set of partition types. If you need to hide or unhide a partition type that PartUtil refuses to touch use the setType command described later.

Save and restore commands:

Saving the current MBR to a file allows you to recover from accidents when using this tool, FDISK, or other partition editors. You should specify a file on a floppy disk for safety; after an accident your hard drive might not be readable until the partition table is correctly restored.

SavePendingMBR and loadPendingMBR let you save or load proposed MBRs to/from files. This is useful when you are crafting your dual boot setup; instead of hiding, unhiding and setting a partition active each time you can save the proposed changes in a file and load them when needed.

Expert mode commands:

To get into expert mode start PartUtil using the "-expert" option on the command line.

How to dual (or triple!) boot

To setup your drive, use FDISK or another partition editor to create the partitions for your operating systems. You might need to use wipeMBR or delete to get rid of partitions that FDISK won't touch. DOS FDISK also won't create a new DOS partition if it sees an existing one so you can use PartUtil to hide the other DOS partitions as you partition and install the various versions of DOS.

Note that each version of DOS has rules for where and how it can be installed. For example, DOS 2.1 must be within the first 32MB of the drive. You might need to try a few experiments until you find a setup that works.

To switch partitions:

After testing and getting comfortable consider automating the process. With the savePendingMBR command you can write the pending changes to a file. Then later you can use loadPendingMBR, write the changes to disk and reboot without having to use the hide, unhide and setactive commands. PartUtil will read from the keyboard or a redirected file so you can put the commands in a file and replay them.

Here you can see my test system which has DOS 3.3 in partition 1, DOS 6.3 in partition 2, and DOS 2.1 in partition 4. DOS33.MBR is a previous pending MBR that I saved to a file that has partition 1 active and unhidden and partitions 2 and 4 hidden. If I run the DOS33.BAT batch file the machine will switch over to DOS 3.3.

Disclaimer

Editing the MBR of a hard drive can lead to data loss. Doing it by hand is not advised, which is why we have tools. But even with a well written tool things can go wrong.

This tool minimizes risk by only manipulating the active flag on a partition and only marking specific partition types and hidden or visible. The other parts of the partition table and MBR are not touched.

As always, ensure you have a back up of your data and the MBR before using this or any similar tool that can cause data loss. I have tested it fairly well and I use it on my personal systems, but I take no liability for the code or user errors.


Created July 7th, 2025
(C)opyright Michael B. Brutman, mbbrutman at gmail.com