Author Topic: Reformatted important partition, how can I recover  (Read 1118 times)

Offline Hootiegibbon

  • Hero Member
  • *****
  • Posts: 4151
Re: Reformatted important partition, how can I recover
« Reply #15 on: January 04, 2011, 03:03:50 PM »
wedgetail,

If it helps on the WMii Iso I have as part of the livecd Photorec, foremost and safecopy all of which are recovery applications perhaps they could be of help?

Jase


I am Hootiegibbon, undisputed champion fo the typo

My .dotfiles

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2443
  • Any Bugs in site?
Re: Reformatted important partition, how can I recover
« Reply #16 on: January 04, 2011, 04:36:19 PM »
Hootiegibbon
Thank you for the information I will look at that. My hope of retrieving anything at all is 1% at this stage. Not as much a a single byte and I simply don't understand.   I am not that familiar with deep levels of Linux but have learnt a bit about superblocks, inodes etc. Something else than an ordinary re-format has taken place.  On a number of occasions I have recovered similar accidents on my Windows pc's after a lot of interesting and hard work.

I am going to run a few experiments in the coming hours to give me some more insight as I am getting stubborn.   >:(   After the 12 hour zeroing excercise of a new 1TB hard drive using dd The partition is so empty I started to wonder if a LiveCD does a quick zero before installing and if that is the case I am down the drain.  I had never thought of that.
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2443
  • Any Bugs in site?
Re: Reformatted important partition, how can I recover
« Reply #17 on: January 05, 2011, 03:17:00 AM »
I am being pummeled seriously by KDE2010.12, my stand in workhorse, which is no saying enough is enough  ;D  Having to retreat to MiniMe now to post this.

In an effort to find some file or any file on my "lost" drive, of which I have a copy here on /dev/sdb1.  After testdisk gave up on me, or is it the other way around, I finally gave up and relented and installed photorec on the present workhorse system on /dev/sda12 and was getting to know it again. It was finding files by the thousands.

Having trouble finding a location to store the result, I decided to store output on /dev/sdb2 the partition next to the image copy I am working upon. The partition was duly mounted

Code: [Select]
mount /dev/sdb2  /here

and I returned to start photorec pointing output to /there alls seem well. I stopped and started searching different files. Finally got a bit sick of that and stopped photorec to consider the situation.  Long and the short computer got really slow, I restarted and login went into a loop I could not get in as user.

Can get in as root and have found that my /home is full and for that matter the whole patition:

Code: [Select]
[root@localhost gert]# df /dev/sda12
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda12             20G   20G     0 100% /media/mythtvkde12
[root@localhost gert]#

Looking with Dolphin I can't figure where the space is taken up. I can't think straight anymore.  ;D

Question: there is a command line statement that will list files and use?  
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11591
  • ----IOFLU----
Re: Reformatted important partition, how can I recover
« Reply #18 on: January 05, 2011, 03:38:38 AM »

Having trouble finding a location to store the result, I decided to store output on /dev/sdb2 the partition next to the image copy I am working upon. The partition was duly mounted

Code: [Select]
mount /dev/sdb2  /here

and I returned to start photorec pointing output to /there  

If it's not a typo, you mounted the storage partition on /here, then pointed photorec at /there, which would then store all the recovered files on your / partition, not the storage partition.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2443
  • Any Bugs in site?
Re: Reformatted important partition, how can I recover
« Reply #19 on: January 05, 2011, 04:53:53 AM »
I am struggling but will get there, I think it is a typo, trying to find my record that I thought I kept, in the mean time I find 139 directories taking up about 7 GB on the /dev/sdb2 so at some time files went there.

Edit:

I have mounted /dev/sda12 on /gremlin

Code: [Select]
[root@localhost gert]# du -a -h /gremlin/here |grep G
1.7G    /gremlin/here/recup_dir.15/f5054080.pdf
2.6G    /gremlin/here/recup_dir.15/f36917248.pdf
3.9G    /gremlin/here/recup_dir.15/f46746256.pdf
2.6G    /gremlin/here/recup_dir.15/f18273296.pdf
1.6G    /gremlin/here/recup_dir.15/f14918800.pdf
16G     /gremlin/here/recup_dir.15
17G     /gremlin/here
[root@localhost gert]#

What on earth is going on.  >:( but at least the partition really is full.  At some stage I must have sent output to the wrong location. One explanation could be that the mount at one stage failed and I did not notice, then that follows your suggestion, but to /here

Back and try again to get everything from photorec to /dev/sdb2

Edit:
While I was running MiniMe2010 to get above files, I also deleted them all to start afresh.  Rebooted and selected KDE2010.12, but it still did not want to let me log in as user.  I logged in as root but only 30 seconds later I was told I was low on storage in /home (which is part of the / partition, as I only run one partition systems).  The recovered file overflow was back even before doing anything  >:( >:( since I was root I deleted the lot again.

Logged out as root and logged in as User this time with no problem. I am now using the system again, I did have to "reset" the Video size just a tad,  by using PCC - Harware - Graphics - Test, for some reason that is all I need to do and sometimes not even that.  I have seen this before but I think it is first time in KDE2010.12.
« Last Edit: January 05, 2011, 06:07:59 AM by wedgetail »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2443
  • Any Bugs in site?
Re: Reformatted important partition, how can I recover
« Reply #20 on: January 05, 2011, 06:49:52 PM »
I am just leaving the file recovery for the moment and returning to testdisk:

Scenario:



1..  /dev/sdb8 partition made up after the whole drive /dev/sdb was zeroed, using dd (12 hour exercise)
   formatted by using mke2fs -t ext4 -L DELTA-08 /dev/sdb8


2..  Installed KDE2010.12 on the partition partition /dev/sdb8 by doing "rsync -av ...."
   of a running backup copy of KDE2010.12 held on /dev/sda13
   
3..  Made a quick boot stanza in my boot menu.lst and checked that the system could run.

4..  From another KDE2010.12, my normal work horse I then glee fully and with great satisfaction "simple formatted" /dev/sdb8
   by using mke2fs -t ext4 -L DELTA-08-DONE /dev/sdb8

Definition: "simple formatted" formatted the partition with the same file system as it already had


Now I change my mind, I want to recover the previous running system on the partition.

My understanding was that this was just the job for "testdisk"?   Am I right or wrong?

If I am right I have misunderstood something when running "testdisk" and will then return to that
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen