Lock FDD
Home » Projects » DOS » MBRC »

Master Boot Record Chooser

35611 bytes
47888 bytes


In short this package allows you to have several boot partitions. Each boot partition has its own master boot record (MBR), its own partition table, and possibly has its own OS. There is one set (of MBR, PT, possibly OS) booted by default. Other sets are hidden from user and password protected, more over in case of reasonable settings user will find no difference with standard OS boot process on this machine and with this soft installed.

This program is not hacker/cracker thing. More over I can't imagine usage of this program in such a role. This program is used to defend some sensitive packages used on the laboratory from copying and running in environment others than laboratory. More over these packages are used during part of laboratory works and must be inaccessible during others. Because of university feature, it was designed for, it was unwise to use injectable defense and because of used hardware it was impossible to make defense based on "encryption on the fly" or based on network.

How does it works?

Usually you have on disk 1st track busy with only one sector: 1st sector is busy with a MBR and usually at least 16 sectors are free. When machine boots it loads MBR (where MBRC should sit in order to work). When MBRC loaded it waits some time for defined key to be pressed and password entered. If it is timed out MBRC loads default slot, else depending on the password MBRC chooses slot to load. Then it loads slot's MBR (consisting of code and partition table) into standard 07C0:0000h address, and stores partition table (and only partition table, not a boot code) into real partition table (i.e. into 1st sector of 0th track on 0th side). Then it passes control to the loaded code, which boots OS. So the chosen OS with chosen partition table is loaded. While the programs on the loaded OS do not monitor the code in the MBR, they will find no difference before installation of MBRC or after it.

So far MBRC allows you to load sectors other than 1st as MBR. More over before run new MBR's sector code MBRC replaces partition table of the real MBR. So making the things almost as they were before it was installed.

Installation and uninstallation

First we partitioning hard drive and install 1st OS. After it we run MBRCINST and save MBR and PT into one of the sectors you choose at 1st track (I'll call it 'slot'). Then you modify partition table (whether using MBRCINST or other tool like fdisk, diskedit, partition magic, RPM, etc.) and install other OS. And again save MBR into another slot, possibly install OS again etc. Last step is an installation of MBRC itself. See example please.

Before uninstallation copy all your data from partitions will be removed. To uninstall it is enough to overwrite MBR. In DOS and in Windows (reboot to MS-DOS mode, not to MS-DOS session window) run 'fdisk /MBR'. The currently booted OS with its set of partitions will be leaved alive, others become inaccessible. Although the data stored on these partitions would still exist and can be simply accessed by IT-professionals. So if you have sensitive data on these partitions you will need to boot in these slots and make complete format (not quick!) of these partitions/logical disks before uninstalling MBRC from MBR. Also master boot records stored as slots must be destroyed by third-party disk editor.


In this example I will make 4 slots. Physically there will be 5 disks on hard drive, and variable (from slot to slot) amount of logical disks. So the hard drive will have the next configuration: (C: (D: E: F:) C2:). So far here is a slot layout:

  1. This slot will have info about disks C: D: E: F:. Disk C: will be bootable with OS Windows 98. Disk C2: will be inaccessible.
  2. This slot will have info about disk C2:. DOS 6.22 will boot from this partition and disks C: D: E: F: will be inaccessible from OS on C2:. Of course C2: in booted DOS will looks like 'C:' (not 'C2:', I am not a wizard to make such things).
  3. This slot will have info about disk C2: D: E: F:. DOS 6.22 will boot from C2: and will see disks C2: D: E: F:, but disk C: will be inaccessible. This slot is used to transfer data from disk C: to disk C2: (or from one OS to another).
  4. This slot will have info about disk C: D: E: F: C2:. I do not recommend to boot from this slot. This slot is for creation and backup processes.

WARNING! These steps will destroy all data on your hard disk.

For this example I will need MBRCINST, mbrc.bin, standard Windows 98 boot diskette (with fdisk), DOS 6.22 boot diskette. If you have free space on Windows 98 boot diskette you may copy MBRCINST, mbrc.bin onto it, but leave at least 1K for mbrc.my, in other case put them onto another diskette. Do not put them on created disk C: it will become inaccessible soon.

  1. Reboot from boot diskette.
  2. Using fdisk remove all partitions.
  3. Create primary partition and set it active.
  4. Create extended partition (saving some space after it for C2:).
  5. Create logical drives D: E: F: in extended partition.
  6. Reboot from boot diskette.
  7. Format disks C: D: E: F:. Install OS on disk C:.
  8. Reboot from boot diskette.
  9. Run MBRCINST. On first start you need to choose base sector where slots' MBRs will be saved (I usually use sector 10) and number of slots you need (in this example we need space for 4 slots). MBRCINST will write these values into MBRC.MY (your future master boot record), it also copies chooser itself from MBRC.bin into it. So, do not put it onto cd, or writeprotected floppy.
  10. Copy current MBR into slot 1 (keys: s 1 c)
  11. Write down FSID (usually 04 or 0B) and hide 0's partition (keys: h 0). Quit MBRCINST (keys: 0).
  12. Reboot from boot diskette. You don't see your disk C: but don't worry it is just hidden.
  13. Again create primary partition. Set it as active.
  14. Reboot from DOS 6.22 boot diskette. Now you will see disk C: but it will be unformatted.
  15. Format it and install DOS 6.22 on it (I mean 'sys A: C:').
  16. Run MBRCINST. Copy current MBR into slot 4,3,2 (keys: s 4 c s 3 c s 2 c).
  17. Now modify slot 2 (keys: s 2). Remove info about partition 0 and 1 (keys: r 0 r 1).
  18. Now modify slot 3 (keys: s 3). Remove info about partition 0 (keys: r 0).
  19. Install Master Boot Record Chooser (keys: i 1).
  20. Run admin. You will see info that slots passwords are duplicated for all slots. Set passwords for example, slot1: a, slot2: b, slot3: c, slot4: d (keys: p 1 a, p 2 b, p 3 c, p 4 d). After password change admin will show you message that some slots passwords are still duplicated.
  21. Quit (keys: q).
  22. Reboot from hard drive. Now MBRC should boot Windows.
  23. Reboot again from hard drive. And when BIOS boot finished but Windows boot is not started press F9. You should see green border, and computer stops awaiting a password. Enter your password. Try passwords b and c, and do not try d! While you typing password no any symbol will be displayed. Password should be finished with enter. If you have mistaken while typing password press Enter and try again. And again until you enter correct password you will be at this screen (although Ctrl-Alt-Del is working fine).


This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

You found this project useful? Give me to know, vote for it! Make a donation.

Last modified: 22:53 06.09.2014
Copyright © design, development, coding & content 2004 Boris L. Zanin
http://bzanin.tk/ | http://jump.to/bzanin | http://here.is/bzanin