Files gone after FSCK!
I have recently corrupted my hard drive somehow, and I am wondering how to fix it. I was installing some graphics drivers, as well as installing windows alongside Ubuntu that day, then Ubuntu suddenly would not boot, BIOS would not open(frozen boot screen for a minute) and then would enter grub recovery. I tried to boot from my hard drive through grub recovery but a weird message would pop up saying File system is unknown(NOT unknown file system).
This was happening with each partition on the drive. So I booted from a live usb and used fsck to fix the drive. After it was done everything was gone. I used TestDisk to recover the files, but i would never be able to sort the thousands of files without their paths. I looked through GParted at the hard drive that was supposedly empty, and I found one partition with 14 GB used(about the amount that I had on my computer beforehand). I re-checked the hard drive for any files, but I couldn't find any(I checked for hidden ones) lost+found was empty and there was no trash. I have no idea why this is and I need help! UPDATE: In disk usage manager, it shows that their is no space used up. Screenshot of Disk Manager: httphttps://i.stack.imgur.com/IOQbA.png Screenshot of GParted: http://https://i.stack.imgur.com/FAhDW.png |
Could you give us the output of
Code:
$ fdisk -l /dev/sda |
Yes, the output is:
ubuntu@ubuntu:~$ sudo fdisk -l /dev/sdc Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 byte |
Might look as S.M.A.R.T info as well as run memtest. I like to think that drives don't go data bad like that.
|
Gparted has a data recovery feature should i try that? or will that not save the paths as well.
|
OK, that drive has no MBR partition table. Try using testdisk to recover the partition table.
Otherwise, you're just going to have to sift through the recovered files to find what you want to save. There are a couple of tools to make this task easier. Code:
$ file * > type.txt Code:
$ sort -k 2,2 type.txt > type1.txt Alternately, you can open the recovery directory using nautilus and sort by type.Then you can organize the files by type. Once you know the file types you can use various programs to open, say jpegs, in batch mode, i.e. with gwenview. It's a tedious process. But if the files are worth anything, it's worth the time. |
Let's have some data:
- the failed disk is /dev/sdc and was partitioned ? - you ran testdisk and nominated /dev/sdd as the target ?. - /dev/sdd, the device node, unpartitioned ? (just checking). - let's see a "lsblk -f -o +SIZE" listing. Uneditted. Testdisk doews what it can - there are scripts that attempt to give the files useful names using grep/exiftool that sort of thing. Even on the testdisk site IIRC. Its manual, and specific to your data. And takes some time. Haven't used gparted for recovery but I suspect you'll get similar to testdisk. |
Ok which option in TestDisk will recover the partition table, do I have to analyse It first?
|
If fsck removed them, then, I am sorry to tell you, they were already gone. :(
|
Off-topic, but...
Quote:
Just wanting to understand... Thanks! |
Could I manually fix the partition table with fdisk?
|
Quote:
I do think fsck did do something to it though. |
What I meant to say was, the directory structure was gone.
You might find the notion of lost+found worth trolling through ... I don't. |
fsck ensures the integrity of the filesystem - not necessarily the files within.
Recreating the partition table does no damage to your data that may still be there, but anything after that (creating a filesystem, adding files) will almost certainly lead to over-writing of (at least) some of the residual data. At some point you will have to accept that the data on the corrupt disk, is lost. |
I have found a very interesting thing that happened with gparted when I tried to resize the partition, take a look in the screenshot.
Screenshot: http://imgur.com/a/y6ipr |
All times are GMT -5. The time now is 01:06 PM. |