The contents of this document:
General information
Copyrights, disclaimer and distribution
Program description
How to use
Run errors
Tools used and copyrights
Known issues
Changes since previous version, and what to do
with old backup-files
Contact information
The E-mail support notification
General
information.
This
document assumes the reader to have some knowledge concerning harddisks
and the like. You should know what the Master Boot Record is and what
Partition Tables are. We also assume you know how to make a bootdisk
and have at least working knowledge of Win9x and real mode environments.
For
info on harddisks and recovery check the DIY
DataRecovery (http://diydatarecovery.sites.cc) pages. This site
contains information on harddisk recovery and assorted info.
Copyright,
disclaimer, permission and distribution notices.
This program is
conceived and coded by Joep van Steen
Original concept by Joep van Steen. Source libraries
by Tom Kuurstra were used in Pt-tool.
(C) 2000, DIYdatarecovery.
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:
- decompile, disassemble
or change the program code in any way;
- change the documentation
or any text accompanying the program;
- change the distribution
in any way. No files may be removed from and no files may be added
to the distribution;
- use this program
for commercial reasons or in environments (i.e. companies or persons)
that (make a) profit from datarecovery; if you do so, you should contact
DIY DataRecovery, you wil have to buy licenses;
- (re)sell the
program, or accept any fee for distributing or using the program;
- redistribute
the program. Distribution rules follow.
This program is
distributed as Freeware. You are free to use this program, as long as
you comply with the above mentioned rules. There is one restriction.
You may NOT redistribute the program. This program may not be placed
on bbs's, websites, FTP sites or any other location that facilitates
download. If this is desired anyway, please contact us on one of the
supplied e-mail addresses and we will get back to you. Please point
to the original download location for redistribution, here,
(http://diydatarecovery.sites.cc).
We also ask that
you supply us with feedback on what has gone right and/or wrong. Also,
any suggestions for changes or improvements are welcome. Contact information
can be found at the end of this document.
Program
description.
Pt-tool allows
you to do the following things:
- backup,
verify and restore the MBR/EPBR
- edit or
blank the Partition Tables
- refresh
the MBR bootcode
- remove
the first 446 bytes of the MBR/EPBR
- re-write
the MBR/EPBR signature bytes
- display
the MBR/EPBR in HEX
- perform
above mentioned edit, bootcode and display functions on the MBR/EPBR
backups
Pt-tool
supports the first 4 harddisks it finds on the controller (any type).
MBR/EPBR
Backups to file: Pt-tool places the file containing the MBR backup
in the current folder. If the file already exists it will be overwritten.
Use /F without a filename to use the default
filename (PT_BACK) or use /F: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 Pt-tool and will consist of the physical disk number that
contains the original MBR/EPBR, 128 through 131.
The
Backups: The backups are changed so that the program recognises
them as MBR/EPBR backups. This means that the backups themselves are
not usable, they must be restored using Pt-tool.
It is, however, possible to recover a Pt-tool backup sector without
the use of Pt-tool.
Let me explain : a conventional MBR/EPBR has what we call a signature.
This signature consists of 2 bytes at the end of the sector that contains
the MBR/EPBR. When Pt-tool makes a MBR backup to a file Pt-tool changes
this signature and replaces it with something Pt-tool recognises. The
original signature is put back in place when a restore is performed.
The original signature for a MBR/EPBR is Hex "55 AA". Pt-tool
replaces this with Hex "BB BB". Therefore, if you wish to
manually restore a backup sector to the original MBR/EPBR sector, you
must change the last 2 bytes back to Hex "55 AA". A manual
restore operation, without the use of Pt-tool, can be performed with
a hex-editor. Explaining this procedure does not fall within the scope
of this manual. Visit
DIYDataRecovery for information on this.
A manual recovery of a backup made to file is also possible, though
somewhat more labour-intensive. If you open a backup-file you will see
that it is made up as follows : the first 3 lines contain the program
name, the program version and the disk number. The lines following that
contain the hex-representation of the MBR/EPBR. Each line contains 32
bytes, each byte being a 2 digit Hex number. There are 16 lines, making
up the 512 byte MBR. Use a Hex-editor to enter the hex values you see
here in the MBR. Don't forget about the signature bytes.
The
method: Pt-tool uses int13H calls to access the harddisk through
BIOS. This means that the
program will NOT run from Windows NT or Windows 2000 (NT and 2000 prohibit
access to hardware). If you wish to use Pt-tool on a system running
Windows NT or Windows 2000, 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. It is preferred to run Pt-tool from
a real-mode bootdisk.
On Windows 9x systems it is possible to run Pt-tool from a Command prompt
in protected mode. In WinME however a backup file cannot be restored!
How
to use.
Pt-tool is
command-line operated. The program runs in real-mode DOS or a Command
prompt in Windows 9x or ME. The options that are not related to manipulation
of sectors or MBR's (like editing a backup-file) can be performed from
Windows NT/2000.
- The
command line
Pt-tool without
any arguments will display the help-screen and the copyright notice.
The command-line arguments consist of the following:
/X:y
- select the operation to be performed, where y
is the selected operation
/D:n
- select disk to perform the operation on, where n
is one of: 0,1,2,3
/C:n
- select a cylinder
that should be viewed as MBR/EPBR or a backup should be made of or restored
to, or that will be edited.
/F
- select a file as target or source for a backup, the program will use
the default filename
OR
/F:filename - select a file as target for
a backup, using the filename entered. No extension, the filename must
not exceed 8 characters in length
Note :
- when performing a Restore, Verify, Display or Edit function on a backup,
you must use /F:filename to specify the
location of the backup. If /F is not entered,
the selected action will be performed on the original MBR.
Please note
that Pt-tool assumes the first disk to be disk 0, the second disk 1
etc.
- The
options for /X
The possible
operations (and arguments for /X) are :
B
- perform a MBR backup.
A disk must be selected (/D:0 - /D:3).
Choose /F or /F:filename
to make a backup to a file that will be written to the current folder
or disk.
R
- restore a MBR from a previously made backup.
A disk must be selected (/D:0 - /D:3).
The location of the backup must be specified through /F:filename.
V
- verify a backup against the original MBR/EPBR, or validate a backup.
A disk must be selected (/D:0 - /D:3).
The location of the backup must be specified through /F:filename.
This option will also validate the backup and tell you if it has been
corrupted, so you can use this option to simply tell if you can use
the backup without it being important whether the backup is identical
to the MBR/EPBR. If /C:x is specified, the backup contents is
compared with the specified cylinder of the specified drive.
D
- display the MBR, either original or backup.
A disk must be selected (/D:0 - /D:3).
If /C:x or /F:filename
is not used, the MBR is displayed. When displaying a backup, the location
of the backup must be specified through /F:filename.
This option will also validate the backup and tell you if it has been
corrupted.
E
- edit the MBR Partition Tables, either for the original or a backup.
A disk must be selected (/D:0 - /D:3).
If /C:x or /F:filename
is not used, the MBR is selected. When editing a backup, the location
of the backup must be specified through /F:filename.
This option will also validate the backup and tell you if it has been
corrupted. Please check below for information on the editor.
W
- wipe the MBR/EPBR, either the original MBR/EPBR or a backup.
A disk must be selected (/D:0 - /D:3).
If /C:x or /F:filename
is not used, the is wiped. When wiping a backup, the location of the
backup must be specified through /F:filename.
This option will also validate the backup and tell you if it has been
corrupted (allthough that is rather uninteresting when wiping it, nevertheless).
P
- blank the Partition Tables, either in the original MBR/EPBR or a backup.
A disk must be selected (/D:0 - /D:3).
If /C:x or /F:filename
is not used, the MBR is selected. When blanking the Partition Tables
in a backup, the location of the backup must be specified through /F:filename.
This option will also validate the backup and tell you if it has been
corrupted.
C
- blank the first 446 bytes of the MBR/EPBR sector or a backup.
A disk must be selected (/D:0 - /D:3).
If /C:x or /F:filename
is not used, the MBR is selected. When blanking the first 446 bytes
in a backup, the location of the backup must be specified through /F:filename.
The Partition Tables are NOT blanked. This option will also validate
the backup and tell you if it has been corrupted.
M
- write/refresh the bootcode, either in the original MBR or a backup.
A disk must be selected (/D:0 - /D:3).
If /F:filename is not used, the original
MBR is selected. When writing the bootcode in a backup, the location
of the backup must be specified through /F:filename.
The Partition Tables are NOT blanked. This option will also validate
the backup and tell you if it has been corrupted.
Note : the bootcode that is written using this option is generic Wintel
bootcode and can be used for all Win/DOS platforms. If you have the
Linux LiLo bootcode in your MBR DO NOT USE this option, it will
leave your system unusable. Support for this will be added.
S
- write the signature bytes for the MBR/EPBR.
A disk must be selected (/D:0 - /D:3).
This option can only be performed on the original MBR/EPBR. Use this
option if something or someone has corrupted the MBR/EPBR by removing
the 2 signature bytes from the MBR.
Note: when a backup is restored the signature bytes are automatically
written.
- The
Partition Table editor
When the
/X:E option is selected the Partition Table
editor is displayed. When editing directly on disk and not the MBR the
cylinder number of the current EPBR is displayed.
The screen displays the Tables twice. The top section displays the Tables
as they are now, either from the original MBR/EPBR or a backup. This
is signified by the word "cur" on the left in the blue top-bar.
Directly below the first display of the Tables is the menu-bar. This
bar contains the options that are valid in the editor. Below the menu-bar
is the second display of the Tables. These tables will reflect the changes
you make during the editing. This is signified by the word "new"
on the left in the blue top-bar.
Both displays of the Partition Tables also contain the displaying of
the entries as they are recorded in the MBR/EPBR (under "partition
tables as shown on disk"), for reference.
The bottom display of the Tables and MBR/EPBR reference will be refreshed
after each value change.
Each Table
consists of 4 entries, making up the Partition Tables. The entries contain,
from left to right (as is also displayed in the blue top-bar) the 10
following values :
- Partition
Active, Decimal
- Start
Cylinder, Decimal
- Start
Head, Decimal
- Start
Sector, Decimal
- Partition
Type, Hex
- End Cylinder,
Decimal
- End Head,
Decimal
- End Sector,
Decimal
- LBA Start
Sector, Decimal (32 bit value)
- LBA Length,
Decimal (32 bit value)
The following
options are valid when in the editor (as displayed in the menu-bar):
Press 'Q' to leave the editor. Any changes made will NOT be saved.
Press 'S' to save the Partition Tables you have edited to either
the original MBR, or a backup (as selected on the commandline using
/C:x or /F:filename).
Press 'R' to revert the changes you made. All Table entries will
be restored to their original values, as displayed in the Table in the
top section of the screen.
Press 'B' to set all values to 0 and create a clean Partition
Table to fill.
Press '1' '2' '3' or '4' to edit the entry
selected.
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 'Enter' without typing any
value to leave that value unchanged.
All values are entered and treated as decimal values, with one notible
exception : the Partition Type. This is entered in Hex.
Example: the Active Partition value (the first value in an entry) is
Hex "80". In the table it is displayed as Dec "128".
You must enter "128" if you wish to edit the Active Partition
value.
However, the Partition Type value will for instance display "B",
which means FAT32. If you enter a Partition Type value you must enter
this as Hex. Click here
to find a more or less complete list of partition types.
The values
you enter are not checked for consistency. Some simple checks are done
(Cylinders can not be more than 1023, Heads can not be more than 254
etc.) but nothing is checked against the geometry for your disk. This
has been done on purpose to allow the user to enter illogical values
for recovery scenario's.
The LBA values are NOT calculated from the values you enter for C/H/S.
This may be added in a future version.
Run
errors or program notifications
In a normal Pt-tool 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 aborted). This usually means that Pt-tool 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.
When the message ' could not
read/write selected disk (RC=x)' appears
it means that an Int13H error occurred, meaning that the disk could
not be read or written to. Please note that this could be because of
a command-line parameter. If you entered the following command :
'Pt-tool /x:e /d:3 /c:446 '
Pt-tool tries to display this
sector for this disk. Pt-tool does not check to see if the disk actually
exist. Thus if you only have 1 disk, the example command would lead
to errors being displayed for the non-existent 4th disk. This has been
done on purpose. The text 'RC=x' in the Int13H
error message means Return Code. An Int13H error usually returns a value
that let's you identify the error. The most common errors are RC=1 (disk
error/non -existent disk) and RC=3 (read-only error, is displayed when
sector operations are performed under Windows ME).
If something unexplainable happens and you ask for support, be sure
to include any messages the program displays, and the RC if it is displayed.
If a situation occurs that
Pt-tool 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.
Contact
information.
DIYDataRecovery
1 (Joep van Steen) :
website
: DIY DataRecovery
1 , (http://diydatarecovery.sites.cc)
E-mail : webmaster
(webmaster@diydatarecovery.sites.cc)
DIYDataRecovery
2 (Tom Kuurstra) :
website
: DIY DataRecovery
2, (http://diydatarecovery.sites.cc)
E-mail : Tommie K., (DiyDDR2@worldmail.nl)
Currently,
the distribution point for Pt-tool can be found here.
(http://diydatarecovery.sites.cc).
Check our webpages for current info on Pt-tool.
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 on 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 datarecovery please include the following
things:
- a clear
description of the symptoms (things like "my OS doesn't boot"
we cannot take seriously), including (if any) the errors you might
be getting from the tool you are using;
- how the
problem came about. A thorough description of the actions that led
to the problem and a description of the environment (real mode, protected
mode etc.) in which the problem occurred;
- a description
of the running OS (Windows 9x / ME / NT / 2000 or OS/2 or whatever),
including language information and version information;
- the (latest
version) RepoMan log if it is a RepoMan related problem;
- a Partinfo
log file. Check below to see how to make a Partinfo log file.
If these
things are not included in the support request you will not
receive an answer. Also, problems that are not related to serious datarecovery
(like messed up boot files for instance) will not be addressed. Check
your local bookstore for a dummies-guide on that.
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 FTP site from here.
Please note that Powerquest allows you to download these tools.
Create a Partinfo log file by using the following command:
"Partinfo > drive:\file.ext", where drive:\file.ext is
the location of the resulting log file.
Thanx for
complying.
|