Storage forum

Question

Recover ext3 files from a formatted (to NTFS) HDD?

Hey,

So it turns out there was a small amount of critical data on a computer previously used as a backup machine (Linux, ext3 HDDs) for one of our Linux based servers, but we forgot to archive it properly on an external device before doing a complete wipe and reinstalling the machine with Windows, formatting the HDDs to NTFS.

My question is, do you happen to know any 'file-restoring/recovery' programs which can retrieve files from a now NTFS volume, that previously was an Ext3 volume, but had been formatted and had a completely new OS installed on it?

Greetings,
Ben

Discussion is locked
You are posting a reply to: Recover ext3 files from a formatted (to NTFS) HDD?
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Recover ext3 files from a formatted (to NTFS) HDD?
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Clarification Request
Were these or this drive part of a RAID system?

In reply to: Recover ext3 files from a formatted (to NTFS) HDD?

hopefully not.

Collapse -
testdisk instructions

In reply to: Were these or this drive part of a RAID system?

for encrypted drives or RAID drives. Again, hope it's not either, because then you'd also need the passwords for the encrypted system.


testdisk /dev/mapper/truecrypt0 or testdisk /dev/loop0 to repair the NTFS or FAT32 boot sector files from a TrueCrypt partition.

(I included above because some, such as I, also use TrueCrypt in Linux too)

The same method works with (Linux) filesystem encrypted with cryptsetup/dm-crypt/LUKS.

testdisk /dev/md0 to repair a filesystem on top of a Linux RAID device.

Collapse -
gddrescue info

In reply to: Were these or this drive part of a RAID system?

I used my Mint Linux Terminal to get info on the "ddrescue" aka "gddrescue" program.
=========================================

mint16@mint16 ~ $ aptitude show gddrescue
Package: gddrescue
New: yes
State: not installed
Version: 1.17-1
Priority: optional
Section: universe/utils
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: i386
Uncompressed Size: 217 k
Depends: libc6 (>= 2.7), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1)
Description: GNU data recovery tool
The gddrescue tool copies data from one file or block device (hard disc, cdrom, etc) to another,
trying hard to rescue data in case of read errors.

gddrescue does not truncate the output file if not asked to. So, every time you run it on the same
output file, it tries to fill in the gaps.

The basic operation of gddrescue is fully automatic. That is, you don't have to wait for an error,
stop the program, read the log, run it in reverse mode, etc. If you use the logfile feature of
gddrescue, the data is rescued very efficiently (only the needed blocks are read). Also you can
interrupt the rescue at any time and resume it later at the same point.

Automatic merging of backups: If you have two or more damaged copies of a file, cdrom, etc, and run
gddrescue on all of them, one at a time, with the same output file, you will probably obtain a
complete and error-free file. This is so because the probability of having damaged areas at the
same places on different input files is very low. Using the logfile, only the needed blocks are
read from the second and successive copies.

The logfile is periodically saved to disc. So in case of a crash you can resume the rescue with
little recopying. Also, the same logfile can be used for multiple commands that copy different
areas of the file, and for multiple recovery attempts over different subsets.

gddrescue aligns its I/O buffer to the sector size so that it can be used to read from raw devices.
For efficiency reasons, also aligns it to the memory page size if page size is a multiple of sector
size.

Please note that this is the GNU ddrescue version providing the ddrescue executable. The package is
named gddrescue because the ddrescue version of Kurt Garloff used to have the ddrescue package name
already.
Homepage: http://www.gnu.org/software/ddrescue/ddrescue.html

Collapse -
Photorec inside of TestDisk

In reply to: Were these or this drive part of a RAID system?

Collapse -
Will give it a chance...

In reply to: Photorec inside of TestDisk

Thanks, I'll let GParted work for a few more days (it didn't even ask what type of partition it should look for, by the way (newest version of the Live CD)), then I'll attempt a recovery with TestDisk and PhotoRec.

Collapse -
I wouldn't wait

In reply to: Will give it a chance...

Earlier I had my GParted Data Recovery try to recover data on a fully functional 1 TB hard drive with current partitions, both Logical Volume and Active with both Linux and Windows on it. It failed to properly find them. Yet an earlier test on a windows only drive worked. Time to try something else.

Collapse -
Not part of RAID, only a basic HDD...

In reply to: Were these or this drive part of a RAID system?

The HDD wasn't part of any RAID system, it was used as a single, external backup storage drive in a desktop computer.

All Answers

Collapse -
Answer
GParted

In reply to: Recover ext3 files from a formatted (to NTFS) HDD?

