home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
rescue.zip
/
README.DOC
next >
Wrap
Text File
|
1999-06-12
|
4KB
|
94 lines
RESCUE v1.0
===========
Usage: RESCUE <physical disk number 1..n>
Ever lost your Master Boot Record (MBR) on a disk? If so you'll know how
frustrating this can be, since none of the partitions (and the DATA on them!)
will be accessible anymore, although the data is still physically there.
It happened to me a few days ago after reprogramming my SCSI adapter with
the wrong BIOS... Although this is an unlikely scenario to loose your MBR,
a virus infection is a very good candidate for something like this to occur.
Since all the data is still physically on the disk it is possible to figure
out where each partition starts, and using this information it is possible
to reconstruct the MBR to a state where you can at least access your data and
make a backup (this of course does not apply to the three people out there that
make frequent backups). I wrote a utility that assisted me in figuring out just
exactly where each boot-sector on the disk are physically located, and since it
helped me recover all my data I'd like to share this with you all.
How I recoved my data
=====================
Using the RESCUE.EXE utility that I wrote it becomes possible to generate a
list of POSSIBLE boot-sectors that are on your disk. Use your own good
judgement to choose the correct candidates from this list (PS. boot your system
from the OS/2 startup diskettes - a locked harddisk cannot be accessed on the
physical drive level, so the utility will report an error!). Once you have
selected your candidates write them down - important are the CYL, HEAD and SEC
that are displayed (My candidates were at Cyl/Head/Sec 1/1/2, 102/19/52 and
204/6/39). This step completed I reverted to an MBR editor. The one I used was
PART.ZIP (DOS) which is downloadable from a variety of FTP servers on the net.
** The PART Ranish Partition Manager Homepage is located at
**
** http://www.users.intercom.com/~ranish/part/
**
Using PART I was able to reconstruct the MBR on a disk-by-disk basis, allowing
me to access the data:
Per HPFS drive:
Create an Extended DOS partition starting one sector LOWER then what was written
down, ending one sector LOWER then the NEXT partition (or end of disk):
In my case the 1st HPFS partition Cyl 1, Head 1, Sec 2:
Extended DOS partition at 1/1/1, ending at 102/19/51
Within this partition create an OS/2 HPFS partition starting at the location
written down and ending at the same sector as the extended DOS partition.
In my case HPFS starting at 1/1/2 up to 102/19/51.
When you now again start OS/2 it will in FDISK either complain that the
partition table on the disk you modified is corrupt, or it will even TRAP.
I've not managed to get OS/2 to correctly identify my HPFS drives, and CHKDSK
also abended every single time started. When accessing the drive a SYS0627 is
returned, so the data is still unreadable in OS/2. In DOS however using an
HPFS Read-Only driver I was able to read my data again! Surely you'll loose a
lot of extended attribute information, but at least the majority of the data
is back!
I repeated this scenario twice - once for every drive.
The third partition was a FAT partition. I created a DOS FAT-16 (up to 2G)
drive starting at the location written down (in my case 204/6/39) up to the
next partition (in my case end of physical disk). Rebooted and had a primary
volume with all my data in it!
NOTE 1: USE AT YOUR OWN RISK! The above is a short description of how I
managed to rescue my data. It may not work in your environment.
Also, modifying the MBR may cause irreversible damage to your data
on your disk when incorrectly done!
NOTE 2: After changing the MBR a REBOOT is required for the OS to recognize the
new drive letter!
NOTE 3: It is probably possible to completely reconstruct the MBR using the
above scenario and data. I was primarily interested in getting my data
back, so haven't pursued every possible way of modifying the MBR for
the drive. If anybody is able to completely reconstruct the MBR in
such a way that FDISK and CHKDSK will correctly recognize the disk
again (in OS/2) please let me know the details and I'll update this
document.
This program is FREEWARE. Of course you are welcome to send me money if it
helped you recover your data (no-one will ever do this surely!).
Jeroen van den Horn
J.vandenHorn@fibre.a2000.nl