LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-29-2016, 05:28 AM   #1
Mojos 324
LQ Newbie
 
Registered: Jan 2016
Location: South Yorkshire UK
Distribution: Knoppix Linux 7.2.0
Posts: 4

Rep: Reputation: Disabled
Using Linux to get data off a faulty hdd


Hi I'm John and long time retired. I have used computers for many years first starting in the work environment in 1970. You will note I said USED. I have built quite a few desktops over the years and always used Windows in various reincarnations. Currently I have a home built desktop with a Gigabyte P67X-UD3-B3 MoBo an Intel G850 processor 16368Gb memory with a SSD 250Gb drive. Running Win 7 Ultimate 64bit software.

The original SSD drive in this computer died a few weeks ago and was replaced with the current one. Unfortunately it also damaged a 2nd HDD and the computer stalls when opening Windows if this one is in the machine. I have tried a known good HDD and the computer works fine with that in. So that is the story so far.

It was suggested that I try using Linux to open the faulty and retrieve the stuff on the HDD so I have bought a CD with Knoppix 7.2.0 and run that from the CD. The HDD is recognised but not will not mount. The software produced a large amount of instruction? most of which I didn't understand. I copied this info with a view to sending it to my wireless printer. Unfortunately I don't know how install it because my knowledge of Linux is very sparse.

So I guess I need help. I would be very greatful for some advice mainly I think in using Linux. I've spent a lifetime acquiring knowledge a little bit more slowly now so please keep things simple.

Regards John
 
Old 01-29-2016, 03:06 PM   #2
ShadowCat8
Member
 
Registered: Nov 2004
Location: San Bernardino, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 261

Rep: Reputation: 52
Greetings,

Well, you came to the right place!
You don't necessarily need to have the drive mounted to recover it... In fact, the most reliable way I have found to recover from problematic drives is ddrescue. (NOTE: ddrescue != dd_rescue. You want ddrescue!)

So, while booted up to the LiveCD with the problem drive as the first drive and the new, blank drive as the second, the command you would need is:
Code:
 # ddrescue -n /dev/sda /dev/sdb [/path/to/logfile]
That will make as complete a full image of the problematic drive as is possible onto the new drive.

The "/path/to/logfile" is optional, but I HIGHLY recommend using it. And, if on a LiveCD, you can mount and use a USB stick to write the logfile so you keep it, even between reboots. The purpose is: if you have an issue with the recovery procedure, you can resume the recovery where you left off as long as you have the logfile.

Once you have the drive imaged over to the new one, you may have to run a filesystem check on the new one to make the files accessible, but once that completes, you should have everything that could be recovered from the old drive.

HTH. Let us know. And, if you still have more questions, feel free to ask.
 
Old 01-29-2016, 03:16 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Some form of dd command or ddrescue may be a way. If you are a complete newbie then you do have to be very careful with those commands. The path name is very important.

Maybe some other ideas could be useful too.

Look at with gparted maybe. Should be on Knoppix still. Might offer some clue to what is going on.

Tell us how you are trying to mount it maybe and if any exact error is displayed.

A useful tool is one called testdisk. It may offer clues to what files may be recovered.



Almost any of the top distro's at distrowatch.com have ways to boot to a live cd/dvd/usb even if they don't say it anymore. Many are simply live cd's. You can generally add in programs even while live if you have enough ram.

As with all disasters, try not to make it worser (Texas word there).
 
Old 01-29-2016, 06:47 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
For a person new to Linux, I suspect post #2 would all be mumbo-jumbo. Maybe even dangerous if the devices are not correct.

@Mojos 324, do you know how to use the terminal in that Knoppix system ?. If so, run these and post the output
Code:
lsblk -f -o +size
sudo parted -l
 
Old 01-29-2016, 07:03 PM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Windows will not start when this HD is connected. Linux will not mount it. Why? Is there an error message? Assuming the filesystem is too damaged for successful mount. I'd make a backup copy as suggested above and try to run filesystem repair tool on it in Windows. Do you have a USB enclosure for this drive? You may be able to boot Windows and plug in the enclosure to repair the filesystem ...
My 2.
 
Old 01-29-2016, 08:46 PM   #6
Fred Caro
Senior Member
 
Registered: May 2007
Posts: 1,007

