I can be reached from the internet as either miller2615@delphi.com or
<72040.1017@compuserve.com>.
If you wish, a $5.00 (U.S) registration fee gets you good karma and supports
me in creating additional innovative programs such as this (I have several
ideas for hybrid DOS-OS/2 programs and pure OS/2 programs). The $5.00 reg-
istration will be credited toward the registration of a future program I
release that you choose to register. Corporate users can obtain a site
registration for $50.00 (U.S.). This site registration entitles you to the
same good karma as individual users get (but for your complete site) and
e-mail and phone support. I consider this pricing reasonable since corporate
users are more likely to use this program on multiple machines and thus have
a higher likelihood of needing support. The program is fully functional in
its distributed form so registration is simply an act of honesty.
Registrations can be mailed to:
Mr. David G. Miller
2615 Plaza Del Amo #620
Torrance, CA 90503
* During testing, I noticed that OS/2's FDISK program did not identify
the Boot Manager partition created by MKBMPART as "STARTABLE". Not
sure why this occurred since running FDISK under OS/2 (once it was
installed) did correctly identify the Boot Manager partition as
STARTABLE. All you need to do under is identify a partition as "IN-
STALLABLE" after setting up Boot Manager using MKBMPART. Do not be
concerned that FDISK does not say that the Boot Manager partition
is STARTABLE.
- 6 -
5. How MKBMPART Works
MKBMPART takes advantage of the simplicity of the FAT file system to chop off
a small portion of one logical drive to make room for the boot manager parti-
tion. In particular, the FAT file system never "looks at" the partition
table except when a logical drive is being formatted or when FDISK is used to
modify a hard drive's partitioning. Instead, the size of a logical drive is
determined by entries in a portion of the boot record known as the BIOS Par-
ameter Block (BPB). This approach is probably a carry over from DOS's early
years as a floppy disk based operating system. Floppy Disks do not have a
partition table and all information about the size of the disk is in the BPB.
By changing the number of sectors on the logical drive in the BPB, the size
of the drive can easily be changed by a small amount.
In theory, any change to the number of sectors available should also be re-
flected in the amount of disk space allocated to the file allocation tables.
A little arithmetic shows that even if the full 1 MB of disk space is allo-
cated to the boot manager partition, very little space would be gained by
adjusting the size of FAT to reflect the changed size of the disk. For the
worst case, assume the logical drive being shortened has 2 KB allocation
units (also known as the cluster size). 1 MB of disk space then requires 512
FAT entries. Each FAT entry is a 16 bit or two byte number so 512 FAT en-
tries take a total of 1 KB of disk space. Since there are two copies of the
FAT for a disk, we double this amount to get 2 KB of disk space taken up by
the FATs should be freed for a 1 MB boot manager partition. Since this is
all of one 2 KB allocation unit, I decided that it isn't worth the trouble
or the risk to recover it. Testing of MKBMPART showed that DOS is insen-
sitive to having more space available for the FATs than is required.
If you use either the standard or aggressive partition sizes for the boot
manager partition, the amount of space "lost" in unneeded FAT sectors rapidly
shrinks to insignificance. Since disk space for each copy of the FAT is
allocated in whole sectors, it is very likely that the amount of space
required for the FATs will not change as a result of creating the boot man-
ager partition using the aggressive mode.
In addition to the changes MKBMPART makes to the boot record of the selected
drive, boot manager makes changes to the primary partition table for the hard
drive to add the boot manager partition. If you choose to make the boot man
ager partition at the end of an extended partition, boot manager must also
update the chain of extended partition definitions. This update consists of
simply shortening the length of the partition.
6. If Things Go Wrong
For any number of reasons, you may decide that what MKBMPART did to the log-
ical organization of your disk isn't quite what you wanted. Included with
the MKBMPART distribution file set is a program call RMBMPART (ReMove Boot
Manager PARTition). This program can restore your system to the state it
was in prior to when you ran MKBMPART. In order for RMBMPART to do this, it
must be able to access the data saved by MKBMPART when you originally instal-
led the boot manager program. To restore your previous configuration, simply
run the RMBMPART program. This program will prompt you to provide the floppy
disk that has the system image saved by MKBMPART. It will restore your par-
tition table(s) and the boot record of the logical drive that was modified to
make room for the boot manager program to the previous settings. When
RMBMPART completes, your system must be rebooted for the changes made by
- 7 -
RMBMPART to take affect.
Please note: MKBMPART and RMBMPART make no provision for renaming the file
containing the system image saved as part of the installation process. If
you use the same floppy to save the system image for several systems, the
last system's image will be the only one that "survives". If there is suf-
ficient interest and demand (read that as paying registrations plus people
who need the capability), I can add a capability to append additional images
to the file rather than overwriting the existing image and to provide ident-
ification information for each image.
- 8 -
Appendix: Error Messages
The following messages may be displayed by MKBMPART if it encounters certain
conditions that should not occur. Please make a note of the message and
contact the author for technical assistance. For each possible error, a
brief explanation is provided and, if possible, appropriate remedial action. In general, on a properly operating system, these errors should never occur.
1000 Unable to read primary partition table.
The DOS service used to read the partition table was unable to read
the sector at cylinder 0, head 0, sector 1. If your system otherwise
operates correctly, this means things are pretty strange.
1001 Primary partition table has four entries. No room for Boot Manager
entry.
A partition table can have at most four partitions defined. Your
primary partition table already has four entries thus leaving no room
for the Boot Manager partition entry.
1002 No bootable partition in primary partition table.
MKBMPART was unable to find a partition marked as bootable (or start-
able) in your primary partition table. Use FDISK to make a partition
"active".
1003 Unable to read extended partition table.
The DOS service used to read the extended partition tables was unable
to read one of them.
1004 Unable to read boot record for candidate partition.
The boot record is on the first sector in a partition. For FAT file
system drives, it contains the number of sectors for the drive. This
number must be changed in order to define the Boot Manager partition.
1005 Unrecognized disk logical structure (only one FAT).
One of the parameters in the Boot Parameter Block of the boot record
that defines the drive's logical structure indicates that only a
single copy of the FAT is defined for this disk. This is not stan-
dard and MKBMPART will not work on such a drive.
1006 Unable to retrieve FAT for candidate partition.
The DOS service used to read the File Allocation Table (FAT) indica-
ted that and error occurred while attempting to read the FAT.
1007 Unable to allocate memory required to build boot manager program.
MKBMPART was unable to allocate temporary memory. Given the small
size of this program, it is unlikely that a system will be encoun-
tered that has insufficient memory for the operation of MKBMPART.
- 9 -
1008 Unable to read file 'FDISK.COM'.
MKBMPART attempts to open (read only) the file FDISK.COM in order to
retrieve the Boot Manager program. Either the open or the file read
failed.
1009 Unable to modify boot record for changed partition size.
MKBMPART was unable to rewrite the boot record to reflect the change
to the drive's size.
1010 Unable to write partition table.
A write error occurred when MKBMPART attempted to write the modified
partition table with the changes required for the installation of the
Boot Manager partition.
1011 Bad data value in partition table.
An invalid data value was encountered when MKBMPART was attempting to
modify the partition table. Check the partition table using a disk
integrity tool.
1012 Unable to write boot manager program to boot manager partition.
A write error occurred when boot manager attempted to write the Boot
Manager program to the intended location for the chosen partition
creation strategy. This could occur if a marginal sector exists in
the region MKBMPART will use to install the boot manager program.
Depending on the type of hard disk involved, you may be able to
"revive" the sector using a tool such a "Spinright" or Norton's Cal-
ibrate. If all else fails, choose a different partition creation
strategy since this will result in the Boot Manager program being
written to a different location on your disk.
1013 Unable to restore previous boot record data (write error).
An error occurred when RMBMPART attempted to restore the previous