home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / rescue.zip / README.DOC next >
Text File  |  1999-06-12  |  4KB  |  94 lines

  1. RESCUE v1.0
  2. ===========
  3.  
  4. Usage: RESCUE <physical disk number 1..n>
  5.  
  6. Ever lost your Master Boot Record (MBR) on a disk? If so you'll know how
  7. frustrating this can be, since none of the partitions (and the DATA on them!)
  8. will be accessible anymore, although the data is still physically there.
  9.  
  10. It happened to me a few days ago after reprogramming my SCSI adapter with
  11. the wrong BIOS... Although this is an unlikely scenario to loose your MBR,
  12. a virus infection is a very good candidate for something like this to occur.
  13.  
  14. Since all the data is still physically on the disk it is possible to figure
  15. out where each partition starts, and using this information it is possible
  16. to reconstruct the MBR to a state where you can at least access your data and
  17. make a backup (this of course does not apply to the three people out there that
  18. make frequent backups). I wrote a utility that assisted me in figuring out just
  19. exactly where each boot-sector on the disk are physically located, and since it
  20. helped me recover all my data I'd like to share this with you all.
  21.  
  22. How I recoved my data
  23. =====================
  24.  
  25. Using the RESCUE.EXE utility that I wrote it becomes possible to generate a
  26. list of POSSIBLE boot-sectors that are on your disk. Use your own good
  27. judgement to choose the correct candidates from this list (PS. boot your system
  28. from the OS/2 startup diskettes - a locked harddisk cannot be accessed on the
  29. physical drive level, so the utility will report an error!). Once you have
  30. selected your candidates write them down - important are the CYL, HEAD and SEC
  31. that are displayed (My candidates were at Cyl/Head/Sec 1/1/2, 102/19/52 and
  32. 204/6/39). This step completed I reverted to an MBR editor. The one I used was
  33. PART.ZIP (DOS) which is downloadable from a variety of FTP servers on the net.
  34.  
  35. ** The PART Ranish Partition Manager Homepage is located at
  36. **
  37. **  http://www.users.intercom.com/~ranish/part/
  38. **
  39.  
  40. Using PART I was able to reconstruct the MBR on a disk-by-disk basis, allowing
  41. me to access the data:
  42.  
  43. Per HPFS drive:
  44.  
  45. Create an Extended DOS partition starting one sector LOWER then what was written
  46. down, ending one sector LOWER then the NEXT partition (or end of disk):
  47.  
  48. In my case the 1st HPFS partition Cyl 1, Head 1, Sec 2:
  49.  
  50. Extended DOS partition at 1/1/1, ending at 102/19/51
  51.  
  52. Within this partition create an OS/2 HPFS partition starting at the location
  53. written down and ending at the same sector as the extended DOS partition.
  54.  
  55. In my case HPFS starting at 1/1/2 up to 102/19/51.
  56.  
  57. When you now again start OS/2 it will in FDISK either complain that the
  58. partition table on the disk you modified is corrupt, or it will even TRAP.
  59. I've not managed to get OS/2 to correctly identify my HPFS drives, and CHKDSK
  60. also abended every single time started. When accessing the drive a SYS0627 is
  61. returned, so the data is still unreadable in OS/2. In DOS however using an
  62. HPFS Read-Only driver I was able to read my data again! Surely you'll loose a
  63. lot of extended attribute information, but at least the majority of the data
  64. is back!
  65.  
  66. I repeated this scenario twice - once for every drive.
  67.  
  68. The third partition was a FAT partition. I created a DOS FAT-16 (up to 2G)
  69. drive starting at the location written down (in my case 204/6/39) up to the
  70. next partition (in my case end of physical disk). Rebooted and had a primary
  71. volume with all my data in it!
  72.  
  73. NOTE 1: USE AT YOUR OWN RISK! The above is a short description of how I
  74.         managed to rescue my data. It may not work in your environment.
  75.         Also, modifying the MBR may cause irreversible damage to your data
  76.         on your disk when incorrectly done!
  77.  
  78. NOTE 2: After changing the MBR a REBOOT is required for the OS to recognize the
  79.         new drive letter!
  80.  
  81. NOTE 3: It is probably possible to completely reconstruct the MBR using the
  82.         above scenario and data. I was primarily interested in getting my data
  83.         back, so haven't pursued every possible way of modifying the MBR for
  84.         the drive. If anybody is able to completely reconstruct the MBR in
  85.         such a way that FDISK and CHKDSK will correctly recognize the disk
  86.         again (in OS/2) please let me know the details and I'll update this
  87.         document.
  88.  
  89. This program is FREEWARE. Of course you are welcome to send me money if it
  90. helped you recover your data (no-one will ever do this surely!).
  91.  
  92. Jeroen van den Horn
  93. J.vandenHorn@fibre.a2000.nl
  94.