LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-11-2010, 07:36 AM   #46
d1mkaz
Member
 
Registered: Apr 2010
Posts: 32

Original Poster
Rep: Reputation: 15

well, I hope someone who will read this tread, will be a bit more clever and will have a little bit more knowledge than I do.

anyway, when dd_rescue stopped, I was not sure what to do next. I did not have testdisk installed, and did not clearly understood how to try to mount rescued dd file. then computer did not want to unmount new hdd and old hdd, when I used right click and unmount, so I used umount .

By the way, as far as I knew Linux is very stable system, but at some point computer started playing funny, it would not let me do screenshots, or upload anything from usb stick, it did not freeze or something, but I had to restart it, and everything became fine (reminded old Windows I used )

I managed to install testdisk: apt-get install testdisk
I had to connect internet first and installation process took a minute or less.

My next plans as unSpawn explained in post 41:
1.try to mount dd file
2.photorec (as most of data I want to save are jpeg.)
3.may be try to fix and mount faulty drive, or send it back to Freecom (where I bought it from last August, so still under warranty).

Last edited by d1mkaz; 05-11-2010 at 07:38 AM.
 
Old 05-11-2010, 03:47 PM   #47
d1mkaz
Member
 
Registered: Apr 2010
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by unSpawn View Post
If you want to mount it, in case you would want to fsck --dry-run /media/disk/sdc2.dd then run 'mkdir /mnt/mountpoint; losetup /dev/loop0 /media/disk/sdc2.dd. Now you can run 'fsck.vfat -nlvV /dev/loop0'. Now to mount the image to access file contents proceed by running 'mount /dev/loop0 -t vfat /mnt/mountpoint -o ro' and see the "/mnt/mountpoint" directory. This may not work if FAT is damaged (as suspected): see 'dmesg' output if the mount command errors out.
this bid did not work, as unSpawn suspected!
"mount /dev/loop0 -t vfat /mnt/recovery -o ro" (I used mnt/recovery)
showed errors, and "dmesg" showed a lots of everything what does not really make sense to me, but I saved it in text file just in case. The only thing I understood was last line:

[ 442.440882] VFS: Can't find a valid FAT filesystem on dev loop0.

so next step - photorec
 
Old 05-11-2010, 04:04 PM   #48
d1mkaz
Member
 
Registered: Apr 2010
Posts: 32

Original Poster
Rep: Reputation: 15
now I cannot unmount hard drive, it's /dev/sdb1 on /media/disk

starwood@starwood-laptop:~$ umount /media/disk
/sbin/umount.hal: Unmounting /media/disk failed: org.freedesktop.Hal.Device.Volume.Busy: umount: /media/disk: device is busy
starwood@starwood-laptop:~$ umount /dev/sdb1
/sbin/umount.hal: Unmounting /dev/sdb1 failed: org.freedesktop.Hal.Device.Volume.Busy: umount: /media/disk: device is busy


all applications are off

ok, did it using "umount -l /media/disk"

Last edited by d1mkaz; 05-11-2010 at 04:29 PM.
 
Old 05-11-2010, 04:42 PM   #49
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
If a drive is busy you have to find out what is still running, it may be a 'process' or an 'application' such as konqueror or nautilus that is still listing the contents of the drive.

If it is a process then it may be found (sometimes) by running (as root or sudo) the command: ps aux | grep sdb1

or: ps aux | grep media