Rep: Reputation: 167Reputation: 167
dd will copy the HDD warts 'an all, ddrescue will copy what it can and try to "rescue" an image of the HDD but what you will be left with might not be as you expected, ie. you can try and rescue the data but you might not get back a working version of Windoze.

Fred.
 
Old 01-31-2016, 08:22 AM   #7
Mojos 324
LQ Newbie
 
Registered: Jan 2016
Location: South Yorkshire UK
Distribution: Knoppix Linux 7.2.0
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks

Thanks to everyone for the advice especially to Machtelt Garrels for the copy of Introduction to Linux which I have successfully downloaded.

It will most likely be the middle of next week before I get round to trying out some of the suggestions. I will do a backup before going any further. I have ordered a new 1 TB SATA drive for my computer to replace the faulty one. Currently the only working internal drive is the SSD C: drive. I have a USB external drive that I use to store mainly video and photos and unplug that when not needed.

I have little knowledge on using any form of Linux I have installed various trial versions in the past but was put off by the need to use programs such as Word for work. I have used command line with windows so I can follow instructions, but I have not tried it in Linux. In the meantime I will have a read of Introduction to Linux.

It has been sugessted that I have the faulty drive as No1 and a new drive at No2 how do I do that, in bios? And what about the current C: drive with Win7 and other programs on it, do I disconnect that?

There is nothing of monetary value on the disk. There is however a huge number of photos and videos taken on holidays and other events over quite a few years. I had a look on line at the possibility of letting a company recovering the material but it is very expensive. Does anyone know how they go about this?


regards

John
 
Old 01-31-2016, 09:25 AM   #8
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Do not know about commercial services, but another thing you could try is Hiren CD to repair the filesystem. Your drive is probably NTFS, this is proprietary filesystem and I do not think there are any good repair tools for it in Linux for obvious reasons.
 
Old 02-01-2016, 02:59 AM   #9
MrTux
Member
 
Registered: Dec 2015
Posts: 131

Rep: Reputation: Disabled
I would try mounting the hard drive using a live disc while having the storage device ready to transfer as taking data from a doomed hdd is like playing russian roulette with a revolver for data.
 
Old 02-01-2016, 06:18 PM   #10
Fred Caro
Senior Member
 
Registered: May 2007
Posts: 1,007

Rep: Reputation: 167Reputation: 167
you could try one of partedmagic's file recovery tools. This is a live disk you can download the image for or you could use a windows oriented tool like recuva to get your pictures, etc back. I'm not sure if recuva is available as part of a bootable disk. Each time you try to boot a damaged/compromised drive you risk it failing completely.

Fred.
 
Old 02-01-2016, 08:34 PM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
DEFT Linux is a forensic distro -- they may have some software on there that can get info off your hdd.. that is FBI stuff oohhhh - maybe even get a bage too go with it.

------------

found this too

GNU ddrescue Manual
Quote:

Introduction: Purpose and features of GNU ddrescue
Basic concepts: Blocks, clusters, devices, files, sectors, etc
Important advice: Read this or risk losing your data
Algorithm: How ddrescue recovers the data
Invoking ddrescue: Command line interface
Mapfile structure: Detailed format of the mapfile
Emergency save: Saving the mapfile in case of trouble
Optical media: Copying CD-ROMs and DVDs
Examples: A small tutorial with examples
Direct disc access: Bypassing the kernel cache
Fill mode: Selectively overwriting the output file
Generate mode: Generating an approximate mapfile
Ddrescuelog: Tool for ddrescue mapfiles
Invoking ddrescuelog: Command line interface
Problems: Reporting bugs
Concept index: Index of concepts

Last edited by BW-userx; 02-01-2016 at 08:51 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New HDD install w/data recovery from old HDD w/different distro w/encrypted /home forbinproject Linux - Laptop and Netbook 1 02-27-2012 10:18 PM
faulty transmission of 100 kb data using TCP/IP protocol NancyT Programming 6 01-28-2009 01:07 AM
"faulty spare" do I have a bad HDD? Red Squirrel Linux - Software 3 09-29-2008 05:23 PM
Recovering data on RAID 5 with semi-faulty hdd davidsaxton Linux - Hardware 2 09-16-2006 03:45 PM
Advice needed on transferring data from HDD to HDD denimglen Linux - Newbie 3 03-04-2006 07:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:46 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