Partition Manager  Ver 2.31                            Brief introduction

   What is partition table, MBR, IPL?

   Saving MBR to disk
   Restoring MBR from disk

   Creating a new partition
   Selecting an active partition
   Formatting partition, supported file systems

   Installing and uninstalling a new IPL
   Understanding IPL boot time messages
   Virus protection and timesaving hints

   Command line options and exit codes

   Developer's information

   Contacting author and copyrights


Introduction It is a total solution for the partitioning disks and formatting FAT file systems. People who have more than one operating system on their computers or do system installations on the daily basis will undoubtfully benefit from it. Here is a short list of the program's features: - Save and restore MBR - Edit your partition table - Edit Extended DOS partitions - Hide and unhide any partition - Create, delete, and verify partitions - Format FAT partitions with 1/2k to 64k clusters - Select active OS at the boot time - Detect presence of the boot viruses in memory - Eliminate accidental boots from the floppy drive - Boot from the second hard drive, and much much more ...
What is partition table? Partition table is located in the first sector on every hard disk. It has information about sizes and locations of partitions on the disk. What is partition? It is a piece of disk space marked to belong to some operating system. For example, your C: drive resides in the partition of the type BIGDOS. Most disks have one partition, but some people want to have more than one operating system on their computers and, therefore, have to divide their disk into different partitions. That's why partition table also keeps an indicator of the currently 'Active' partition - one from which computer boots. When you turn on your computer BIOS loads into memory the first sector from the disk, called MBR (Master Boot Record). In addition to partition table, that sector contains an IPL (Initial Program Loader) - a piece of code that searches partition table for an 'Active' record and loads in memory boot sector of the corresponding operating system. A standard IPL would simply load a boot sector without any messages or questions. And this is good if you have only one operating system, but when you have more then one then you would need something more sophisticated. For example, IPL that comes with this program can ask user at the boot time which operating system he want to boot and will remember selection, so it will know which OS to boot next time.
Saving and Restoring MBR Saving you MBR is the first thing you have to do before playing with this program. First of all create a bootable floppy disk and copy this program to floppy. Than you have to save your MBR to a file. You can do it by using S command in interactive mode or by running program from the command line: PART S A:\filename.mbr And similarly you can restore it by running: PART R A:\filename.mbr If you are using same floppy with more than one computer be careful not to put MBR from one hard disk onto another. It will do no harm, but you will have a few minutes of panic, that you loose all you files, before you figure out what happend. (I witnessed that once). So make sure that you give those files distinctive names. Anyway if you load wrong MBR in interactive mode it will most likely became RED, because program will sence if partition settings conflict with hard disk geometry.
Selecting active partition To make partition active you can press SPACE in the interactive mode or from the command line: PART A <n> where <n> is partition number If you have installed an IPL then you can press SPACE on the active partition to make it inactive and when you reboot computer it will try to boot from the second hard disk or from a floppy, if you have only one disk.
Creating a new partition To create a new partition just go to the empty record and select desired File System type. Then put values for starting and ending cylinders. Instead of cylinders you can enter starting sector and partition size if you switch the mode by pressing F4. Make sure that partition do not occupy partial sides on the ends. Moreover, it is recommended that partitions start and end on the cylinder boundaries. While you are entering numbers partition may turn red. Don't worry about it until you finish. The red color of the partition means that its settings appear to be invalid or conflicting with current disk geometry. First of all you have to check that cylinder, head, and sector numbers are within correct ranges. Move cursor on their fields to see the hint with allowed values. Then you have to make sure that partition starts before it ends and do not overlap any other partition or MBR which is located in the first sector of the disk or extended DOS partition. If the red color appears as soon as you started it might be that partition table is damaged. Also this may happen if you connected hard disk to another computer, which has different way of presenting disk parameters. If this is the case don't change any values unless you are absolutly sure what you are doing. Hint for the professionals: no matter how BIOS will represent disk geometry the relative number of sectors and partition sizes will hold. Therefore to fix the problem you can switch to the LBA mode by pressing F4, and write down partition parameters. Then you have to change one of them to some value and then back to original. This will force the program to recalculate CHS values according to the current disk geometry. When you are done press F2 to commit changes to disk. If you need to install several operating systems such as MS-DOS, Windows 95, and Windows NT, and you want to avoid their interference with each other you can hide one partition, while installing operating system into another and unhide it later. For example, when I want to hide a partition I set its type to 0xFF, and then restore it back.
Formatting partition You can format partitions or just check disk surface for bad sectors without destroying the data. To verify any partition press V in interactive mode or run: PART V <n> where <n> is partition number To format partition press F in interactive mode or run: PART F <n> options ... Format options depend on file system that you are formatting. Note: If you are running this program under Windows 95 or NT you will not be able to format disks, because they protect their disks from direct writes. You should exit to DOS prompt from Windows 95 or boot from a DOS floppy in case of Windows NT.
Installing a new IPL This program comes with two versions of alternative IPLs. First one allows to select active partition at the boot time and remembers last selection. You can also boot from a floppy or a second hard drive. It also can detect boot viruses and warn you of their presence. The Second version is same but has disabled virus detection in case if your system gives false alarms. You can always uninstall those IPL by installing a standard IPL that is originally placed on any new computer. Use option U. Furthemore, you can install a third party IPL code that you get in a disk file. For example, if you saw a nice IPL code somewhere and saved it with this program to disk, you can install it on your computer with X option. You only have to be aware that some IPL may occupy more than one sector, while this program works only with one sector lenght IPLs.
Understanding IPL boot time messages Message Description "Booting from: 1 ..." -- Press ESC to skip prompt and boot OS. "Booting from: _" / Press SPACE to stop and wait for selection. Press 1-4 to boot from corresponding partition Press A or D to boot from floppy disk or from the next hard drive. Any other key will resume booting, and will stay in buffer for the OS. For instance F4, F5, F8, ... (see hints) "Writing changes..." IPL is saving your selection into MBR. "I/O Error!" Error reading disk or empty partition selected. "Virus in memory!" IPL found that one of interrupt vectors doesn't point to ROM BIOS memory (see virus protection). You can press ENTER to resume booting, but better shut down computer and run antivirus, after booting from a clean floppy disk.
Virus protection IPL that comes with this program can detect viruses even before operating system gets into memory. This is important, because some of MBR viruses cannot be detected by antivirus programs that are loaded after operating system. Virus detection is implemented by checking 26 interrupt vectors from int 03h to int 1Ch. They must point to addresses C000:0000h or higher, where ROM BIOS resides. Those interrupt controls all vital functions of your system, such as Timer, Video, Keyboard, and Disk. If any of them was changed it is very likely that a virus invaded the system. In such case the IPL stop and warn user. You will have choice of continue booting with virus in memory or rebooting system and run antivirus. See IPL messages section. However on some systems this method will produce falce alarms. In this case you can choose version of IPL without virus detection. Another way of protection from viruses is to avoid accidental boots from the floppy drive. With this program you can do so, while still being able to boot from floppy, when you need. 1. Install IPL that comes with this program. 2. In the BIOS setup change boot sequence to C:,A: 3. If you need to boot from A: at the boot time press A. This trick not only will save you from viruses, but also will speed up your work. It is especcially impressive if you have QEMM 8.xx and MS-DOS or Windows 95. Set "BootFloppy:N" option of QEMM's quick boot and add "SWITCHES=/F" to your CONFIG.SYS file. Next time, when you reboot your computer it will literally take a second, while at the same time you will be more comfortable with pressing F4, F5, and F8 as the IPL's prompt counts down.
Command line options Usage: PART [-L lang] [-D disk] [command ...] PART - Interactive mode PART P - Print partition table PART P /r - Print information about all partitions recursively PART A n - Activate n-th partition PART V n - Verify disk surface of n-th partition PART S file - Save MBR to a file PART L file - Load MBR from a file PART X file - Install IPL code from a file PART I - Install IPL code with virus detection PART W - Install IPL code without virus detection PART U - Uninstall by installing standard IPL code PART Reboot - Reboot computer PART Help - Print help for main program and all modules PART Modules - List available modules for different file systems PART F n ... - Format n-th partition (options depend on file system) Languages: US - English If there was no errors during the command execution program will exit with status code 0. On errors status code will be 1.
Supported file systems Classical MS-DOS file systems 0x01, "DOS FAT-12" 0x04, "DOS FAT-16 (<=32Mb)" 0x06, "BIGDOS FAT-16 (>=32Mb)" FAT-12 file system is used on floppy disks, but also you can use it on a small hard disk partition. It is limited to 4084 clusters. The next file system, FAT-16, was designed for early hard disks. Original version was designed to have up to 64k clusters on up to 32Mb partitions. BIGDOS FAT-16, which was released with DOS 3.31, solves 32Mb limitation and theoretically can be as large as 4G. For backward compartibility all DOS versions later than 3.31 accept both FAT-12 and FAT-16 file systems in the BIGDOS partition. This program includes format utility which formats all three file system types. It has the following options: PART F <n> [/Quick | /Destructive] [/C:cluster_size] If you specify "quick" option program will assume that your hard disk doesn't have any bad sectors. You can verify disk once, and, if there would be no bad sectors you can use quick format subsequently. If you do not specify cluster size it will be selected automatically depending on partition size from 4 sectors and up. Here is the table: Cluster size Maximum partition size 1 sector 512 bytes 32M * 2 sectors 1,024 bytes 64M recommended * 4 sectors 2,048 bytes 128M cluster sizes * 8 sectors 4,096 bytes 256M are marked * 16 sectors 8,192 bytes 512M with '*' * 32 sectors 16,384 bytes 1G 64 sectors 32,768 bytes 2G 128 sectors 65,536 bytes 4G Although you can format disk with all those cluster sizes it isn't recomended to use very small or very large values. Many programs have wierd bugs with that. For example, SCANDISK will freeze if cluster size is 128, while Norton Disk Doctor seems to work without problems.
Extended DOS partition Extended DOS partition is a solution to overcome strange limitation that you cannot have more than one primary (bootable) MS-DOS partition on the hard disk. Actually, you CAN have more than one. The problem is that MS-DOS's fdisk refuses to create second one for you. If you run fdisk it will create one primary partition and then will mark the rest of the space as an Extended partition. The first sector of the Extended partition is called EMBR (Extended MBR). It has the same structure as MBR. And the same limitation applies again: inside each Extended partition you can have one FAT partition, called logical drive, and another Extended partition. If you have several logical drives it will look like many boxes one inside another. Here is an example: HD 520 Mb --------------------------------------------------- Primary FAT-16 120Mb [ C: 120Mb ] Extended DOS 300Mb ----------------------------- FAT-16 100Mb [ D: 100Mb ] ExtDOS 200Mb --------------- FAT-16 200Mb [ E: 200Mb ] --------------- ----------------------------- Linux 100Mb [ / 100Mb ] ---------------------------------------------------
Developer's information Writing language modules It is very easy to write an additional language module for this program. All you have to do is just to write one function which contains about 50 messages and translate this help file. You will not have to go into any technical details or try to understand my code. You don't even have to know C. Just translate all messages in the "part_lng.c" file, which is distributed with this program and send it to me. Writing a new IPL code If you have written an IPL loader code you can distribute it with my package so you don't have to write installation program yourself. Writing format modules You are welcome to write format module for any existing File System.
Contacting author and copyrights This program is a FreeWare. You can freely distibute it. You can use its source code if my name is mentioned. When you send questions, please, include: 1. Version of this program. 2. Version of your operating system. 3. Listing of your partition table (command line option p). 4. Information about all partitions (run: part p /r > some_file). 5. Binary image of your MBR (command line option s). 6. List of all commands that you did before running into troubles. 7. Information about other OS present on your system. 8. Mention if you have Norton Utilities 7+ or similar tools. Mikhail Ranish, ranish@intercom.com http://intercom.com/~ranish