LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Restoring a faulty EXT3/EXT4 Partition after Clonezilla error (https://www.linuxquestions.org/questions/linux-newbie-8/restoring-a-faulty-ext3-ext4-partition-after-clonezilla-error-4175550217/)

Skavamareen 08-08-2015 07:13 AM

Restoring a faulty EXT3/EXT4 Partition after Clonezilla error
 
Ok, firstly, I'd like to say that I'm not strictly a Linux Newbie, I've been using Linux since about 2008, I've been signed up to this forum since 2010, but never actually posted. Whenever I have had problems before, I have always found a solution through Googling various forums.

Unfortunately, I now have a problem I can't seem to resolve. I have been really stupid! I decided to clone my PC hard drive prior to upgrading my Windows 7 to Windows 10, because something is bound to go wrong.

I used Clonezilla Live CD to clone my HDD to an external HDD. I did this, but when checking the backup, found that my main Linux partition appeared to be faulty (no recognisable filesystem), so I decided to use clonezilla again to dd to the external HDD. Unfortunately, I made the fundamental error of reversing the drives, thereby duplicating the faulty backup on top of my working Ubuntu 12.04 partition.

After a lot of headscratching, I managed to get the local HDD to be recognised as an EXT4 filesystem. I use an Ubuntu 14.04 Recovery partition to fix any issues and I am unable to mount the damaged partition (sda6), the error stating that it is already mounted or busy, but I am also unable to force unmount it as it states that it is not mounted. I have used Gparted to check the structure and while it confirms that there is a EXT4 filesystem present, it cannot be mounted, it confirms that it is about 450 used and 38 free.

In order to fix the filesystem, I used a Superblock repair from the terminal (the first functional Superblock backup was dated 2014). I am able to view the contents of sda6 using DiskInternals Linux Reader from Windows 7 and also Testdisk. These show only one Folder, 'Lost and Found' containing MANY numbered folders - which is presumably my data, but there is no structure. DiskInternals says these folders contain no data, but I know this is wrong.

So I have reached a dead end. I still have the original Clonezilla faulty backup (untouched) on the External drive, which I see as the best way of restoring my data. Even if it's just a case of backing up my Home folders and reinstalling. The problem is, on the faulty backup, there is no recognised filesystem (testdisk can't even do anything with it).

This is my main OS with all my photo's, documents etc. for the past 7 years, losing this will be a major blow, please can someone help?

Keruskerfuerst 08-08-2015 08:44 AM

You can contact a company for data recovery, like ontrack and others.

syg00 08-08-2015 09:11 AM

I won't even try to guess what the internal hard-disk looks like after your efforts.
Clonezilla creates an image file - the fact you can't mount it doesn't make it faulty. Keep that external safe.

Plug in the external and run the following - post all the output. If you don't know how to cut and paste from the terminal, re-direct the output to a file and post that. Also include a full file list of the external
Code:

lsblk -f -o+SIZE

Skavamareen 08-08-2015 09:45 AM

Quote:

Originally Posted by syg00 (Post 5402889)
I won't even try to guess what the internal hard-disk looks like after your efforts.
Clonezilla creates an image file - the fact you can't mount it doesn't make it faulty. Keep that external safe.

Plug in the external and run the following - post all the output. If you don't know how to cut and paste from the terminal, re-direct the output to a file and post that. Also include a full file list of the external
Code:

lsblk -f -o+SIZE

Thank you for your reply syg00, I opted for a Partition to Partition copy in Clonezilla rather than a Partition to Image

I used
Code:

lsblk -f -o SIZE
(excluding the +)

and got:

SIZE
931.5G
465.8G
1K
2.9G
454.6G
8.3G
931.5G
465.8G
1K
2.9G
454.6G
8.3G
1024M

Just looking at the External using
Code:

lsblk -f -o SIZE /dev/sdb
gives me:

SIZE
931.5G
465.8G
1K
2.9G
454.6G
8.3G

syg00 08-08-2015 11:49 PM

Quote:

Originally Posted by Skavamareen (Post 5402904)
I opted for a Partition to Partition copy in Clonezilla rather than a Partition to Image

OK, my bad.
Been a while since I looked at Clonezilla, so just downloaded it for a test run. The partition-to-partition clone does indeed produce a useable filesystem that can be directly mounted.
Did you allow Clonezilla to check the source filesystem ?.

Looks like you have a filesystem that was (at least) not clean and a fsck run on it. If it was completely broken and a fsck run you would likely finish up with nothing plus a bunch in lost+found like that. I don't know of any way to recover from this. I was hoping you had an image file on the external that you could extract your data from.

Skavamareen 08-09-2015 11:50 AM

Quote:

Originally Posted by syg00 (Post 5403224)
OK, my bad.
Been a while since I looked at Clonezilla, so just downloaded it for a test run. The partition-to-partition clone does indeed produce a useable filesystem that can be directly mounted.
Did you allow Clonezilla to check the source filesystem ?.

Looks like you have a filesystem that was (at least) not clean and a fsck run on it. If it was completely broken and a fsck run you would likely finish up with nothing plus a bunch in lost+found like that. I don't know of any way to recover from this. I was hoping you had an image file on the external that you could extract your data from.

The sda6 partition - which was my main OS (in preference to Windows 7) was completely functional (though possibly not clean), but the Clonezilla copy showed as an unknown file system (with exactly the same data size as the original), so I am assuming it's some form of indexing error rather than a filesystem error. Unfortunately, my knowledge of indexing is nowhere near where I need it to be to fix it. I honestly can't remember whether Clonezilla was set to 'fix' any errors - I would assume not, because what I wanted was an exact duplicate of the existing arrangement, but I honestly can't remember now whether I did or not.

Currently, I am doing a non invasive dd of sdb6 to sdb1 (the Windows 7 backup) which is a slightly larger partition. I'm working on the assumption that sdb6 is my best way of being able to salvage something and by duplicating it, I'm making a second failsafe. I'd forgotten how slow a low level dd is mind you and it's still running now 24 hours later.

I'm almost on the verge of looking into a professional data recovery service - much as I dislike the thought of not being able to fix this, I just don't have the technical knowledge to do myself, and I'm not sure how 'involved' the process would be if I were to follow the guidance of someone more knowledgeable. If you or someone else thinks they can help, I'm certainly open to suggestions.

**Edit** dd now completed successfully - I now have 2 copies of the faulty filesystem - waHoo!!

Skavamareen 08-10-2015 07:01 AM

Ok, I am now taking a slightly different tack. Since I have a bunch of folders in "lost+found" I figure that if I can find some way to access the directory tree and file paths, it might be possible to possible to identify which of the numerous hash prefixed folders ( e.g. #28311553) represents my home folders for me and my family, copy them to a blank ext4 formatted drive and rename each file header accordingly.

That way at least I should, theoretically, be able to save my data and that of my family.

Using the terminal to navigate to the mounted "lost+found" directory, and using the command:
Code:

find  / -type d -name "skavamareen" -ls
I was able to determine (what I believe to be) the correct directory for my home folder.

I will try the above and post back the results. Just need to locate a large enough available hard drive....


All times are GMT -5. The time now is 08:27 PM.