It's Linux version of a Partition Manager and the latest versions of it also contains a Data Recovery function. It will show you the different file systems available and you can choose to view one in a "read only" manner, which opens a file manager, and you can then copy off the files still available under that former partition. Fairly easy to use. If you have a LIVE DVD, probably has GParted already on it, so just boot to the DVD and copy off the files on the corrupted drive that was under the previous system onto backup.

Collapse -
Re: GParted

In reply to: GParted

Thanks for the swift reply, we'll attempt a restore via the program you mentioned.

Do you suppose it would not have any problems restoring at least a small portion of the data despite that formatting with Windows installer wipes both the data and the partition table?

Collapse -
Unless you ran "dd" or....

In reply to: Re: GParted

...some other zero or random data generator across it afterwards, most of the data should still be there. Formatting usually wipes the partition tables and then setups up new partitions which seem blank. A file table might be gone, but the file themselves would still be there and a new table of those files are created by the recovery software, allowing them to be accessed again.

Collapse -
Good to hear that...

In reply to: Unless you ran "dd" or....

Good to hear that, we didn't run any extra data wiping method after the "file system conversion" formatting by the Windows Installer Disk, and didn't even use the computer after that, in order to keep the integrity of the files possibly (and hopefully) still existing somewhere on the HDD.

We will now attempt the file recovery by booting from the GParted Live CD, and try to recover as much data as possible to an external HDD.

Thank you for the help and advice, the software seems promising in terms of recovery capabilities, I'll post again regarding the result as soon as we finish our attempt.

Collapse -
(NT) no rush, i'm gone for next few hours

In reply to: Good to hear that...

Collapse -
Is the super long scan time normal?

In reply to: no rush, i'm gone for next few hours

Hey, so we've started the data recovery attempt on the 1TB HDD almost a week ago now (booted the mini-linux from the Live CD to prevent further data loss), but the search for (previous) file systems is still running. As there is no progress bar, I can't tell what percentage of the HDD has been scanned so far, and the message box clearly stated that the scanning process can take a long time, but didn't expect it to take more than a week. Is that normal for the software, or should I start worrying that the data is gone for good?

Collapse -
Depends on damage.

In reply to: Is the super long scan time normal?

One time we let a recovery software run for a month. Didn't recover much and another testament that backup today is not optional.

Collapse -
You may be out of luck

In reply to: Is the super long scan time normal?

You could try some others, but unless they will scan "ext" type file systems they won't work for what you want. I believe the software in GParted is same as TestDisk. It might be a reduced capable version but i don't think so, but could try the TestDisk alone, outside of GParted if you want and see. Here's a wiki on running Testdisk as stand alone.

If you had any option to choose a file system to restore which was the old ext2,3,4 file system, then doing that would have speeded things up in being able then to access direct from file manager and gone fairly quickly.

Almost all linux partition repair CD's use "testdisk" because it's the best. For instance, here's SystemRescueCD and you see what it has on it.

System tools included

GNU Parted: creates, resizes, moves, copies partitions, and filesystems (and more).
GParted: GUI implementation using the GNU Parted library.
Partimage: popular opensource disk image software which works at the disk block level
ddrescue: Attempts to make a copy of a partition or floppy/Hard Disk/CD/DVD that has hardware errors, optionally filling corresponding bad spots in input with user defined pattern in the copy.
FSArchiver: flexible archiver that can be used as both system and data recovery software
File systems tools (for Linux and Windows filesystems): format, resize, and debug an existing partition of a hard disk
Ntfs3g: enables read/write access to MS Windows NTFS partitions.
sfdisk: saves / restores partition table (and more).
Test-disk: tool to check and undelete partition, supports reiserfs, ntfs, fat32, ext2/3 and many others
Memtest+: to test the memory of your computer (first thing to test when you have a crash or unexpected problems)
Rsync: very-efficient and reliable program that can be used for remote backups.
Network tools (Samba, NFS, ping, nslookup, ...): to backup your data across the network

Browse the short system tools page for more details about the most important software included.

Browse the detailed package list for a full list of the packages.


there's an Unbuntu Rescue ReMix. This has ddrescue with it. If you want to get totally geeked out in trying to dig out the data, you could try it.

ddrescue

Here's a wiki on it.

GOOD LUCK!

Popular Forums

icon
Computer Newbies 10,686 discussions
icon
Computer Help 54,365 discussions
icon
Laptops 21,181 discussions
icon
Networking & Wireless 16,313 discussions
icon
Phones 17,137 discussions
icon
Security 31,287 discussions
icon
TVs & Home Theaters 22,101 discussions
icon
Windows 7 8,164 discussions
icon
Windows 10 2,657 discussions

SMART HOME

This one tip will help you sleep better tonight

A few seconds are all you need to get a better night's rest.