LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-26-2011, 03:36 PM   #1
dave48858
LQ Newbie
 
Registered: Mar 2011
Posts: 6

Rep: Reputation: 0
trying to learn linux, specifically ddrescue


First things first, hard drives and I don't seem to get along.

I'm a master of windows, but when it comes to data recovery and bad sectors, I'm always running into the ddrescue when searching google for answers.

I don't have a clue when it comes to linux hence I've been avoiding it, but I want to learn. I've formatted hard drives with ubuntu and played with that for a while. little here little there. ophcrack, backtrack (at the command prompt), so on and so fourth.

Is there a gui for ddrescue? and if so, could you get me a link to a download of it?

If not, can you hold my hand and walk me through (a download link of an iso or something and command line by command line), copying a healthy disk with ddrescue? I'll learn to do unhealthy ones later.

At my disposal, I have plenty to play with:

usb to sata/ide drive readers
towers with both sata and ide hd controllers
a tx1000 laptop with win7 ultimate
plenty of dead hard drives to play with
a couple healthy hard drives
I also have an external 2tb freeagent (usb2.0) drive partitioned with 3gb for the original software that came with the drive and a 1.6tb partition for my stuff.

I'm aware that the drives with a death knock usually need special hardware or being cracked open which I don't really want to get into, but recently I've been getting these where explorer won't see them and windows will hang when their plugged in. They show up in disk management, but I can't format them. I unplug it and it says the drive needs to be formatted. Those bug the h e double hockey sticks out of me. Thank goodness I'm good at keeping backups of the files I need. That's more than I can say for most of my friends.

If you haven't figured out, I'm the neighborhood geek that always gets asked to fix their computer.

Thanks in advance,
Dave
 
Old 03-27-2011, 08:05 AM   #2
Retrievil_Knievil
Member
 
Registered: Mar 2004
Location: Stavanger, Norway
Distribution: Gentoo, Slackware/SLAX, Knoppix, CentOS, IPCop & DSL
Posts: 138

Rep: Reputation: 21
If you want to jump right into it: http://www.forensicswiki.org/wiki/Ddrescue#Examples

Beware that this tool is equally capable of destroying your data if you input the wrong commands, test it out on a system/drive that you can safely erase!

I know it's not a lengthy reply, but you will probably find these links useful:

It's a software which I would really recommend you to read up on, as the different switches and options make a very big difference when it comes to your outcome and the speed of the process. You can also put a lot of retries on it, to see if it can get data back by not giving up.

http://www.forensicswiki.org/wiki/Ddrescue - Short Introduction

http://www.gnu.org/software/ddrescue...ue_manual.html - Full manual
 
Old 04-05-2011, 10:58 AM   #3
dave48858
LQ Newbie
 
Registered: Mar 2011
Posts: 6

Original Poster
Rep: Reputation: 0
more questions

that's what I like, jump right in. With the links you gave me, I was able to make a boot cd to where I have access to ddrescue. Now online I can find commands keystroke to keystroke how to copy a drive. I have two 80g drives hooked up via usb drive readers, a wd ide 3.5 and a sata segate 2.5 both of which I can destroy the data and it wouldn't upset me because I have it all backed up elsewhere.

my question is how do I know which device is which. How do I get a list of the devices with the size/make/model/sn of the drives attached to the computer. I'm running this on my laptop which has a 400g drive that I do not want to mess up (It wouldn't devastate me, it would just be a pain to rebuild). with windows, I can go to my computer or manage and see what's hooked up. how do I do this from the % prompt.

another question, basic terminology, in windows, this would be called the command prompt, what is it called in linux?

Thanks in advance,
Dave



Quote:
Originally Posted by Retrievil_Knievil View Post
If you want to jump right into it: http://www.forensicswiki.org/wiki/Ddrescue#Examples

Beware that this tool is equally capable of destroying your data if you input the wrong commands, test it out on a system/drive that you can safely erase!

I know it's not a lengthy reply, but you will probably find these links useful:

