The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Please Help Me Guys zanetti321 UNIX for Advanced & Expert Users 8 03-02-2008 08:15 AM
Hi guys... vinayraj UNIX for Advanced & Expert Users 1 02-07-2008 08:37 PM
Help guys! chuchu Shell Programming and Scripting 2 07-06-2007 02:52 AM
Thanks guys b_manu78 AIX 0 01-03-2006 03:43 AM
Hi again guys M_Hafez UNIX for Dummies Questions & Answers 1 01-16-2005 08:48 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 03-28-2002
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,493
Did you format the hard drive or just overwrite the partition table? That seems to be the first question to answer clearly. Based on what I've read so far, seems that you did not format the drive, but only changed the partition table.

This implies that you can recover the disk by rebuilding the partition table and master boot record, right?

After we identify the exact situation.... we can consider tools like:

http://www.dtidata.com/products_bundle_01.asp

http://www.r-studio.ca/?GW09

The trick is NOT TO PANIC and NOT TO OVERWRITE THIS DISK, OK?

http://download.cnet.com/downloads/0...y&cn=&ca=10001

http://www.diydatarecovery.nl/
Forum Sponsor
  #9  
Old 03-28-2002
Registered User
 

Join Date: Feb 2002
Location: Brabant, Belgium
Posts: 65
The partition table is really quite simple, as long as the partition ID is OK, info on tracks and sectors are intact (all that can be done with Linix fdisk) then should there be some more data needed, that may be gotten off an alternative partition table.

This will be reall yinteresting, I like these things actually
__________________
PS
All of the above is to be read as '... unless I am wrong'
ENDPS
  #10  
Old 03-28-2002
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,493
AtleRamsli,

Are you saying that he must take his broken XP hard disk and install it on a Linux system... and run fdisk ?

How does this work? Fdisk will try to read the partition table and the partition table is wiped out, right?

I am not sure that this will work......... and can't recommend using fdisk based on what I've read so far.
  #11  
Old 03-28-2002
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,493
Read this first ....

Souldier,

Recommend you read this first....

http://www.diydatarecovery.nl/

Very good info there and it seems like what you need based on what I've read so far.


Quote:
DIY DataRecovery MBR-Rescue


MBR-rescue 2.x is a command line utility that can only help recover from data loss that occurred as a result of MBR corruption. MBR-Rescue is build upon the experience of recovering hundreds of harddrives manually from MBR damage. MBR-Rescue is safe to use, you can back up the current MBR, MBR-Rescue does NOT overwrite any user data!


The current version recovers FAT16 and 32, NTFS and extended partitions. MBR-Rescue also allows the backing up of the MBR and partition tables to prevent dataloss as a result of a corrupt MBR

The MBR is the first sector on the harddrive and consists of 512 bytes only. The first 446 bytes contain bootcode. This bootcode can be standard as it is put there by fdisk, or nonstandard, if disk manager software or bootmanagers are used. A virus can also replace the bootcode. MBR-Rescue can restore a standard bootloader any time.

The next 64 bytes are reserved for defining partitions. Per partition 16 bytes are used, so 4 partitions can be defined here. The damage to this information is more serious. The information on the harddrive can not be accessed anymore. MBR-Rescue can either restore a backup of this information if it was created prior to the dataloss, or can rebuild the partition table from scratch.

This links (below) is more technical reading ... and might help.... but seems to mathematical for most people ....

http://www.datarescue.com/laboratory/
  #12  
Old 03-28-2002
Registered User
 

Join Date: Feb 2002
Location: Brabant, Belgium
Posts: 65
Neo!

Maybe I didn't explain this well enough: The problem is really simple:
As a result of an operation, some bytes on the disk have been reset, and they must be set back.

The tool used for that is really irrelevant, as long as the bytes get set back to their original values, disk structure, partition structure and type.
My suggestion was to start with the simplest, compare one partition table with another using fdisk's binary dump facility, and take it from there.


Of course it is not sure to work, if the more than these few bytes have been altered, then there is really no way to fix it, because there is no telling what those bytes were.

But, as for the ones that are part of the table:
Linux fdisk has a couple of options that let you make a binary dump of the partition table
You will start by m, to list th eoptions,
then x to list the advance options, and there are:
options to change info on cylingers, heads, sector/track
in most cases, the partition table is simply marked as 'unused' - this is what happened to me, so I could just put it back to 'used by linux '=83

But, of course, that is all it can do!

I found this info about the Microsoft boot sector layout

Field Offset Length
----- ------ ------
Bytes Per Sector 11 2
Sectors Per Cluster 13 1
Reserved Sectors 14 2
FATs 16 1
Root Entries 17 2
Small Sectors 19 2
Media Descriptor 21 1
Sectors Per FAT 22 2
Sectors Per Track 24 2
Heads 26 2
Hidden Sectors 28 4
Large Sectors 32 4
__________________
PS
All of the above is to be read as '... unless I am wrong'
ENDPS

Last edited by AtleRamsli; 03-28-2002 at 05:06 AM.
  #13  
Old 03-28-2002
LivinFree's Avatar
Goober Extraordinaire
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
MBR-Rescue sounds an aweful lot like the command "fdisk \MBR" on a DOS or Windows machine.

Also, the way I took AtleRamsli's post was an example of how he could do it - in that case, grab a Linux boot disk (for example, one of my favorite is tomsrtbt) that can get an x86 off the ground, then to use the tools within to get to fixing the hard disk setting...

I somewhat like that idea, since you don't have to sync anything to the disk prior to the change (like you would if you booted up Windows).
  #14  
Old 03-28-2002
Registered User
 

Join Date: Feb 2002
Location: Brabant, Belgium
Posts: 65
It also helps a LOT if have something to compare the dump to, it is often the case that you can restore the whole thing by comparing the different versions of MBR (in case more than just the type is overwritten)

In any case: Law nr.1: Stay k00l

I think I forgot to mention the most obvious advantage:

If it works, which, as it has been pointed out, you can not be sure of, you have fixed the whol problem in about 10 keystrokes or so ... this probably my main argument for giving it a shot before taking the more drastic measures ...
__________________
PS
All of the above is to be read as '... unless I am wrong'
ENDPS

Last edited by AtleRamsli; 03-28-2002 at 08:19 AM.
Google The UNIX and Linux Forums
Closed Thread

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:22 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0