these commands return a 'pid' number which can be killed by root : kill XXXX (where XXXX is the process id returned by the ps aux command

If this does not work you can manually edit /etc/fstab (again as root) using an editor such as gedit - just delete the line that starts /dev/sdb1 - save the file - and exit

Hope this helps
 
Old 05-12-2010, 03:11 PM   #50
d1mkaz
Member
 
Registered: Apr 2010
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by unSpawn View Post
If you want to use Photorec to try to recover files by type then you do not have to mount the device. You do require storage to be available (in excess of 500GB, depending on your recovery options using Photorec). If the new 1TB disk has only 1 partition that spans the whole disk you could make a directory there: 'mkdir /media/disk/undelete' then just supply the image name on the commandline: 'photorec /log /debug /d /media/disk/undelete /media/disk/sdc2.dd', then select Proceed, Intel, File Opt, press "s" to disable all file family recovery options. Now only select (space bar) the extensions or file types for the files you would like to prioritize finding and press "q" to return to the menu one level up. Now select the appropriate options for your machine and selected file types and press "q" to return to the menu one level up. Now selecting Search will make Photorec go in and try to retrieve data. * Depending on what files or file types you want to recover your recovery strategy may involve different runs with different settings and siphoning off data from the output dir in between runs keep available disk space at a usable level.
did that, after more than 8 hours:

PhotoRec 6.8, Data Recovery Utility, August 2007
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /media/disk/sdc2.dd - 499 GB / 465 GiB (RO)
Partition Start End Size in sectors
D empty 0 0 1 60784 83 63 976500252 [Whole disk]


3009 files saved in /media/disk/undelete directory.
Recovery completed.
jpg: 2977 recovered
mpg: 26 recovered
asf: 6 recovered

sounds promising
so, I do Quit
and open Hard Drive, I can see 8 undelete folders
first one undelete, rest undelete.1 ***.2 ***.3 ... ***.7
the first folder is empty
the rest, when I try to open:

The folder contents could not be displayed.
You do not have permissions necessary
to view the contents of ***

what's wrong now??? how do I get permissions?

or how do I copy folder from one hard to another using terminal?

Last edited by d1mkaz; 05-12-2010 at 05:49 PM.
 
Old 05-13-2010, 08:45 AM   #51
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by d1mkaz View Post
what's wrong now??? how do I get permissions?
Photorec needs to run as root and lesser-privileged users are by default not allowed to access files that are owned by other user Ids. That's not a problem but actually one of the strengths of UNIX-like OSes. If the unprivileged user Id you use is named "d1mkaz" you could recursively change permissions of the /media/disk/undelet* directories and files: 'chown -R d1mkaz.d1mkaz /media/disk/undelet*'.


Quote:
Originally Posted by d1mkaz View Post
or how do I copy folder from one hard to another using terminal?
As root user run 'cp -r /media/disk/undelet* /path/to/other/disk/' where "/path/to/other/disk/" is the mounted directory name on the other disk.


* BTW, don't forget to read http://www.cgsecurity.org/wiki/Advanced_FAT_Repair as testdisk might still be used to inspect file system contents and rebuild the FAT.
 
Old 05-13-2010, 03:22 PM   #52
d1mkaz
Member
 
Registered: Apr 2010
Posts: 32

Original Poster
Rep: Reputation: 15
Thank you unSpawn again.
I managed to see what is inside undelete folders by "gksudo nautilus"
it's easier for me, as I get used to graphical interface.
I did not had time to copy files yet, but one thing is a bit worrying.
when photorec finished, this was the conclusion:

3009 files saved in /media/disk/undelete directory.
Recovery completed.
jpg: 2977 recovered
mpg: 26 recovered
asf: 6 recovered

so 2977 files jpeg saved, if file size between 2MB and 3MB
then it should be around 8000MB what makes it 8GB,
I had about 40GB of pictures, does it mean I lost the rest? 30GB will never recover?
That is really really sad!
 
Old 05-13-2010, 06:37 PM   #53
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by d1mkaz View Post
I had about 40GB of pictures, does it mean I lost the rest? 30GB will never recover?
That is really really sad!
Photorec is a header / footer file "carver" and carving isn't too subtle a process. There's no guarantee when it comes to file recovery. The amount of time you kept working on the machine after the umount error may have allowed for more filesystem corruption as well. It's just not good ignoring that kind of errors. Finally we just don't know the condition of the file-system on the "victim" partitions image, plus you haven't told us what options or settings you used for recovery. So I wonder if you're drawing conclusions too hastily or not. (BTW I'm not going to point you at testdisk again.)
 
Old 05-14-2010, 12:46 PM   #54
d1mkaz
Member
 
Registered: Apr 2010
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by unSpawn View Post
Photorec is a header / footer file "carver" and carving isn't too subtle a process. There's no guarantee when it comes to file recovery. The amount of time you kept working on the machine after the umount error may have allowed for more filesystem corruption as well. It's just not good ignoring that kind of errors. Finally we just don't know the condition of the file-system on the "victim" partitions image, plus you haven't told us what options or settings you used for recovery. So I wonder if you're drawing conclusions too hastily or not. (BTW I'm not going to point you at testdisk again.)
to be fare, dd_rescue did the job, photorec did the job,
so I would always recommend this way to everyone who has
problems with unmountable hard drives.

Or may be someone will try PTrenholme suggestion in post Nr.36.

But anyway, I highly recommend
TO DO BACKUPS, of important data.
that should save time, money, and nerves.

Last edited by d1mkaz; 05-14-2010 at 12:50 PM.
 
Old 05-14-2010, 02:34 PM   #55
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by d1mkaz View Post
so 2977 files jpeg saved, if file size between 2MB and 3MB
then it should be around 8000MB what makes it 8GB,
I had about 40GB of pictures, does it mean I lost the rest? 30GB will never recover?
That is really really sad!
You can still take it to a professional recovery service.
 
Old 06-04-2010, 01:17 PM   #56
d1mkaz
Member
 
Registered: Apr 2010
Posts: 32

Original Poster
Rep: Reputation: 15
conclusion for my situation:

As I said in the beginning, something happened to hard, and it's stopped mounting on mac os x (1tb - 2 partitions 500GB Fat & 500GB Mac journaled, problem with Fat32). This tread dedicated to that problem.

I said as well, that I can mount the FAT32 partition under Knoppix (from CD) , there is Knoppix from CD or from DVD available on in-net, it's free, and it works ! The only thing you have to do is burn CD or DVD with Knoppix, and then restart computer with CD or DVD in it, and when starting hold "C" , so it boots from CD or DVD (MacBook Pro)

So, after all the trouble I went (it's all on this tread) , I went back, and mounted FAT32 under Knoppix. I was able to open the FAT32 partition and see folders. Opening took some time, it looks as it freezes and I was patient and waited for some time, not pressing any buttons, and there was "loading" message on screen forever, but at the end it did open! When I was able to see folders, I went for the one important to me, and opened it the same way (another 5-10min waiting). I have to say, that I did sort all the folders in order before crash, so when I opened, lets say folder "pictures" , inside there where A, B, C, D, etc ... folders. I marked folder "A" (in Knoppix, it's just pointing mouse on folder). Marking folder actually took another 5-10 min. But when it was marked, copy/paste did the job. Copy/Paste is another waiting story, you leave it overnight, and next morning you see 10% or more if you lucky, moved to another (healthy) hard drive. Or sometimes you can get Error message, that happened to me once, then you probably cannot do anything about it.

P.S. several folders had ? mark at the end of the name, those I was not able to move.

All this you do usually, unusual stuff is time. You have to wait. Sometimes it takes really long. But if info you getting is important, then time is not a problem.
The last 3 or 4 weeks I was working on it. At the moment I did get about 40GB of data (sorted data not mess as I had with photorec). Unfortunately it is not the end yet, but fortunately it works, and hopefully after another couple weeks, I'll have all my data back which I thought was lost for good.

It was said earlier, that doing so can damage Hard Drive even more, and I cannot comment on that, but in MY situation, it did work, and even If I did damaged HDD more, I did get a lot more from it this way than I did using terminal and different tools. As I said before, those tools did the job, and thanks to everyone who helped me. But I found the way it worked for me more efficiently.

Hope that helps.

Last edited by d1mkaz; 06-07-2010 at 09:23 AM.
 
  


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
recovering data yusufs Linux - Newbie 4 10-06-2008 11:58 PM
Recovering SD data Fice Linux - Software 2 12-21-2007 09:14 PM
Recovering Data KrazyKanuk Linux - Newbie 4 10-25-2007 02:43 PM
data recovering ??? Dmitry Bandurin Linux - General 2 07-25-2006 06:03 PM
Recovering data CatSC Linux - Newbie 3 12-31-2003 11:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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