It's a software which I would really recommend you to read up on, as the different switches and options make a very big difference when it comes to your outcome and the speed of the process. You can also put a lot of retries on it, to see if it can get data back by not giving up.

http://www.forensicswiki.org/wiki/Ddrescue - Short Introduction

http://www.gnu.org/software/ddrescue...ue_manual.html - Full manual
 
Old 04-05-2011, 11:05 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
In Linux you are mostly talking about the CLI, the terminal or the console if you mean the command prompt.
To determine your drives, issue the command
Code:
tail -v /var/log/messages
This will open that log and will permanently show the last 10 entries. If you now plug in one of your devices you will see something like this:
Code:
Apr  5 18:02:54 monster kernel: [19284.199071] usb 2-2: new high speed USB device using ehci_hcd and address 2
Apr  5 18:02:54 monster kernel: [19284.315502] usb 2-2: New USB device found, idVendor=067b, idProduct=2506
Apr  5 18:02:54 monster kernel: [19284.315505] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr  5 18:02:54 monster kernel: [19284.315507] usb 2-2: Product: Mass Storage Device
Apr  5 18:02:54 monster kernel: [19284.315508] usb 2-2: Manufacturer: Prolific Technology Inc.
Apr  5 18:02:54 monster kernel: [19284.315510] usb 2-2: SerialNumber: 000000000000
Apr  5 18:02:54 monster kernel: [19284.315864] scsi8 : usb-storage 2-2:1.0
Apr  5 18:02:55 monster kernel: [19285.315904] scsi 8:0:0:0: Direct-Access     HITACHI_ DK23AA-90        00XF PQ: 0 ANSI: 0
Apr  5 18:02:55 monster kernel: [19285.316406] sd 8:0:0:0: Attached scsi generic sg6 type 0
Apr  5 18:02:55 monster kernel: [19285.317732] sd 8:0:0:0: [sdf] 17660160 512-byte logical blocks: (9.04 GB/8.42 GiB)
Apr  5 18:02:55 monster kernel: [19285.318606] sd 8:0:0:0: [sdf] Write Protect is off
Apr  5 18:02:55 monster kernel: [19285.722300]  sdf: sdf1
Apr  5 18:02:55 monster kernel: [19285.723756] sd 8:0:0:0: [sdf] Attached SCSI disk
Apr  5 18:02:59 monster hald: mounted /dev/sdf1 on behalf of uid 1000
You can see which device it is (in this case an old HITACHI_ DK23AA-90 harddisk), and which device descriptors the kernel assigns tothe disk (sdf) and the partitions on it (in this case only one partition, sdf1).
 
Old 04-05-2011, 12:01 PM   #5
dave48858
LQ Newbie
 
Registered: Mar 2011
Posts: 6

Original Poster
Rep: Reputation: 0
finding my drives

after typing in that command, I did get a list similar to what you posted, but nowhere in that list were either of the 3 drives (the two 80gb hooked up via usb drive readers and the 400gb internal)

do I have to mount these drives somehow?
 
Old 04-05-2011, 12:34 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Issue that command and plug in the drives after you see the output.
You can also get a list of the drives by typing
Code:
fdisk -l
as root.
 
Old 04-05-2011, 01:29 PM   #7
dave48858
LQ Newbie
 
Registered: Mar 2011
Posts: 6

Original Poster
Rep: Reputation: 0
f-disk -l did the trick

fantastic, now that I know which drive is which.

now in the print off I printed for myself from forensicswi.org, it says:

first you can copy as much data as possible, without retrying or splitting sectors:

ddrescue --no-split /dev/hda1 imagefile logfile

ddrescue being the program name, the executable file
--no-split being an option, not splitting sectors
/dev/hda1 being hard drive #1, the source
imagefile logfile this is where I'm getting confused. this would be the destination file and the log file, I'm picking up on that but where would it be putting these files without a device name or am I supposed to put a /dev/hda2/imagefilename followed by a /dev/hda3/logfile putting the log file on a different device?

