LinuxQuestions.org
Visit Jeremy's Blog.
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
 
LinkBack Search this Thread
Old 03-02-2013, 01:24 AM   #1
Gerard57
LQ Newbie
 
Registered: Jul 2008
Location: Rotterdam, The Netherlands
Distribution: Suse 12.2 and Mint 14 Mate
Posts: 6

Rep: Reputation: 0
How to recover files from a HD Linux can not mount


halo to all,

I want to recover files from a HD that cannot mount in Suse 12.2, Mint 14 Mate or windows 7.

What did I do:

I did install a larger HD to use as home partition while I was reinstalling Suse 12.2. I always used a separate HD as home partition. In stead of removing the old drive I "removed" it in the partition settings previous to the actual installation.

The problem now is that the drive can not be mounted anymore. When I make it a new partition it have to be formatted before it can be mounted again.

So, this is my question:

How can I recover the files on this HD before I format it?

If this have to be done in a terminal, please a step by step plan, because I am unfamiliar with that part.

Thanks already for any help

Gerard
 
Old 03-02-2013, 02:13 AM   #2
John VV
Guru
 
Registered: Aug 2005
Posts: 12,144

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
in opensuse 12.2
udev "should" be auto mounting it in /media/???? some long number
but only after you click on it in the left window ( places) in dolphin ( KDE ) or nautilus ( gnome)
and type in your root password in the pop-up

now if there is an error a "notice" will be displayed at the bottom of dolphin
 
1 members found this post helpful.
Old 03-02-2013, 04:28 AM   #3
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 582

Rep: Reputation: 129Reputation: 129
Could you post the result of
Code:
fdisk -l
or
sudo fdisk -l
And did you remove the partitions on the old drive. If you did it's gonna be difficult to retrieve the files.
 
1 members found this post helpful.
Old 03-02-2013, 05:30 AM   #4
Gerard57
LQ Newbie
 
Registered: Jul 2008
Location: Rotterdam, The Netherlands
Distribution: Suse 12.2 and Mint 14 Mate
Posts: 6

Original Poster
Rep: Reputation: 0
To John VV

Suse freezes immediately and Min 14 Mate Gives me the following result:

Not able to mount 160 GB volume

Error mounting /dev/sdb1 at Media/gerard/long number: Command line: mount -t "ext4" -o "uhelper=udisks2,nodev,nosuid" "/dev/sdb1" "media/gerard/d9ccb98c-6906-412f-aa85-f85f5cddb7dd" wrong fs type,bad option,bad superblock on /dev/sdb1

I did this with the following output:

Usage: mount -V : print version
mount -h : print this help
mount : list mounted filesystems
mount -l : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
mount -a [-t|-O] ... : mount all stuff from /etc/fstab
mount device : mount device at the known place
mount directory : mount known device here
mount -t type dev dir : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
mount --bind olddir newdir
or move a subtree:
mount --move olddir newdir
One can change the type of mount containing the directory dir:
mount --make-shared dir
mount --make-slave dir
mount --make-private dir
mount --make-unbindable dir
One can change the type of all the mounts in a mount subtree
containing the directory dir:
mount --make-rshared dir
mount --make-rslave dir
mount --make-rprivate dir
mount --make-runbindable dir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using -L label or by uuid, using -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say man 8 mount .

To whizje

On both command no result

I did not delete or format any partition so everything has to be still there

thanks
 
Old 03-02-2013, 11:48 AM   #5
rootaccess
Member
 
Registered: Mar 2012
Posts: 211

Rep: Reputation: Disabled
So if the drive is still in the system, reboot and tell us the output of "dmesg" when booting up. Or you can peruse the /var/log/messages file to look for it in there. Was it sdb? Is it still sdb? It may not mount, but it will show up there.

You mentioned nothing comes up in fdisk -l. Meaning nothing at all pertaining to your old drive?
 
1 members found this post helpful.
Old 03-02-2013, 12:03 PM   #6
rootaccess
Member
 
Registered: Mar 2012
Posts: 211

Rep: Reputation: Disabled
Also you need to tell us EXACTLY what you did.

"In stead of removing the old drive I "removed" it in the partition settings previous to the actual installation."

That is not enough information for us to help you. If you want us to give you a step by step plan to recover your files, then you need to give us a step by step explanation of exactly what you did. I am pretty sure I help you recover your files as I recently formatted a 32GB flash drive with 28GB of data on it, then re-wrote a filesystem over it and still got most of my files back.

However, here are some questions I'd like to see answers to.
1) Are you just interested in recovering the data, without regards to filenames, timestamps, directory structure?
2) How much data is actually on the 160GB drive?

Data recovery using forensic tools is not pretty at all. You will not be able to get most of the names of the files back, as they will be renamed according to the output of how the forensic tool decides to list them.
 
