Go Back   Technibble Forums > General Computers > Tech-to-Tech Computer Help

  Technibble Sponsor

Reply
 
Thread Tools Display Modes
  #1  
Old 01-31-2012, 11:32 AM
d3v d3v is offline
 
Join Date: Feb 2010
Location: Nottingham, UK
Posts: 218
d3v is an unknown quantity at this point
Default GNU ddrescue, ridiculous learning curve

I'm trying to image a badly damaged 3.5" SATA hard drive using the free Ubuntu Rescue Remix 11.5 live CD and have printed off all the DD rescue documentation and have the thing running in a virtual machine for practice, but there's not a single damm word on how one would actually list all devices and paritions connected the the PC.

Why would such a basic and fundamentally important step not be covered in the literature? This is why I never bothered to learn Linux becuase it's shell commands fetish and the program makers' infuriating habbit of only telling you half of what you need to know is downright bloody ridiculous, why the hell havn't they developed a UI yet? ARRRRRRRGH so infuriating

Last edited by d3v; 01-31-2012 at 11:37 AM.
Reply With Quote
  #2  
Old 01-31-2012, 12:00 PM
Shark Shark is offline
 
Join Date: Mar 2010
Posts: 148
Shark is an unknown quantity at this point
Default

lspci

This lists all PCI devices.

fdisk -l and sfdisk

Last edited by Shark; 01-31-2012 at 12:10 PM. Reason: added one
Reply With Quote
  #3  
Old 01-31-2012, 01:05 PM
iisjman07's Avatar
iisjman07 iisjman07 is offline
 
Join Date: Jul 2009
Location: South End Of The UK
Posts: 3,049
iisjman07 has a spectacular aura aboutiisjman07 has a spectacular aura about
Default

I wrote a little tutorial here
__________________
put that in your pipe and grep it
Reply With Quote
  #4  
Old 01-31-2012, 01:22 PM
d3v d3v is offline
 
Join Date: Feb 2010
Location: Nottingham, UK
Posts: 218
d3v is an unknown quantity at this point
Default

righteo thanks for that, I knew I could trust this place for basic sanity. Excellent, I will now attempt to recover the data from this drive and will let you know how it goes
Reply With Quote
  #5  
Old 01-31-2012, 01:33 PM
codegreen codegreen is offline
 
Join Date: Mar 2011
Location: New Brunswick, Canada
Posts: 1,304
codegreen is a jewel in the roughcodegreen is a jewel in the roughcodegreen is a jewel in the rough
Default

Quote:
Originally Posted by d3v View Post
Why would such a basic and fundamentally important step not be covered in the literature?
Linux is based on the Unix philosophy of many small tools working together, and official documentation for Linux tools tends to assume basic Linux experience. This can be infuriating to people coming from the Windows world. In this case, the ddrescue documentation would not outline how list devices and partitions because that's not handled by this particular utility.

If you're going to use ddrescue, you should search for a new user tutorial (like the one linked above). But you will have to learn the basics of a Unix-style command line. If you want Windows-style tools, you should try a Windows-based rescue disk.
__________________
Stephen Gilbert

Code Green Technology:
Fredericton Computer Repair
Reply With Quote
  #6  
Old 01-31-2012, 02:11 PM
MobileTechie's Avatar
MobileTechie MobileTechie is online now
 
Join Date: Oct 2009
Location: UK
Posts: 4,253
MobileTechie has a spectacular aura aboutMobileTechie has a spectacular aura about
Default

if you're running it from a rescue disk like parted magic or whatever then those normally have tools like file managers that allow you to browse to find the volume you need and then look at the path to see which name the disk has. Or gparted shows you a Disk Manager like view which might help. For sure you need to be very careful about getting the volume right!
Reply With Quote
  #7  
Old 01-31-2012, 03:24 PM
d3v d3v is offline
 
Join Date: Feb 2010
Location: Nottingham, UK
Posts: 218
d3v is an unknown quantity at this point
Default

Ok I'm learning this tool now and beginning to understand the way it works thanks to you guys putting me in the right direction.

The drive in question is mechanically faulty and when connected to the PC it causes intemittent freezing of the PC and while I can access the drives partitions in windows, navigation is painfully slow.

Based on that information, what method of cloning/recovery would you guys reccomend I perform in DDrescue, including the actual code string that I should type, so I can print it off and obviously replace the "dev/***" bits with my own.
Reply With Quote
  #8  
Old 01-31-2012, 05:08 PM
codegreen codegreen is offline
 
Join Date: Mar 2011
Location: New Brunswick, Canada
Posts: 1,304
codegreen is a jewel in the roughcodegreen is a jewel in the roughcodegreen is a jewel in the rough
Default

Quote:
Originally Posted by d3v View Post
Based on that information, what method of cloning/recovery would you guys reccomend I perform in DDrescue, including the actual code string that I should type, so I can print it off and obviously replace the "dev/***" bits with my own.
I would do this in two passes.

Pass 1:

Code:
ddrescue /dev/*** hdimage.img rescue.log
This will attempt to image the entire drive. Any unreadable sectors will be skipped after the initial attempt to copy them.
  • Replace "/dev/***" with the failing hard drive (normally /dev/sda if you're booting from a live CD).
  • "hdimage.img" is the name of the image file you're creating. If you're not in the location you want to save the image to, you'll need to put the full path here (usually /media/<name of external hardrive>/ for a USB-connected hard drive).
  • "rescue.log" is the log file. This allows ddrescue to keep track of what it has already done. Very useful for doing multiple passes or dealing unexpected interruptions. Always use a log file! Like the mage file, you'll need the full path if you're not in the directory you want to save the fle to.

Pass 2:

Code:
ddrescue -d -r3 /dev/*** hdimage.img rescue.log
This will attempt to re-read and copy any sectors that were missed by the first pass, and it will skip all sectors that were successfully copied. -d means it will attempt direct disc access (bypassing the kernal cache) and -r3 means it will attempt to read each bad sector 3 times. Use the same image and log file as the first pass; otherwise it will attempt to mage the entire drive again.
__________________
Stephen Gilbert

Code Green Technology:
Fredericton Computer Repair
Reply With Quote
  #9  
Old 01-31-2012, 06:43 PM
d3v d3v is offline
 
Join Date: Feb 2010
Location: Nottingham, UK
Posts: 218
d3v is an unknown quantity at this point
Default

Wow, now that is exactly what I wanted, thank you for being so clear and helpful, but I'm still not sure about how to create a path location to save the recovered image and logfile to. It's nothing like the way Windows is!!

The faulty drive is connected to the SATA bay that is built-in to my PC case chassis and is connected directly to my motherboards SATA controller. This is a god send for quick and easy backups/recoveries. The chassis SATA bay is connected to the 2nd SATA channel, and my internal hard drive is connected to the 1st SATA channel.

My internal hard drive will be where I want the image to be saved to, so how would I go about typing the correct line of code for this? I'm guessing...

ddrescue /dev/faultydrive /dev/internaldrive hdimage.img rescue.log

??
Reply With Quote
  #10  
Old 01-31-2012, 07:22 PM
codegreen codegreen is offline
 
Join Date: Mar 2011
Location: New Brunswick, Canada
Posts: 1,304
codegreen is a jewel in the roughcodegreen is a jewel in the roughcodegreen is a jewel in the rough
Default

Please insert the faulty drive into the bay, boot from the live CD, and paste the results of these commands:

fdisk -l
df

I can give you more specific help once I see that info. You have to be very careful to write the data to the right place. In Linux, you do not write files to a raw storage device (like /dev/sda), but to a mounted filesystem.
__________________
Stephen Gilbert

Code Green Technology:
Fredericton Computer Repair
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Technibble.com is based out of MELBOURNE, AUSTRALIA.