First post, by mbbrutman
The short story: a small (20KB or less) partition editor that makes it easier to select and boot DOS partitions without having drive letters shifting around.
https://www.brutman.com/PartUtil/PartUtil.html
The longer story ...
I've been running DOS 3.3 and DOS 5.0 on a PCjr for over 10 years. When I first started doing that I had logical drives in an extended partition created by DOS 3.3 When I would boot DOS 5 my drive letters would shift, which was annoying. My solution was to hand-edit the partition table, which isn't difficult but it is risky. Then I wrote a program to automatically hide and unhide the inactive primary DOS partitions, and I used that for ages.
Recently my P133 machine with a boot manager started misbehaving and it would not reliably boot. The boot manager would start and let me select an OS, but now there is a problem and it often will hang when it tries to boot the target operating system. I don't know what is going wrong, but I figured out it was related to the boot manager - editing the partition table directly was fine. So I went to dust off the old partition switcher source code and discovered that I couldn't recreate what I had. (I had started adding a lot of features to it and the small/tiny version that I used for years was no longer possible. I really needed source control there.) So I rewrote it from scratch, and I think it's worth sharing.
Basic commands:
- Set and clear the active flag on a partition
- Hide or Unhide partitions
- Write the MBR
- Reboot
Save and restore commands:
- Save the current MBR to a file (for backup purposes)
- Load a previously saved MBR from a file.
- Write a pending (changed, but not committed) MBR to a file.
Extras that FDISK won't do:
- Set the type of a partition to whatever you want. (Useful for hiding or unhiding beyond what the standard hide and unhide commands will handle.)
- Delete a partition entry. (Useful for removing non-DOS partitions that FDISK won't touch.)
- Wipe the MBR clean. (Useful when doing initial hard drive setup.)
There are other utilities that can do these things too; this is just my spin on how it should be done. It runs under any version of DOS, doesn't require installation or use extra hidden areas on the hard drive, and its relatively small. If you create text files with commands you can redirect those into the tool, automating the switching or editing process. I don't intend it to replace a full partition editor, but it is handy when you want to do something that FDISK won't do.
Source code is included. Enjoy ...
Mike