1 members found this post helpful.
Old 03-02-2013, 12:13 PM   #7
John VV
Guru
 
Registered: Aug 2005
Posts: 12,144

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Are you 100% sure that the old drive IS " /dev/sdb1"

if " fdisk -l " is not outputing anything

from the " no results "
that is bad
that basic OS tool should be working
it should be giving you a full list of every partition

I am guessing that this is an internal HD and not a usb
and that this drive for your HOME
IS IN THE SECOND position !!
and is listed in the bios as being the second drive
( none of this i know 100% for sure ) without seeing the results of
Code:
su -
fdisk -l
that is " a blank space , then a dash then a lowercase "L"
for ext4 this should work
( mind you i installed opensuse12.2 with a DIFFERENT password for root ,it it NOT my normal users password )
Code:
su -
---- your root password when asked ---
mkdir /mnt/SecondDisk
mount /dev/sdb1 /mnt/SecondDisk
------ then this -----
cd /mnt/SecondDisk
ls -l
the "ls -l" will output a long list
 
1 members found this post helpful.
Old 03-05-2013, 12:22 PM   #8
Gerard57
LQ Newbie
 
Registered: Jul 2008
Location: Rotterdam, The Netherlands
Distribution: Suse 12.2 and Mint 14 Mate
Posts: 6

Original Poster
Rep: Reputation: 0
Halo,

Here is step by step what I did to make my hard disk useless for my computer.

1. I installed a new GPU and hard disk. I wanted to use this new HD as home partition and to remove the old one. So far, so good.
2. I also wanted a “clean” installation of Open Suse 12,2 64bits. During this process I made a big mistake. At the moment during the installation routine that I have to make the partitions in the way I want, I selected the old HD and clicked on “chance”. In the next window I clicked accidentally on “remove”. I wanted to cancel this but clicked stupidly enough on ok. I could not undo this.
3. After this mistake I tried to turn this action back by making a new partition of this HD. The problem here is that the HD have to be formatted to make it mountable. This I did not. I did not formad the disk. All the files are still on the HD, I only don't know how to recover them.

So, in fact the old HD is still in good shape. I only want to recover the files on it and copy them to another HD. After that I can do with the disk whatever I like.

About internal or USB, I used the controller of my USB drive to connect my old HD to my laptop (Mint 14 Mate - 32bits)

My question:

Can one of you guys tell me how I can recover the files from my old HD.

I did all the things you told me and if necessary I can provide you the results, but I think that this is not really necessary at the moment.

Many thanks

Gerard
 
Old 03-05-2013, 01:05 PM   #9
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,426

Rep: Reputation: 890Reputation: 890Reputation: 890Reputation: 890Reputation: 890Reputation: 890Reputation: 890
Nobody seems to be answering the original question, which is how to recover files off of an unmountable hard drive.

The simple answer is to boot into a working OS, and then use a data recovery tool like testdisk/photorec on the unmounted drive that you want to recover. It will take some time, and you'll lose the filenames of the files that are recovered, but it should find them if they haven't been overwritten on the disk (at least all of the file types that the recovery tool is capable of recovering).

http://www.cgsecurity.org/wiki/PhotoRec_Step_By_Step
 
1 members found this post helpful.
Old 03-05-2013, 01:54 PM   #10
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 478

Rep: Reputation: 100Reputation: 100
Sometimes you can find the actual files with names and all. Just use testdisk, not photorec, select the partition and either recover it (if only the partition created data was erased, it will surely work). Or enter it then copy the files from it (the latter does not require to write anything to the drive).
 
1 members found this post helpful.
Old 03-09-2013, 06:42 AM   #11
Gerard57
LQ Newbie
 
Registered: Jul 2008
Location: Rotterdam, The Netherlands
Distribution: Suse 12.2 and Mint 14 Mate
Posts: 6

Original Poster
Rep: Reputation: 0
Halo to all my Helpers

How much I did learn this last few day. Yes I did recover my all my files with Testdisk and Partedmagic. I did not loose any filenames after the files were copied to my laptop, I only could open them as root. So I did manage to change the rights too.

Don't laugh, for me, all these things are quit an effort. I am 55 and from pre-computer time.

I have to thank you all. You showed me the way.

Many, many thanks

Gerard
 
  


Reply

Tags
hard disk, recovering


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to recover deleted files in linux ramecare Linux - Server 20 07-20-2012 03:20 AM
How to recover .sql files in Linux sux01 Linux - General 2 10-26-2010 11:02 AM
How to mount/recover files from crashed Linux OS? alar Ubuntu 3 09-14-2006 05:13 PM
Recover Files in Linux??? How to??? DeathGoth Linux - Software 1 10-17-2004 03:35 PM
how to mount and recover files off NTF partition lewisdw Linux - Newbie 2 06-13-2004 09:22 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration