MBRtool version 2.1.100, user
manual (HTML version). Manual version 2.0, revision 4 - dated : December 27th, 2002 This manual was created and formatted while using the Arial font. Select the Arial font as default in your browser for optimal readability.
|
The contents of this
document: General information
|
General
information.
|
This documentation accompanies MBRtool
version 2.1.100.
A word about the version numbering: As of MBRtool version 2 the VRM numbering method is used. This means that the number consists of a Version-number, a Release-number and a Modification-number (and yes, i was inspired by IBM when i thought this up).
The reason for this is that the function list for MBRtool is far from complete. I will continue to add functions to, and if necessary, correct problems with the program. Therefore a more flexible and indicative version-numbering system was needed. I plan to release more versions with added functionality in a shorter time-frame.
CAUTION: changing things in the MBR can be destructive, whether that is intentional or not. Whenever you decide to change something in the MBR, always make a backup first. The backup and restore routines of MBRtool have been tested extensively and are reliable. If something should go wrong during an action that changes something in a MBR, you will be happy that you've made that backup.
|
Files currently in the
distribution :
MBRtool.exe - the program, version 2.1.100 To prevent compatibility issues, the MBRtool.exe file has not been compressed with an
EXE compressor. If you wish to add MBRtool.exe to your recovery
floppy-disk (which would be advisable) compress MBRtool.exe to make sure
it takes up as little space as possible and will fit on the floppy-disk
with the rest of your tools. I would advise using UPX. i have tested
this and found it to be very flexible and reliable.
|
This document assumes the reader to have
some knowledge concerning harddisks and partitioning. You should know what
the Master Boot Record is and what Partition Tables are. We also assume you know how to make
a real-mode bootdisk and have at least working knowledge of Win9x and real mode
environments. You should also know what Simple and Dynamic volumes are
(used in Windows 2K / XP) and what the Windows NT4 equivalents are
(Stripesets and Mirrorsets).
For info on harddisks and recovery check the DIY DataRecovery (http://www.diydatarecovery.nl) pages. This site contains information on harddisk recovery and assorted info.
|
Copyright, disclaimer,
permission and distribution notices.
This program is conceived and coded by Tom Kuurstra. All the Information and/or Programs supplied by us (DIYDataRecovery) are AS IS. Use of this Information and/or Programs is at your own risk. We can not and will not be held responsible for any damage that is inflicted by the person and/or persons using the Information and/or Programs we supply. You may not include (parts of) this program in your own code and/or programs. Please check below for redistribution notices. You, as the user, are not permitted to:
This program is distributed as Freeware. You are free to use and distribute this program, as long as you comply with the above mentioned rules.
|
Program description.
MBRtool allows you to do the following things:
MBRtool can be run from the commandline or from the MBRtool menu. Type "MBRtool.exe" (without parameters) to use the menu. Type "MBRtool.exe /?" to see the parameter list. MBRtool returns errorlevels to DOS so that when the program runs from a batch-file results can be tested. Errorlevels are only returned if the program is run with the commandline parameters, no errorlevels are set when the MBRtool menu is used. MBRtool supports the first 4 harddisks that the BIOS finds. This means that the controller type or the disk type is not relevant. However, if the BIOS does not see the disks or arrays, MBRtool will not see any disks either. Backups can be made from the MBR to sector or to file. MBR Backups to sector: MBRtool can be left to
auto-select a target sector for the backup or MBRtool can be forced to
use a sector, no matter what it contains. Use /SEC
to let the program auto-select a target-sector from the range 2 - 10 or
enter /SEC:x (where x is the
sector) to force the program to write the backup to the selected sector. MBR Backups to file: MBRtool places the file containing the
MBR backup in the current folder. If the file already exists it will be
overwritten. Use /FIL without a filename to use the default filename
(MBR_BACK) or use /FIL:filename to enter a filename to be used for the
backup. The maximum length for the filename is 8 characters. Do not enter the extension.
The extension is added by MBRtool and will consist of the physical disk
number that contains the original MBR, 128 through 131. If you wish to make MBR backups to file and retain a history of backups, use the following batch-file as an example to achieve this. The example will retain the last 3 backups, but can easily be expanded: if exist mbrback3.128 del
mbrback3.128 The Backups: The backups are changed so that the program
recognises them as MBR backups. This means that the backups themselves
are not usable, they must be restored using MBRtool. The method: MBRtool uses int13H calls to access the harddisk
through BIOS. This means that the program will NOT run from
Windows NT or Windows 2000/XP (NT and 2000/XP prohibit access to hardware). If
you wish to use MBRtool on a system running Windows NT or Windows
2000/XP,
you must use a real-mode DOS boot-disk. If you run into problems running
the tool from Command prompts in Windows 9x or ME, use a real-mode
bootdisk.
|
How to use.
MBRtool can be used from the commandline or from the MBRtool menu.
The menu is displayed if no options are entered on the commandline.
MBRtool can be controlled either from the commandline or from the menu.
Both offer the same functions. - Using the command line "MBRtool /?" will display the help-screen and the
copyright notice. /xxx - select the
action to be performed,
where xxx is the selected
action (BCK, RST etc.)
/FIL - select a file
as target or source for a backup, the program will use the default
filename Note : Please note that MBRtool assumes the first disk to be disk 0, the second disk 1 etc. Examples : MBRtool /DSP /DSK:0 - will
display the MBR for disk 0 - Using the menu Typing "MBRtool.exe" without parameters will bring up the
menu. All functions that are available from the commandline are also
available from the menu.
Type "?" (plus Enter) from the menu-prompt to see a shortened version of these directions. The layout of the options across the menu's is as follows: The Main menu: 1 - perform automatic backup of all MBR's to disk The MBR actions menu: 1 - backup
(/BCK) The Track0 actions menu: 1 - save
(/ST0) The Other actions menu: 1 - check if backup sectors are free for auto-select
(/CHK) All commandline arguments in detail : - The actions /BCK - perform a MBR
backup. /RST - restore a MBR
from a previously made backup. /VFY - verify a backup
against the original MBR, or validate a backup. /CHK - check target
sectors. /LST - list the sectors
that contain a backup. /CLR - remove the
backups from the backup sectors. /ST0 - backup up the
entire track 0. /RT0 - restore the
entire track 0. /VT0 - verify track 0
backup against the original on disk. /WT0 - wipe entire track
0. /CT0 - clean track
0. /DT0 - dump track0
(either the original or a file-backup) to a text-file. /NEW - write a blank
MBR-backup file. /DSP - display the MBR,
either the original or a backup. /DMP - dump the MBR (either
the original or a backup) to a text-file. /WPE - wipe the MBR,
either the original MBR or a backup. /BPT - blank the
Partition Table, either in the original MBR or a backup. /WBC - blank the
bootcode, either in the original MBR or a backup. /RBC - write/refresh the
bootcode, either in the original MBR or a backup. /ZVB - zap (remove)
the volume bytes from the MBR, either the original or a backup. /RVB - restore the
volume bytes to the MBR. /SIG - write the
signature bytes for the MBR. /EPT - edit the MBR
Partition Table, either for the original or a backup. /PTM - change attribute
for partitions that are listed in the MBR, either in the original MBR or a backup. - The Partition Table editor When the /EPT option
is selected the Partition Table editor is displayed. Each Table consists of 4 entries, making up the Partition Table. The entries contain, from left to right (as is also displayed in the blue top-bar) the 10 following values :
The following options are valid when in the editor (as displayed in
the menu-bar): When you choose to edit one of the entries, you will be asked to
enter the values for that entry. The program will ask you to enter a
value for each of the 10 values that make up 1 entry. Press 'Esc' (or
'Enter'
without typing any value) to leave that value unchanged. When you have entered the C/H/S values for start and end entries, the
program will calulate the LBA values for the last two fields that make
up the partition table entry. You will still be allowed to edit these
last two values, in case the calculations might be incorrect. This could happen
due to the information that the BIOS returns to MBRtool for disk
geometry. This information can be different for some BIOS's and might
change the outcome for LBA calculations. When performing edit functions
you should check the LBA calculations if you think your BIOS might
return illogical values for your disk geometry. The edit screen displays
the values that are used for LBA calculations at the 3rd line from the
top. If these values are incorrect, calculate the LBA yourself and enter
the values in the appropriate fields. The formula for calculating LBA
addresses is : LBAsector = ((Cyl * DiskHeads) + Head) * DiskSectors +
Sec - 1. Or you can use the Custom Values function ('G') in the editor. The values you enter are checked for consistency. You are allowed to enter more than 1023 cylinders, to correctly calculate the LBA address. However, you are not allowed to enter values higher than your disk geometry for heads or sectors.
|
Windows
NT / 2K / XP Volume Bytes
All Windows versions that use NTFS (Windows NT, Windows 2000, Windows XP) change 4 to 8 bytes in the MBR, at the end of the bootcode. These bytes, known as the Volume Bytes, are used for recording information about so-called "sticky driveletters" and for other drive-letter assignments (check the Windows documentation for info on this. Info can be found in the Resource Kit or the Knowledgebase, which are both available on-line at www.microsoft.com). This means that if you refresh the bootcode using MBRtool (or any tool that is not aware of this issue) these bytes will be overwritten. This is not a problem unless you use sticky driveletters, or dynamic volumes in Windows 2000 / XP. Please note that the current version of MBRtool is capable of restoring the volume bytes from a backup to the MBR on disk, effectively offering support for volume bytes. If you have NO simple or dynamic volumes (in Windows NT4 also known as stripesets or mirrorsets): If in this case the volume bytes are wiped there should be no problem. Windows will ask you if you want to restart the system after the next successfull boot. This is because Windows has reloaded some drivers that have to do with volume mounting and -detection, a direct result of the fact that the volume bytes are no longer present. Answer "Yes" to restart your system. At this point Windows has refreshed the volume bytes in the MBR and all is well. You might want to consider making a backup of the MBR with the Windows 2000 / XP changes. If you use Simple or Dynamic volumes (or the Windows NT4 equivalent): If in this case the volume bytes are wiped it is most likely that some or all volumes are no longer visible to Windows. Perform the necessary recovery by trying to import unknown volumes or by trying to revive volumes. A description of this does not fall within the scope of this manual. Check the Microsoft knowledgebase for information. How to use MBRtool's support for volume bytes: Consider the following scenario: A Windows 2000 professional system with several partitions. You have a MBRtool backup of the MBR of the fully functional system. If for whatever reason you might need to refresh the bootcode in the MBR for this system you would go through the following steps:
This should leave you with a fully accessable list of volumes after the next reboot. CAUTION: the MBRtool functionality of dealing with volume bytes is built on real world tests, as it is difficult to find solid information on how Windows deals with this. Therefore it is possible that MBRtool does not achieve the desired effect when working with volume bytes. Always make backups of your system and your MBR when working with volume bytes.
|
Run
errors, program notifications and errorlevels Program notifications In
a normal MBRtool run all the messages displayed are notifications. The
program informs you of the operation that has been requested and what
the result is. If the displayed message starts with a '-'
(as in '- Backup NOT written to sector')
it means that something has gone wrong and that the operation was not
completed, or was aborted. This usually means that MBRtool could not get to
the necessary resources (the backup-sector, the backup-file or the MBR)
to complete the action. Check to see if the backup-sector or backup-file
are not corrupted (by displaying them) and check to see if you have
selected an existing disk for the operation. Errorlevels MBRtool returns errorlevels when used from the commandline. These errorlevels can be used to test for results when MBRtool is called from within a batch-file. The errorlevels are:
When the program exits, the highest encountered errorlevel during program execution is returned to DOS. This errorlevel value is also displayed by the program on exit. Errorlevels are not returned or displayed when the MBRtool menu is used. An example batch-file : REM example batchfile for running
MBRtool and checking for results If something unexplainable happens and you ask for support, be sure to include any messages the program displays. If a situation occurs that MBRtool can not handle, the program will abort with an error message. Please send the message with the error codes to us (see contact information) and we'll get back to you as soon as we can. Please observe our "E-mail notification" notice, this can be found on the web-pages. Check the information at the end of this document.
|
Tools used in
creating MBRtool and other copyrights that need mentioning.
MBRtool was created using Powerbasic for DOS, version 3.5. All mentioning in the text of "win9x/DOS "
refers to MS-Windows, (c) Microsoft Coorporation.
|
Known issues
for this version.
None yet.
|
Version
history, and what to do with backups from previous
versions.
Current version : 2.1.100 Changes since version 2.0.150:
Changes since version 2.0.100:
Changes since version 1.20:
Changes since version 1.10:
Changes since version 1.01:
Changes since version 1.00:
What to do with old backups: Backups made to sector can always be restored,
regardless of the MBRtool version. These do not contain MBRtool specific
info (except for the signature byte changes, see Program Description).
|
Contact information.
DIYDataRecovery : website : DIY
DataRecovery , (http://www.diydatarecovery.nl)
- general datarecovery tools, help and information Check the webpages for current info on MBRtool. If you wish to have this manual in an unformatted file (text) or another format (RTF), mail me. I will send it to you.
|
The
E-mail support notification.
We receive a lot of E-mail requesting support in one form or another. To make things a little easier for us we ask you to give us as much information as possible, so that we can help you quicker and do not have to guess at things. Datarecovery is an exact science. When you have a question concerning MBRtool please include the following things:
If these things are not included in the support request you will not receive an answer. Support for MBRtool is limited to support for the program itself. I, the author, will not assist anyone with general datarecovery problems. If you have general datarecovery problems, go to http://www.diydatarecovery.nl. How to make a Partinfo log file: Partinfo is a tool that
is part of the Powerquest PartitionMagic suite. The Partinfo tool can
be downloaded from the Powerquest webpages. Thanks for complying.
|
Who am I
?
My name is Tom Kuurstra. I was born and raised in Haarlem, The Netherlands (Europe). In my daily job i work as a systems manager on IBM's AS/400 systems (this might explain my interest in commandline oriented tools). I am affiliated (though not yet in a commercial way) with DiyDataRecovery. A while ago my good friend Joep van Steen (who now runs the
DiyDataRecovery site) decided he wanted to do something with harddisk
recovery for a specific target audience, as nothing was available at the
time. His experience came from working for Powerquest for several years
so harddisk recovery was a logical next step. He came up with the idea
for RepoMan 1.0 and brought me in to help with the coding. After a few
weeks of hard work we unleashed RepoMan 1.0 onto an unsuspecting
audience. Repoman 1.0 is a disk scanner that checks the harddisk on a
sector level to see if there is anything useful on the disk to aid in
the recovery. Much to our surprise it was a modest (almost cult-like)
hit. So it went from there. I started work on MBRtool and Joep started
on a set of recovery tools that are now ready and available at his site.
As of this writing MBRtool is at version 2 and has become somewhat of a
benchmark for MBR manipulation. I will try to keep MBRtool free because
i believe that to be in the spirit of what it is that made the internet
great.
|
Enjoy. |