Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Well, I got an HD which I previously pulled out data from when it crashed, but this time is more of a daunting task. Physically the device seems to be in good shape. It spins good and sounds good overall. It gets recognized without problem by the linux kernel.
Code:
Disk /dev/sdb: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xb2a4199a
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9732 78172258+ 7 HPFS/NTFS
It was copying at a very low rate 1MB/s and it got stuck once again after copying 3GB/s of data.
Third:
Code:
dd_rescue /dev/sdb1 /dev/sda9
Does nothing. I made sda9 a partition with the same size. I'm really out of ideas here. Any hint will be greatly appreciated. Thanks
Update: dd_rescue started working after installing through debian... Anyways ddrescue gets stuck at the same spot dd did. I guess is hitting a really bad block in there. I can hear a click-click sound if I put my ear close to it. This is how dd_rescue output looks when it gets stuck:
Now my question is, let's say I'm able to dump everything after 4GB(I doubt it), and I get the first 3G of the beginning(just 1GB missing). How would I put those two images together? If I do that, would copying the resulting image to a partition work? Would be able to mount it and at least recover some files? Thanks
If I skip too close to the 3G range it goes to the click-click thing.
Note dd_rescue can read back to front as well. Potentially can get more out of it than skipping 1GB...
Quote:
Originally Posted by adri_ht_
How would I put those two images together?
Basically you could just 'dd' both images to the device, the second write skipping past the position the first image was written to. But you don't need to do that.
Quote:
Originally Posted by adri_ht_
If I do that, would copying the resulting image to a partition work?
I somehow doubt that. Kind of Brundlefly.
Quote:
Originally Posted by adri_ht_
Would be able to mount it and at least recover some files?
After fixing the directory structure it might. Or it just might not.
Point is you don't need to.
File recovery tools work from supplied images pretty well.
You could try 'TestDisk' to recover what you can. Look at the 'Tools, Recovery, Diagnostic, Emergency' section of 'Slackware-Links'. More than just SlackwareŽ links!
Thanks a lot. I'm currently using PhotoRec and as of now is pulling out tons of pictures.
Code:
Note dd_rescue can read back to front as well. Potentially can get more out of it than skipping 1GB...
I tried using dd_rescue but it didn't work. Once the HD hits a bad spot it goes unresponsive, dd_rescue is not able to skip automatically. I couldn't get dd_rescue nor ddrescue to write to an image like I've been doing w/ dd.
Thanks unSpawn for your answers.
Code:
If you cant get the images back together, then use one of these to recover your important files from the individual partial images:
http://www.forensicswiki.org/wiki/Foremost
http://www.forensicswiki.org/wiki/Scalpel
I'll give them a try. Thanks.
Well, I ended up w/ 5 images and a Gib or so in between them. Now, I have a question. When dd dumps an image, is that image compressed in some way? I just want to make sure I don't have to restore the image before using a recovery utility. I'm saving all the images to /dev/sda9 which is mounted on /mnt/usb/ (ext3) and running recovery in that partition. Thanks
dd reads/writes the stream of data as it is on the disk. under average circumstances, you should be able to use all forensic type tools to recover files from the stream...
Also, if all you're concerned about is images, then photorec is sufficient. foremost and scalpel are used for recovering all known files types - not just images.
under average circumstances, you should be able to use all forensic type tools
Slightly OT but it does beg the question what the definition of "average" would be...
Quote:
Originally Posted by Admiral Beotch
Also, if all you're concerned about is images, then photorec is sufficient. foremost and scalpel are used for recovering all known files types - not just images.
That statement is not correct. Photorec does not limit itself to "just images". Besides it is way less demanding in terms of adding header/footer magic compared to scalpel or its predecessor.
After I finished recovering the HD, I wrote zeros to the entire HD. To my surprise, dd was able to do it in less than an hour at 25MB/s without stopping. At first I thought the hard drive was physically bad, but now I'm totally clueless.
Doesn't dd only fails when there are bad sectors (physically damaged sectors) in the HD? Thanks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.