recover data from hard disk

A

alex

i have a 20 GB hard disk where i can access the data from c drive but
not from the d drive when tried opening asks to format the drive..so
can you tell me how to restore my data from d drive....when tried
looking from device manager it shows d drive 100% emty
 
D

DL

Do you mean your PC boots from this drive?
And its not visible when installed as a slave to another boot drive?
 
P

Paul

alex said:
i have a 20 GB hard disk where i can access the data from c drive but
not from the d drive when tried opening asks to format the drive..so
can you tell me how to restore my data from d drive....when tried
looking from device manager it shows d drive 100% emty

There is an example of a free tool here. There is no fancy GUI
on this tool. The tool works "in place", and if you are serious
about your data, you'd copy the entire drive to a second hard
drive. Hard drives are cheap (80GB for $40), so picking up
a spare drive and copying the disk is cheap insurance.

http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

To copy a disk, sector by sector, you can use "dd". The
naming syntax in Linux is a little easier to understand,
and in Linux, the following would blindly copy the contents of
one disk to another. This tool doesn't work at the file
system level, and just copies all the sectors. So it
can take a snapshot of data, even if the data uses
file systems not native to the OS. Or if the file system
is broken. Commands like this are dangerous though - if
you specify the wrong source and destination, the destination
gets overwritten. Just like taping over something by
accident on your VCR. You could easily zap your boot disk,
doing something like this. (In Linux, you have to be
"root" to do stuff like this, and in Knoppix, the word
"sudo" goes in front of the command, to give the necessary
permissions to execute the command.)

dd if=/dev/hda of=/dev/hdb

If "hda" was the 20GB drive, and "hdb" was the 80GB drive,
there would be a 20GB section at the beginning of hdb
containing the data. So this style of copying, works
best if hdb is the same size or larger than hda.

If you're copying the data back later, well, an 80GB drive
is bigger than a 20GB drive. Now, you need to control the
copy operation, so precisely the right amount of data
is copied. The total number of sectors on a disk, is a
factorable number. For example, this is what I used to
copy my disk here recently. My 80GB drive has 156301488
sectors, which is (27216*512) * 5743 total bytes. If I was
copying 80GB of data from a 250GB source drive hda, this
would copy the data in blocks, and put it exactly back.
As long as you can figure out the exact size of the
disk, you are then prepared to pick a couple numbers
to guide the transfer. For example, I could also have
done it as 6967296 and 11486 for block size and count.
I used the Linux program "factor", so I didn't have to
spend ten minutes with a calculator to get some numbers
to work with.

dd if=/dev/hda of=/dev/hdb bs=13934592 count=5743

If you don't have a Linux environment (I use Knoppix),
you can get a port of "dd" for Windows. You use this
in a command window. Using "dd --list" will give the
names of the disks, but the naming is not as much
fun to work with.

http://www.chrysocome.net/dd

On my current computer, this would be my *best guess*
as to what the copy command would look like. I can tell
which disk is which, by the fact that Harddisk0 shows
two partitions (my WinXP drive), while Harddisk1 shows
four partitions (other OS drive), when I use the --list
option to list all disks. I could use bs and count
parameters as well, to control the total size of data
to transfer. Partition0 apparently is the name of the
entire raw device. And I want to work at the raw device
level, in this particular example. You can also try
copying partitions, but you'd need to be a bit more
careful about shoehorning stuff in. (Imagine what
would happen if the destination partition was too
small.)

dd if=\\?\Device\Harddisk0\Partition0 of=\\?\Device\Harddisk1\Partition0

Once you have a safe copy of the data stored somewhere,
you can try using TestDisk for free. One thing to note
about TestDisk, is there isn't a "Quit right now" option
in the menu. You can try pressing control-C, which is a
Unix method of stopping a program, and that seemed to
work for me. Only press control-C, if you're in a menu,
don't like the presented options, and want to start over
again using the tool.

Good luck and be careful,
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top