LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-11-2016, 03:54 PM   #1
lilzz
Member
 
Registered: Aug 2006
Posts: 73

Rep: Reputation: 15
Trying to recover my crashed hard rive.


i crashed my hard drive and it cannot boot anymore.
My hard drive is dual boot linux/window
So, I use Ubuntu Live CD to boot and I go into that.
Then I sudo fdisk -1

which one is my lost Linux drive? /dev/sda5?

I want save my files.
What do I do next?
Attached Thumbnails
Click image for larger version

Name:	Untitled1.png
Views:	27
Size:	84.3 KB
ID:	22706  
 
Old 08-11-2016, 04:40 PM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Unless the partition table you show is damaged sda5 is your linux partition. Can you mount it under your live CD and use a backup method like dump to a remote machine?
 
Old 08-12-2016, 05:17 AM   #3
lilzz
Member
 
Registered: Aug 2006
Posts: 73

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by linosaurusroot View Post
Unless the partition table you show is damaged sda5 is your linux partition. Can you mount it under your live CD and use a backup method like dump to a remote machine?

My hard drive is crashed, therefore
if I do
sudo mkdir my_file
sudo mount /dev/sda5 /my_file


After a long long while, it says : mount point /my_file does not exist.

I check, the /my_file folder exists. remember, my hard drive has crashed.
 
Old 08-12-2016, 09:53 AM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,566

Rep: Reputation: 2093Reputation: 2093Reputation: 2093Reputation: 2093Reputation: 2093Reputation: 2093Reputation: 2093Reputation: 2093Reputation: 2093Reputation: 2093Reputation: 2093
Quote:
Originally Posted by lilzz View Post
My hard drive is crashed, therefore
if I do
sudo mkdir my_file
sudo mount /dev/sda5 /my_file


After a long long while, it says : mount point /my_file does not exist.
Unless you are currently in the system root directory ("/"), "my_file" and "/my_file" are not the same thing.
 
1 members found this post helpful.
Old 08-12-2016, 11:24 AM   #5
lilzz
Member
 
Registered: Aug 2006
Posts: 73

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by rknichols View Post
Unless you are currently in the system root directory ("/"), "my_file" and "/my_file" are not the same thing.
OK, I modified
mkdir my_file
pwd
/home/ubuntu

sudo mount /dev/sda5 /home/ubuntu/my_file

Now it says mount: /dev/sda5: can't read superblock

my hard drive has crashed. How to recover the data inside?
 
Old 08-12-2016, 11:58 AM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by lilzz View Post
i crashed my hard drive and it cannot boot anymore.
How, exactly did this event occur?
 
Old 08-12-2016, 12:14 PM   #7
lilzz
Member
 
Registered: Aug 2006
Posts: 73

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Habitual View Post
How, exactly did this event occur?
The computer got frozen and unresponsive I had no choice but to press the power button and then that happened.
 
Old 08-12-2016, 12:18 PM   #8
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 7,231

Rep: Reputation: Disabled
Try a "dry run" of fsck on this filesystem, see what it tells you.
 
Old 08-12-2016, 02:16 PM   #9
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
don't know. Sorry.
Frozen, and power cycle during an install or upgrade usually necessitates a re-install of the OS.

Last edited by Habitual; 08-12-2016 at 02:19 PM.
 
Old 08-13-2016, 10:28 AM   #10
lilzz
Member
 
Registered: Aug 2006
Posts: 73

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Emerson View Post
Try a "dry run" of fsck on this filesystem, see what it tells you.
I did sudo fsck /dev/sda5
but it says back.ext2: attempts to read block from filesystem resulted in short read while trying to open /dev/sda5.
Could this be a zero length partition?
++++++++++++++++++++++++++++++++++++++++++


So from above, is my Linux partition cannot be recovered? or the system still can't find it?

Last edited by lilzz; 08-13-2016 at 10:31 AM.
 
Old 08-13-2016, 11:06 AM   #11
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora 34
Posts: 3,664

Rep: Reputation: 1059Reputation: 1059Reputation: 1059Reputation: 1059Reputation: 1059Reputation: 1059Reputation: 1059Reputation: 1059
"short read" means the read stopped on a bad block. Make a backup of the data using dd commands to skip any unreadable parts, then repair by forcing a write of the bad block(s), which will cause the disk to relocate them to spare areas. After that run fsck to recover your filesystem. ext2 has redundant superblocks, so it should be possible to recover some of the data.
 
Old 08-13-2016, 11:27 AM   #12
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 7,231

Rep: Reputation: Disabled
Use of ddrescue should be preferred over dd.
 
1 members found this post helpful.
Old 08-13-2016, 06:22 PM   #13
lilzz
Member
 
Registered: Aug 2006
Posts: 73

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Emerson View Post
Use of ddrescue should be preferred over dd.
I do not have ddrescue in my system but have badblocks
Can I use that instead but that's very slow.

Last edited by lilzz; 08-13-2016 at 06:27 PM.
 
Old 08-13-2016, 06:25 PM   #14
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 7,231

Rep: Reputation: Disabled
This is why SystemRescueCD was invented.
 
Old 08-13-2016, 06:26 PM   #15
lilzz
Member
 
Registered: Aug 2006
Posts: 73

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by smallpond View Post
"short read" means the read stopped on a bad block. Make a backup of the data using dd commands to skip any unreadable parts, then repair by forcing a write of the bad block(s), which will cause the disk to relocate them to spare areas. After that run fsck to recover your filesystem. ext2 has redundant superblocks, so it should be possible to recover some of the data.
How do I use that?
dd if=/dev/sda5 of=my_file.img?
Then fsck my_file.img?
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Hard drives crashed on CentOS-64 server - installed new drive, need to recover data rolandpi Linux - Server 2 07-29-2013 04:51 AM
Linux Blade server detecting only 1 hard rive nehad Linux - Newbie 3 07-09-2013 01:43 AM
Second hard rive questions zappadragon Linux - Newbie 3 11-01-2010 07:51 PM
Why did Linux give most of my hard rive to /home? gram_vaz Linux - General 2 06-03-2004 06:21 AM
Quick hard rive question ixus_123 Linux - Hardware 5 04-30-2004 10:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:07 AM.

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