Linux - GeneralThis 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
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.
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.
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.
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?
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.
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).
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)
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.
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.
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
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.
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
What do you mean with double keystrokes? Do you have an example?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.