having it say imagefile makes me think of an .iso file, but an image file in the works (being compiled). kind of confusing.
 
Old 04-05-2011, 01:42 PM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
You can't write files to a drive using the /dev-device descriptor. If you want to use an image-file then you have to put that on a mounted drive, like your Windows-disk in the laptop. If you want to copy directly to the second disk, you will do it like this:
Code:
ddrescue --no-split /dev/hda1 /dev/hdb1 ~/logfile
This assumes that your want to copy the first partition of the disk named hda to the first partition of the drive named hdb, with a logfile in your users /home-folder.
You can imagine an image-file in the same way as an .iso-file, but it will of course not contain an ISO9660-filesystem, but the file-system of the partition you copy.

Warning: Keep in mind that the device-descriptors may change if you change the order of plugging in the disks or if you unplug and plug in devices short after another. Always make sure that you are using the correct names before doing anything with ddrescue or dd.
 
Old 04-05-2011, 01:53 PM   #9
dave48858
LQ Newbie
 
Registered: Mar 2011
Posts: 6

Original Poster
Rep: Reputation: 0
You guys are awesome, I usually multitask when waiting for responses on forums, get two or three things done, but every time I check my email, I have another response from here, and good ones to boot. I'm calling it quits for today, but I will be back tomorrow I'm sure with more questions. (I'm not getting many of my other tasks done this way).

one more quick question, when working in linux, I notice I get a lot of double keystrokes. why is this? I don't have this problem in windows. does it not like windows machines?

Thanks a bunch,
Dave





Quote:
Originally Posted by TobiSGD View Post
You can't write files to a drive using the /dev-device descriptor. If you want to use an image-file then you have to put that on a mounted drive, like your Windows-disk in the laptop. If you want to copy directly to the second disk, you will do it like this:
Code:
ddrescue --no-split /dev/hda1 /dev/hdb1 ~/logfile
This assumes that your want to copy the first partition of the disk named hda to the first partition of the drive named hdb, with a logfile in your users /home-folder.
You can imagine an image-file in the same way as an .iso-file, but it will of course not contain an ISO9660-filesystem, but the file-system of the partition you copy.

Warning: Keep in mind that the device-descriptors may change if you change the order of plugging in the disks or if you unplug and plug in devices short after another. Always make sure that you are using the correct names before doing anything with ddrescue or dd.
 
Old 04-05-2011, 01:54 PM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
What do you mean with double keystrokes? Do you have an example?
 
Old 04-05-2011, 02:00 PM   #11
dave48858
LQ Newbie
 
Registered: Mar 2011
Posts: 6

Original Poster
Rep: Reputation: 0
mainly when I'm typing command lines, they end up coming out like this:

ddrescuee

I don't know if it's while I'm reading it from the paper and maybe hold the e down for a 1/10 of a second longer or what. but it happens quite often when I'm using a linux prompt and never when using windows.




Quote:
Originally Posted by TobiSGD View Post
What do you mean with double keystrokes? Do you have an example?
 
Old 04-05-2011, 02:09 PM   #12
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
This never happens to me, so I would assume that it is simply a misconfiguration. Are you using a GUI or a bare command line system? If it is a GUI I would search for keyboard configuration in your menu, normally you should be able to configure the repeat speed and delay.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Questions regarding Linux FTP, specifically vsftpd. EnderX Linux - Newbie 2 11-12-2010 12:44 PM
Are there any RPGs that run natively in Linux? (Specifically, Ubuntu) LinuxRedHatKnight Linux - Games 14 07-03-2010 01:08 PM
hi to Linux! Specifically UBUNTU!^^, rav3nt3ch LinuxQuestions.org Member Intro 0 04-19-2010 12:58 PM
What are some good brands of motherboards for linux? Specifically Ubuntu. abefroman Linux - Hardware 5 08-17-2009 11:32 AM
Programming Linux input devices, specifically tablets Paralel Linux - General 0 07-01-2009 02:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration