home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / mkbmpa.zip / MKBMPART.TXT < prev    next >
Text File  |  1994-08-24  |  35KB  |  685 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.                 MaKe Boot Manager PARTition
  15.                     (MKBMPART)
  16.  
  17.                    Users  Guide
  18.                      Beta 1.0
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.                (c) Copyright David G. Miller 
  32.              MKBMPART Program and Documentation
  33.                 All rights reserved
  34.                (This is an unpublished work)
  35.  
  36. Licensing Notes
  37.  
  38. This documentation accompanies a beta release of the MaKe Boot Manager PARTi-
  39. tion (MKBMPART) program.  This program together with its accompanying files 
  40. and documentation is copyrighted material by the author and is being released 
  41. in a limited form by the author for additional testing.  Please do not dissem-
  42. inate this program in its current form without the consent of the author.  I 
  43. do not intend to change the terms of the registration as described in Chapter 
  44. 5 of this document which means unauthorized dissemination of the program does 
  45. not do anyone a service and may simply spread around copies of the program 
  46. that could contain some bugs that my testing has not uncovered.  The program 
  47. will be released as "honorware" after completion of beta testing (Shareware 
  48. assumes that you will evaluate the program for some limited period of time 
  49. and, after this period and sufficient reminders to register the program, you 
  50. will either register the program or discontinue its use.  This program will, 
  51. in general, be used once by a user.  If a user chooses to compensate me for 
  52. my time and effort in developing this program after this use, I congratulate 
  53. him or her on his or her honesty and integrity).  Beta testers need only tell 
  54. me the results of their testing to register.
  55.  
  56. License Agreement
  57.  
  58. This is a single copy software license granted by David G. Miller, the author of 
  59. the work, with a mailing address of 2615 Plaza Del Amo #620; Torrance, CA 90503.  
  60. The MKBMPART software and documentation is licensed to you.  It is not sold.
  61.  
  62. The MKBMPART program and documentation are copyrighted material.  You have 
  63. the non-exclusive right to use this program.  You may make additional copies 
  64. of this program for backup purposes so long as these copies, together with 
  65. your original, are kept in your possession or control.
  66.  
  67. You may not make changes or modifications to the MKBMPART software, and you 
  68. may not decompile, disassemble, or otherwise reverse-engineer the software.  
  69. You may not rent it or lease it to others.
  70.  
  71. This software is Commercial Computer Software under Federal Government Acquis-
  72. ition Regulations and agency supplements to them.  The MKBMPART software and 
  73. documentation is provided to the Federal Government and its agencies only 
  74. under the Restricted Rights Provision of the Federal Acquisition Regulations 
  75. applicable to commercial computer software developed at private expense and 
  76. not in the public domain.  The use, duplication, or disclosure by the govern-
  77. ment is subject to the restrictions set forth in subdivision (c)(1)(ii) of 
  78. the Rights in Technical Data and Computer Software clause at 252.227-7013.
  79.  
  80. Limited Warranty and Limits of Liability
  81.  
  82. The author, David G. Miller, makes no warranty or representation, either ex-
  83. pressed or implied, with respect to this software, its quality, performance, 
  84. merchantibility, or fitness for a particular use.  As a result, this software 
  85. is licensed "as is", and you, the licensor, are assuming the entire risk as 
  86. to its quality and performance.  In no event shall the author be liable for 
  87. direct or indirect, special, incidental, or consequential damages resulting 
  88. from any defect in the software or its documentation.  Such damages include, 
  89. but are not limited to, loss of profit, loss of programs, and loss of data.  
  90. In no case shall the author's liability exceed the license fee paid.
  91.  
  92. The warranty set forth above is exclusive of all others, oral or written, 
  93. expressed or implied.  This warranty provides you with specific legal rights.  
  94. You may have other rights which vary from state to state.
  95.  
  96. Table of Contents
  97.  
  98. 1.      Introduction....................................................1
  99. 2.      Before Running the Program......................................2
  100. 2.1     Where should MKBMPART make the boot manager partition?..........2
  101. 2.2     What to Name the Bootable Partitions............................3
  102. 2.3     Where are you going to install OS/2 and Primary vs. Extended?...3
  103. 2.4     What Else You'll Need...........................................4
  104. 3.      Running the Program.............................................5
  105. 4.      After Running MKBMPART..........................................6
  106. 5.      How MKBMPART Works..............................................7
  107. 6.      If Things Go Wrong..............................................7
  108.  
  109.  
  110.  
  111. 1.      Introduction
  112.  
  113. New users of OS/2 2.1* are faced with choosing between three possible instal-
  114. lation options:
  115.  
  116. 1.      Installing OS/2 as the operating system on the primary partition of 
  117.     their hard disk.
  118. 2.      Installing OS/2 with the "dual boot" option so both OS/2 and their 
  119.     previous operating system (usually some version of MS-DOS or PC-DOS) 
  120.     co-exist in the same partition.
  121. 3.      Installing OS/2 into an extended partition using the "boot manager" 
  122.     option.
  123.  
  124. Each of these options have advantages and significant disadvantages for the 
  125. new user.  Installing OS/2 as the operating system may be what IBM would 
  126. prefer that you do but it makes "going back" difficult and means that you can 
  127. not use several OS/2 incompatible programs.  On the surface, dual boot seems 
  128. like the best answer since it means you can still boot to DOS whenever you 
  129. need to.  Unfortunately, dual boot also means that your C: partition and root 
  130. directory get rather crowded with the files and directories for two operating 
  131. systems plus a system failure during a boot change can leave you with a sys-
  132. tem that can only be booted from floppy and hopefully one of the file recov-
  133. ery programs can sort out what happened to your hard drive.  Finally, there 
  134. is boot manager that lets you install OS/2 into another primary partition or 
  135. an extended partition (the partition can even be on a second hard disk).  The 
  136. "gotcha" with boot manager is you must create a partition on your primary 
  137. hard disk for boot manager which means deleting an existing partition and 
  138. then creating a new partition for boot manager and a truncated partition from 
  139. the remaining free space.  Any files or programs that were in the deleted 
  140. partition have now been lost and must be restored from backup or re-installed.  
  141. To add insult to injury, the boot manager program only requires 14 K bytes of 
  142. disk space but the FDISK programs (both DOS and OS/2) insist on a minimum 
  143. partition size of 1 MB or one complete cylinder.
  144.  
  145. When confronted with this quandary, I initially opted for dual boot.  I liked 
  146. what I saw in OS/2 and luckily had created several partitions on my hard disk 
  147. way back when.  When I wanted to switch to boot manager, I was able to do 
  148. some logical drive to logical drive copies, delete my primary partition, 
  149. create a boot manager partition, and restore my C: drive with more logical 
  150. drive to logical drive copies.  This was a hassle and I was lucky to have both 
  151. enough free disk space and to have created several logical drives.  I still 
  152. didn't like devoting a full 1 MB to a boot manager partition when only 14 KB 
  153. is required.
  154.  
  155. As with most other people in this situation, I wondered how hard it would be 
  156. simply clear out sufficient space on my hard disk to create the boot manager 
  157. partition without going through the whole process of deleting a partition, 
  158. creating the boot manager partition, etc., etc.  The difference was that some 
  159. previous work I had done with DOS partitioned hard disks meant that I either 
  160. knew the answers to these questions or could easily find out.  A little re-
  161.  
  162. *       OS/2 is a trademark of Iternational Business Machines Corporation 
  163.     (IBM).  All trademarks mentioned in this document are the property of 
  164.     their respective owners.  These trademarks are mentioned in this doc-
  165.     umentation only for clarity; this use does not reflect any endorse-
  166.     ment or fitness of use of MKBMPART by the trademark owner nor by me 
  167.     of the trademarked software.
  168.  
  169.                     - 1 -
  170. search and an initial prototype showed that the answer was it wasn't that 
  171. hard at all!  A little more research though (like trying to install OS/2 with 
  172. boot manager using the newly created boot manager partition) showed that I 
  173. wasn't there yet. OS/2's FDISK program didn't like my abbreviated boot man-
  174. ager partition.  It wanted 1 MB of free disk space in which to create a par-
  175. tition for and install the boot manager program.
  176.  
  177. I could have left "things" at this point but felt that solving the whole 
  178. problem also meant minimizing the boot manager footprint.  A little more re-
  179. search was required to come up with how boot manager is installed and what is 
  180. required for the OS/2 installation program to recognize the installation.  
  181. The final result is the program MKBMPART (MaKe Boot Manager PARTition).  
  182. MKBMPART adjusts the size of an existing partition to create a partition for 
  183. boot manager from free space available and installs the boot manager program.
  184.  
  185. 2.      Before Running the Program
  186.  
  187. MKBMPART can create a partition for the boot manager program and install boot 
  188. manager.  In order to do this, you must make two decisions:
  189.  
  190. 1.      Where should MKBMPART make the boot manager partition?
  191. 2.      What do you want to call your current primary partition in the boot 
  192.     manager menu?
  193.  
  194. Sections 2.1 and 2.2 provide some guidance in how to answer these questions.  
  195. Section 2.3 provides some general information about OS/2 installation consid-
  196. erations that may affect how you answer the previous questions.  Section 2.4 
  197. describes what you'll need in order to run MKBMPART.
  198.  
  199. 2.1     Where should MKBMPART make the boot manager partition?
  200.  
  201. This question is actually fairly easy to answer since there are only two 
  202. possible answers.  Due to the nature of the File Allocation Table (FAT) file 
  203. system and the way extended partitions "work", MKBMPART can only create the 
  204. boot manager partition at 1) the end of the (DOS) primary partition or 2) at 
  205. the end of an extended partition (i.e., at the end of the space allocated to 
  206. the last logical drive in the extended partition). Furthermore, the end of 
  207. the extended partition can only be used if the last logical drive in the 
  208. extended partition uses the FAT file system.  If you only have a single pri-
  209. mary partition on your hard disk but have two hard disks, the question is 
  210. moot since there is only one possibility.  If you have an extended partition 
  211. and the last logical drive uses the FAT file system then this is the recom-
  212. mended location.  If you only have a single hard disk and you didn't divide 
  213. it into logical drives, MKBMPART can't help you unless you either buy another 
  214. hard disk or change the partitioning of your existing hard disk.  Sorry.
  215.  
  216. Once you have made this decision, you must ensure that no files use the "end" 
  217. of this partition.  This can usually be accomplished by running a disk defrag-
  218. mentation program.  MKBMPART will tell if there are any allocated clusters or 
  219. clusters marked as unusable in the region required for the installation of 
  220. the Boot Manager program.  Simply run the program and see which partitions it 
  221. identifies as suitable or unsuitable.  Disk diagnostic programs such as the 
  222. Norton Utilities or PC Tools can be invaluable in identifying which file or 
  223. files are "in the way".  
  224.  
  225. If MKBMPART reports that the partition you would like to use is unsuitable 
  226. after defragmenting there are two possibilities.  The first is that there is
  227.  
  228.                     - 2 -
  229. an unusable cluster in the area that MKBMPART requires to be free.  If this 
  230. is the case, you need to either choose a different location or you can not 
  231. use MKBMPART to make your boot manager partition.  The second is that an 
  232. "unmovable" file resides in this area.  Since this is the "end" of the disk, 
  233. this file is probably the result of running an system area save program (e.g.,
  234. the MS-DOS 5.0 "mirror" program, Norton Utilities "Image" program, etc.).  
  235. Type the command "dir/a:h" in the root directory of the drive and consider 
  236. the files identified.  The files MSDOS.SYS and IO.SYS (or their PC-DOS equiv-
  237. alents IBMDOS.COM and IBMIO.COM) are generally not the problem since these 
  238. files are at the very beginning of the drive.  Any other files reported may 
  239. be the culprits.  Move the offending file(s) to a different location or de-
  240. lete them.  If you are using a deletion tracking program that allows you to 
  241. undelete files, you will also need to "purge" the file(s) after you delete 
  242. them since the deletion tracking program is managing your disk's free space 
  243. and the location these files occupied will still be marked as allocated in 
  244. the FAT.
  245.  
  246. The files reported may have other attributes set such as "read only" and 
  247. "system" that make deleting them difficult.  Consult your DOS documentation 
  248. for how to change file attributes.  Some disk defragmentation program allow 
  249. you to see which files occupy a particular portion of your disk.  Consult the 
  250. documentation for whatever disk tools you have available.
  251.  
  252. After the release of OS/2 2.1, much ado was made about installing the boot 
  253. manager program at either the very beginning of the drive or at the very end.  
  254. This was because installation of the boot manager partition "in the middle" 
  255. of a hard disk would result in one megabyte of "dead space" in the middle of 
  256. drive that was never accessed once the system had booted.  This would degrade 
  257. disk performance since the disk's head would have to move back and forth 
  258. across this space during normal system operation increasing the seek time.  
  259. By using MKBMPART in either standard or aggressive mode this becomes less of 
  260. an issue since the boot manager partition will only consume at most one cyl-
  261. inder of disk space.  The existence of a single cylinder of dead space should 
  262. have a negligible effect on the performance of the disk.  The bottom line 
  263. here is that you can install boot manager using MKBMPART wherever it will fit 
  264. as long as you are using standard or aggressive mode.
  265.  
  266. 2.2     What to Name the Bootable Partitions
  267.  
  268. If you have three bootable partitions, "Larry", "Curly", and "Moe" might be 
  269. fun...  You can call them anything you like as long as the names are eight 
  270. (8) or fewer characters long.  Most people find meaningful (but boring) names 
  271. like "OS/2 2.1" and "DOS 5.0" to be more helpful in deciding which partition 
  272. to boot from.  The choice is yours and you can change the names by running 
  273. OS/2's FDISK once you have OS/2 installed.
  274.  
  275. 2.3     Where are you going to install OS/2 and Primary vs. Extended?
  276.  
  277. The considerations that go into answering these two questions are beyond the 
  278. scope of this document.  There are two things to consider:
  279.  
  280. 1.      If you want to use the high performance file system (HPFS) for your 
  281.     OS/2 partition, it should (but isn't required to be) the last parti-
  282.     tion on the physical disk so that drive letter assignments don't 
  283.     change between DOS sessions and OS/2 sessions.  This does NOT present 
  284.     a conflict with the MKBMPART requirement that the last logical drive
  285.  
  286.                     - 3 -
  287.     in the extended partition use the FAT file system if you want the boot 
  288.     manager partition created at the end of the extended partition and 
  289.     actually makes things easier.  MKBMPART runs before you install OS/2.  
  290.     Thus, as long as this partition uses the FAT file system when you run 
  291.     MKBMPART, there isn't a problem.  This situation makes the preparation 
  292.     for MKBMPART easier since it allows you to simply format what will be 
  293.     the destination OS/2 drive using the DOS format command.  Formatting 
  294.     the drive easily removes any possible conflicting files.
  295.  
  296. 2.      If you install OS/2 into a primary partition on the first hard disk, 
  297.     the DOS primary partition will NOT be visible from an OS/2 session.  
  298.     Likewise, the OS/2 primary partition will not be visible from a DOS 
  299.     session even if you elect to use the FAT file system for this parti-
  300.     tion.  Regardless of whether you put OS/2 in a primary partition or 
  301.     in a logical drive in an extended partition, the OS/2 partition will 
  302.     not be visible from a DOS session if you elect to use the HPFS for it.  
  303.     Finally, if you install OS/2 in a logical drive in an extended parti-
  304.     tion or a primary partition on the second physical hard disk, all 
  305.     partitions will be visible to the OS/2 session and you will still be 
  306.     able to access the OS/2 partition from DOS running under OS/2 even if 
  307.     the OS/2 partition is formatted HPFS (but only those files and direc-
  308.     tories that are DOS legal).  An advantage of putting OS/2 in an exten-
  309.     ded partition on the second physical disk is that drive letter assign-
  310.     ments for any logical drives on the first physical disk do not change 
  311.     regardless of whether you boot to DOS or OS/2 even if the OS/2 parti-
  312.     tion uses the HPFS.
  313.  
  314. Note: I have had mixed success with OS/2's installation program updating the 
  315. boot manager menu correctly when OS/2 is installed on the second physical 
  316. disk.  On my test system (80386DX/25 with two ST-251-1 MFM hard disks), the 
  317. menu is constructed correctly.  On my development system (80486DX2/66 with 
  318. two large SCSI hard disks), I have had to start OS/2 from floppy and use the 
  319. installed copy of FDISK to first remove and then to add the OS/2 partition 
  320. name to the boot manager menu after the installation was complete.
  321.  
  322. 2.4     What Else You'll Need
  323.  
  324. In order to run MKBMPART you will need two blank, formatted floppy disks and 
  325. disk 1 from the OS/2 2.1 distribution set*.  The first floppy is used to hold 
  326. the MKBMPART program and its related files.  Since MKBMPART modifies the 
  327. information that allows the data on your hard disk to be addressed, it would 
  328. not be wise to run the MKBMPART program from this same hard disk.  The second 
  329. floppy is used to save a back-up copy of the system area of your hard disk.  
  330. In case there is a problem with the operation of MKBMPART on your system, 
  331.     
  332. *       Note to owners of the CD-ROM version of OS/2 2.1: The CD-ROM version 
  333.     of OS/2 comes with four floppies (two pair of 5.25 inch and 3.5 inch 
  334.     floppies that are used to start the installation process).  The 
  335.     floppy disk labelled "Disk 1" is not the same as Disk 1 from the 
  336.     floppy installation set.  You will need to create a disk image using 
  337.     the LOADDSKF progam of DISK 1 from the floppy distribution set.  The 
  338.     diskette images can be found in R:\DISKIMGS\OS2\35 or 
  339.     R:\DISKIMGS\OS2\525 where R: is the drive letter of your CD-ROM drive 
  340.     and the "...\35" subdirectory holds disk images for 3.5 inch floppies.  
  341.     The "...\525" subdirectory holds the 5.25 inch floppy images.  The disk 
  342.     size used should match your A: drive.
  343.  
  344.                     - 4 -
  345. this back-up copy allows the RMBMPART (ReMove Boot Manager PARTition) program 
  346. to restore your system to its original configuration.  Disk 1 from the OS/2 
  347. 2.1 distribution set contains the OS/2 FDISK.COM program.  Within FDISK.COM 
  348. is the boot manager program.  MKBMPART extracts boot manager from FDISK.COM 
  349. in order to install it on your hard disk (you may wish to use a copy of the 
  350. OS/2 2.1 distribution disk for this purpose).
  351.  
  352. 3.      Running the Program
  353.  
  354. Start MaKe Boot Manager PARTition by typing MKBMPART and hitting the enter 
  355. key in the directory where you have placed the MKBMPART files.  MKBMPART 
  356. allows you to quit at virtually any time up to the point at which you confirm 
  357. your selections.  Help is available from some screens by striking the "?" key.  
  358. After you start the program, MKBMPART will ask you to choose between three 
  359. boot manager partition size options.  These options are:
  360.  
  361. 1.      Full Compatibility - This option allocates a full 1 MB to the boot 
  362.     manager partition.  More than 1 MB may be allocated since complete 
  363.     cylinders are used.
  364. 2.      Standard - This option allocates space for the boot manager partition 
  365.     on a cylinder boundary.  At a minimum, one complete cylinder is allo-
  366.     cated for boot manager.
  367. 3.      Aggressive - This option allocates the minimum space possible to the 
  368.     boot manager partition.  Some disk tools (the Norton Disk Doctor in 
  369.     particular) complain if a partition consists of other than complete 
  370.     cylinders.  Allocation is done in complete tracks.  At least one 
  371.     complete track is allocated to boot manager.
  372.  
  373. MKBMPART will examine your system to determine which location(s) is(are) 
  374. suitable for making the boot manager partition based on the boot manager 
  375. partition size option chosen.  MKBMPART will then ask you to identify where 
  376. you want the boot manager partition created.  Once you have successfully pro-
  377. vided this information, MKBMPART will ask you to provide a name for your 
  378. current primary partition to be used in the boot manager menu.  Finally, 
  379. MKBMPART will ask you to confirm your selections.  If you wish to change a 
  380. selection, exit the program and re-start MKBMPART.
  381.  
  382. After you confirm your selections, MKBMPART will then ask you to provide a 
  383. floppy disk so that it can save a snap-shot of your current system definition.  
  384. This can be the same floppy as you use to run MKBMPART as long as there is 
  385. sufficient space.  After saving this snap-shot, MKBMPART will ask you to 
  386. provide disk 1 from the OS/2 2.1 distribution set.  This is the distribution 
  387. disk that contains the OS/2 version of FDISK.
  388.  
  389. Once you provide the requested distribution disk, MKBMPART will request that 
  390. you confirm that you want the partitioning of you hard disk to be modified 
  391. and the boot manager program installed.  If you confirm that MKBMPART should 
  392. proceed, the partition table for your primary hard disk is modified and the 
  393. boot manager program is installed.  In addition, the boot record for the 
  394. affected logical drive is updated to reflect the change in the space avail-
  395. able on that drive.  After the necessary data has been modified, MKBMPART 
  396. will ask if it can re-boot your system so that the changes can take affect.
  397.  
  398.                     - 5 -
  399. 4.      After Running MKBMPART
  400.  
  401. You can now install OS/2 but with one critical difference: boot manager is 
  402. already installed.  And your system will now start-up using boot manager to 
  403. determine which partition to boot from.  When you install OS/2, you will be 
  404. presented with several introductory screens explaining the installation 
  405. process.  You will then be presented with a screen titled "Installation Drive 
  406. Selection" (see page 64 of the OS/2 2.1 Installation Guide).  You can either 
  407. accept the default drive selection presented (C:) or choose the alternative 
  408. "Specify a different drive or partition".  You wouldn't have gone through 
  409. running MKBMPART if you wanted the default so select "Specify different drive 
  410. or partition".  This starts the OS/2 FDISK program and allows you to identify 
  411. another partition and/or drive as the destination for your OS/2 installation 
  412. and to add this partition to the boot manager menu*.  Refer to the OS/2 2.1 
  413. Installation Guide for how to proceed from this point.
  414.  
  415. Had you not used MKBMPART, at this point you would have been forced to delete 
  416. an existing partition in order to create sufficient free space to make the 
  417. boot manager partition.  All programs and data in the deleted partition would 
  418. be lost and you would have to re-install or restore them from back-up.  In 
  419. addition, a full 1 MB of disk space would be allocated to a 14 KB program.  I 
  420. created this innovative program because I saw a need that was not being met 
  421. by the existing OS/2 installation capabilities.  For individual users, if you 
  422. found this program useful, please let me know about it.  I can be reached 
  423. electronically at any of the following addresses:
  424.  
  425. Delphi: MILLER2615      Compuserve: 72040,1017          Prodigy: CGVD94A
  426.  
  427. I can be reached from the internet as either miller2615@delphi.com or 
  428. <72040.1017@compuserve.com>.  
  429.  
  430. If you wish, a $5.00 (U.S) registration fee gets you good karma and supports 
  431. me in creating additional innovative programs such as this (I have several 
  432. ideas for hybrid DOS-OS/2 programs and pure OS/2 programs).  The $5.00 reg-
  433. istration will be credited toward the registration of a future program I 
  434. release that you choose to register.  Corporate users can obtain a site 
  435. registration for $50.00 (U.S.).  This site registration entitles you to the 
  436. same good karma as individual users get (but for your complete site) and 
  437. e-mail and phone support.  I consider this pricing reasonable since corporate 
  438. users are more likely to use this program on multiple machines and thus have 
  439. a higher likelihood of needing support.  The program is fully functional in 
  440. its distributed form so registration is simply an act of honesty.
  441.  
  442. Registrations can be mailed to:
  443.  
  444. Mr. David G. Miller
  445. 2615 Plaza Del Amo #620
  446. Torrance, CA 90503
  447.  
  448. *       During testing, I noticed that OS/2's FDISK program did not identify 
  449.     the Boot Manager partition created by MKBMPART as "STARTABLE".  Not 
  450.     sure why this occurred since running FDISK under OS/2 (once it was 
  451.     installed) did correctly identify the Boot Manager partition as 
  452.     STARTABLE.  All you need to do under is identify a partition as "IN-
  453.     STALLABLE" after setting up Boot Manager using MKBMPART.  Do not be 
  454.     concerned that FDISK does not say that the Boot Manager partition 
  455.     is STARTABLE.
  456.  
  457.                     - 6 -
  458. 5.      How MKBMPART Works
  459.  
  460. MKBMPART takes advantage of the simplicity of the FAT file system to chop off 
  461. a small portion of one logical drive to make room for the boot manager parti-
  462. tion.  In particular, the FAT file system never "looks at" the partition 
  463. table except when a logical drive is being formatted or when FDISK is used to 
  464. modify a hard drive's partitioning.  Instead, the size of a logical drive is 
  465. determined by entries in a portion of the boot record known as the BIOS Par-
  466. ameter Block (BPB).  This approach is probably a carry over from DOS's early 
  467. years as a floppy disk based operating system.  Floppy Disks do not have a 
  468. partition table and all information about the size of the disk is in the BPB.  
  469. By changing the number of sectors on the logical drive in the BPB, the size 
  470. of the drive can easily be changed by a small amount.
  471.  
  472. In theory, any change to the number of sectors available should also be re-
  473. flected in the amount of disk space allocated to the file allocation tables.  
  474. A little arithmetic shows that even if the full 1 MB of disk space is allo-
  475. cated to the boot manager partition, very little space would be gained by 
  476. adjusting the size of FAT to reflect the changed size of the disk.  For the 
  477. worst case, assume the logical drive being shortened has 2 KB allocation 
  478. units (also known as the cluster size).  1 MB of disk space then requires 512 
  479. FAT entries.  Each FAT entry is a 16 bit or two byte number so 512 FAT en-
  480. tries take a total of 1 KB of disk space.  Since there are two copies of the 
  481. FAT for a disk, we double this amount to get 2 KB of disk space taken up by 
  482. the FATs should be freed for a 1 MB boot manager partition.  Since this is 
  483. all of one 2 KB allocation unit, I decided that it isn't worth the trouble 
  484. or the risk to recover it.  Testing of MKBMPART showed that DOS is insen-
  485. sitive to having more space available for the FATs than is required.
  486.  
  487. If you use either the standard or aggressive partition sizes for the boot 
  488. manager partition, the amount of space "lost" in unneeded FAT sectors rapidly 
  489. shrinks to insignificance.  Since disk space for each copy of the FAT is 
  490. allocated in whole sectors, it is very likely that the amount of space 
  491. required for the FATs will not change as a result of creating the boot man-
  492. ager partition using the aggressive mode.
  493.  
  494. In addition to the changes MKBMPART makes to the boot record of the selected 
  495. drive, boot manager makes changes to the primary partition table for the hard 
  496. drive to add the boot manager partition.  If you choose to make the boot man
  497. ager partition at the end of an extended partition, boot manager must also 
  498. update the chain of extended partition definitions.  This update consists of 
  499. simply shortening the length of the partition.
  500.  
  501. 6.      If Things Go Wrong
  502.  
  503. For any number of reasons, you may decide that what MKBMPART did to the log-
  504. ical organization of your disk isn't quite what you wanted.  Included with 
  505. the MKBMPART distribution file set is a program call RMBMPART (ReMove Boot 
  506. Manager PARTition).  This program can restore your system to the state it 
  507. was in prior to when you ran MKBMPART.  In order for RMBMPART to do this, it 
  508. must be able to access the data saved by MKBMPART when you originally instal-
  509. led the boot manager program.  To restore your previous configuration, simply 
  510. run the RMBMPART program.  This program will prompt you to provide the floppy 
  511. disk that has the system image saved by MKBMPART.  It will restore your par-
  512. tition table(s) and the boot record of the logical drive that was modified to 
  513. make room for the boot manager program to the previous settings.  When 
  514. RMBMPART completes, your system must be rebooted for the changes made by 
  515.  
  516.                     - 7 -
  517. RMBMPART to take affect.
  518.  
  519. Please note: MKBMPART and RMBMPART make no provision for renaming the file 
  520. containing the system image saved as part of the installation process.  If 
  521. you use the same floppy to save the system image for several systems, the 
  522. last system's image will be the only one that "survives".  If there is suf-
  523. ficient interest and demand (read that as paying registrations plus people 
  524. who need the capability), I can add a capability to append additional images 
  525. to the file rather than overwriting the existing image and to provide ident-
  526. ification information for each image.
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.                 - 8 -
  571. Appendix:       Error Messages
  572.  
  573. The following messages may be displayed by MKBMPART if it encounters certain 
  574. conditions that should not occur.  Please make a note of the message and 
  575. contact the author for technical assistance.  For each possible error, a 
  576. brief explanation is provided and, if possible, appropriate remedial action.  In general, on a properly operating system, these errors should never occur.
  577.  
  578. 1000    Unable to read primary partition table.
  579.  
  580.     The DOS service used to read the partition table was unable to read 
  581.     the sector at cylinder 0, head 0, sector 1.  If your system otherwise 
  582.     operates correctly, this means things are pretty strange.
  583.  
  584. 1001    Primary partition table has four entries.  No room for Boot Manager 
  585.     entry.
  586.  
  587.     A partition table can have at most four partitions defined.  Your 
  588.     primary partition table already has four entries thus leaving no room 
  589.     for the Boot Manager partition entry.
  590.  
  591. 1002    No bootable partition in primary partition table.
  592.  
  593.     MKBMPART was unable to find a partition marked as bootable (or start-
  594.     able) in your primary partition table.  Use FDISK to make a partition 
  595.     "active".
  596.  
  597. 1003    Unable to read extended partition table.
  598.  
  599.     The DOS service used to read the extended partition tables was unable 
  600.     to read one of them.
  601.  
  602. 1004    Unable to read boot record for candidate partition.
  603.  
  604.     The boot record is on the first sector in a partition.  For FAT file 
  605.     system drives, it contains the number of sectors for the drive.  This 
  606.     number must be changed in order to define the Boot Manager partition.
  607.  
  608. 1005    Unrecognized disk logical structure (only one FAT).
  609.  
  610.     One of the parameters in the Boot Parameter Block of the boot record 
  611.     that defines the drive's logical structure indicates that only a 
  612.     single copy of the FAT is defined for this disk.  This is not stan-
  613.     dard and MKBMPART will not work on such a drive.
  614.  
  615. 1006    Unable to retrieve FAT for candidate partition.
  616.  
  617.     The DOS service used to read the File Allocation Table (FAT) indica-
  618.     ted that and error occurred while attempting to read the FAT.
  619.  
  620. 1007    Unable to allocate memory required to build boot manager program.
  621.  
  622.     MKBMPART was unable to allocate temporary memory.  Given the small 
  623.     size of this program, it is unlikely that a system will be encoun-
  624.     tered that has insufficient memory for the operation of MKBMPART.
  625.  
  626.                 - 9 -
  627. 1008    Unable to read file 'FDISK.COM'.
  628.  
  629.     MKBMPART attempts to open (read only) the file FDISK.COM in order to 
  630.     retrieve the Boot Manager program.  Either the open or the file read 
  631.     failed.
  632.  
  633. 1009    Unable to modify boot record for changed partition size.
  634.  
  635.     MKBMPART was unable to rewrite the boot record to reflect the change 
  636.     to the drive's size.
  637.                  
  638. 1010    Unable to write partition table.
  639.  
  640.     A write error occurred when MKBMPART attempted to write the modified 
  641.     partition table with the changes required for the installation of the 
  642.     Boot Manager partition.
  643.  
  644. 1011    Bad data value in partition table.
  645.  
  646.     An invalid data value was encountered when MKBMPART was attempting to 
  647.     modify the partition table.  Check the partition table using a disk 
  648.     integrity tool.
  649.  
  650. 1012    Unable to write boot manager program to boot manager partition.
  651.  
  652.     A write error occurred when boot manager attempted to write the Boot 
  653.     Manager program to the intended location for the chosen partition 
  654.     creation strategy.  This could occur if a marginal sector exists in 
  655.     the region MKBMPART will use to install the boot manager program.  
  656.     Depending on the type of hard disk involved, you may be able to 
  657.     "revive" the sector using a tool such a "Spinright" or Norton's Cal-
  658.     ibrate.  If all else fails, choose a different partition creation 
  659.     strategy since this will result in the Boot Manager program being 
  660.     written to a different location on your disk.
  661.                       
  662. 1013    Unable to restore previous boot record data (write error).
  663.  
  664.     An error occurred when RMBMPART attempted to restore the previous 
  665.     boot record data.
  666.                          
  667. 1014    Invalid extended partition definition encountered.
  668.  
  669.     An extended partition table should have exactly one or two entries.  
  670.     If it has more than two entries, MKBMPART does not know how to deal 
  671.     with this type of extended partition.
  672.  
  673. 1015    More than the maximum number of logical drives have been found.
  674.  
  675.     MKBMPART assumes that no more than 26 logical drives can be defined.
  676.                            
  677. 1016    Unable to determine logical drives defined on system.
  678.  
  679.     MKBMPART queries DOS to determine the characteristics of the logical 
  680.     drives currently defined on the system.  If the query fails, MKBMPART 
  681.     can not continue.
  682.  
  683.  
  684.                 - 10 -
  685.