We are committed to providing fast, efficient, and affordable software solutions that set new standards in the software development industry.
  • Data Recovery from a Reformatted Ext2/3/4FS Disk

Ext2/Ext3/Ext4 file system (FS) is the main file system for the Linux environment, including many Linux-based network attached storage (NAS) devices. For many Linux distros, this is the default file system. Ext2/3/4FS disks cannot be recognized by Windows or macOS machines without special third-party software. This means that if the disk is used exclusive on a Linux machine, it's very likely that the disk is formatted as Ext2/3/4FS.

In this article, we'll walk you through a typical Ext4FS data recovery scenario: we'll show you how to use R-Studio to get your files back after an Ext4FS disk was reformatted. The same technique may be used for reformatted NAS RAIDs, provided that you can assemble them in R-Studio. See R-Studio help for details: Volume Sets and RAIDs.

Before We Begin
If you are following along our procedure with your own data recovery scenario, it's important to make sure that your situation is similar enough to our test case. Make sure to check the following before proceeding:

The drive you are attempting to recover is a disk with a reformatted Ext2/3/4FS partition.
This article only applies to Ext2/3/4FS formatted devices. If you need to recover data from other disks, see our other articles:

Your disk is in good physical condition
We presume that your disk is in good physical shape. If not, it's best to seek out the services of a professional data recovery specialist. Beyond checking that the cables are firmly connected, any "do it yourself" data recovery efforts may actually worsen your chances of recovering the data if your disk has a serious physical malfunction. Signs that a disk has a physical failure include:

  • The system does not recognize the device at all, or it appears with an unusual or garbled name.
  • A S.M.A.R.T. (Self-Monitoring, Analysis and Reporting Technology) utility warns that a severe hardware failure event has occurred. R-Studio can check S.M.A.R.T. conditions of your disk, and we explain how to do that below.
  • The hard drive makes unusual noises, clicks, or takes a very long time to spin up and initialize.
  • Bad blocks continually appear on the drive.

All these cases are best handled by qualified data recovery professionals. They have special equipment, software, and, most importantly, the required skills to work with such drives. Neither R-Studio nor other data recovery software will help you in such cases. Moreover, any further tampering with such a drive will very likely inflict more damage to your data. Quite often, such damage will render the data completely irrecoverable, even by a data recovery professional.

And one last reminder...
Do not write anything on the disk from which you're going to recover data! The new data may overwrite your old files, and you may lose them for good.

Test Disk Setup: Initial Folder Structure and Files on the Drive
To show you the recovery process, we prepared a test disk with a typical set of user files that may be on an Ext4FS disk distributed over a certain folder structure.

Documents:

  • Archives: .zip files created in WinZip
  • PDFs: .pdf files created in Adobe Acrobat
  • Microsoft Office: .doc and .docx files created in Word; .xls and .xlsx files created in Excel
  • OpenOffice: .odt and .docx files created in Writer; .ods and .xlsx files created in Calc

Multimedia:

  • Music: .mp3 files
  • Pictures: .jpg and .png files
  • Video: .avi, .flv, .m4v, .mov, .mp4, .mpeg, .mts, and .mkv files.

The root folder of the test disk is shown in Fig. 1.
Root folder of the test disk
Fig.1: Root folder of the test disk
Click image to enlarge

After setting up the files, we performed a disk reformat using the Disk tool in Linux. Upon doing this, the disk will initially appear completely blank.

Data recovery process
Preliminary preparation:

  • Before you begin, prepare a storage place large enough to store all recovered files. It may be any disk visible by the operating system including an external or network drive. Do not try to save the files on the same disk from which the files are being recovered.
  • If you haven't already, download and install R-Studio. Right now, it is not necessary to buy and register the program. R-Studio in its demo mode allows you to perform all the necessary data recovery operations, except saving the recovered files. This lets you see if it can successfully recover your files and therefore, if it's worth buying. You will not have to re-install or restart R-Studio to register it.
    Note:We'll use the Linux version of R-Studio to show the data recovery process, but these directions are fully applicable to the Windows and Mac versions of R-Studio. The panels and dialog boxes will have a different look and feel, but the functionality is the same.

1. Connect the disk to the computer running R-Studio.

Note: Disk scans and data recovery operations can take a long time to process, particularly if the capacity of the disk is very large. For this reason, it's important to use the fastest interface available. The fastest interfaces are SATA/eSATA and USB 3.0. Many external drives will have one or more of these interfaces. USB 2.0, while most common, is the slowest interface and may not be sufficient for larger disks.

2. Start R-Studio and locate the reformatted disk and the disk where the recovered files will be stored.
R-Studio main panel with the reformatted disk
Fig.2: R-Studio main panel with the reformatted disk
Click image to enlarge

Before proceeding, check the S.M.A.R.T. attributes for the reformatted disk:

  • If the health status is CAUTION, there may be minor problems with the disk, but it should be safe to use the disk for data recovery purposes. The problems are likely to worsen, so check the S.M.A.R.T. parameters periodically to ensure that the health status hasn't gone to BAD. Creating an image of the disk is recommended, but this will require additional storage space.
  • If the health status is BAD, the disk conditions are critical and chances of hardware failure are high. The best recommendation for this case is to stop working with the disk and bring it to professional data recovery specialists. You may continue to work with the disk at your own risk, but disk imaging is very strongly recommended.

If the S.M.A.R.T. attributes of the disk are OK, we can start data recovery.

3. Select the reformatted disk and click the Scan button. The Scan dialog box will appear.
Disk scan dialog box
Fig.3: Disk scan dialog box
Click image to enlarge

Since we know the file system from which we are trying to recover, we can improve R-Studio's results and performance by specifying the file system of the reformatted disk. Click the Change... button next to File Systems and leave only the Ext2/Ext3/Ext4 file system selected. Also, it's a good idea to save scan info for the disk in case you have to stop data recovery and resume it later. The next time you open the disk in R-Studio, you won't have to re-scan the disk; you can simply reload the scan information from the previous session.

4. Check that the Extra Search for Known File Types option is selected and click the Known File Types... button.
Known File Types dialog box
Fig.4: Known File Types dialog box
Click image to enlarge

Specify only those file types that you believe resided on the deleted disk. The best way to do that is to click the Clear button and then select the necessary types in the list. Then click the OK button and return to the Scan dialog box.

5. Click the Scan button. R-Studio will start scanning the disk. The progress of the disk scan will be shown.
Disk scan in progress
Fig.5: Disk scan in progress
Click image to enlarge

6. Inspect the scan results and find the recognized partition that corresponds to the deleted disk.
Scan results
Fig.6: Scan results
Click image to enlarge

In our case, this is the Recognized1 partition.

If other partitions previously existed on the disks, R-Studio may find them. You will have to determine which of the recognized partitions is the one you are looking for. In most cases, the partition you are attempting to recover will be the same size as the existing logical disk. See R-Studio online help for more details: Data Recovery Using R-Studio.

7. Double-click the Recognized1 partition. R-Studio will enumerate the files on it and show the folder tree.
Files and folders found on the reformatted disk
Fig.7: Files and folders found on the reformatted disk
Click image to enlarge

When Linux reformats an Ext4FS disk, it completely erases all traces of the previous file system and the constituent files can only be found by their file signatures. This method of data recovery is known as a "raw file recovery" or a "search for known file types." The folder structure, file name, timestamps, and other attributes cannot be recovered using this method.

R-Studio sorts files recovered from a raw file recovery according to their types and names and autogenerates a filename, such as 0265.docx. In some cases, R-Studio can attempt to recreate meaningful file names and timestamps from information and file attributes stored in the file's tags or metadata.

If you are searching for a particular file or set of files, you can use the advanced find and mark capabilities of R-Studio. See R-Studio help for more details: Searching for a File.

8. Use the built-in Previewer to estimate chances for successful data recovery. This is particularly useful with large picture files. Double-click a file to preview it.
File preview
Fig.8: File preview
Click image to enlarge

If several files appear correctly, you can purchase a license and register R-Studio. Now you may start saving recovered files.

9. Select the files and folders you want to recover and choose a location to save the recovered files.
Files marked for recovery and recovery options
Fig.9. Files marked for recovery and recovery options
Click image to enlarge

If necessary, specify other recovery parameters. See R-Studio on-line help for details: Basic File Recovery. Then, click the Recover Marked button.

10. R-Studio will start recovering files showing its progress.
Data recovery process
Fig.10: Data recovery process
Click image to enlarge

11. When the recovery finishes, R-Studio will show a final report with the recovery results.
Data recovery results
Fig.11: Data recovery results
Click image to enlarge

Data recovery results
To view the recovered files, browse to the folder you selected in step 9 of the data recovery process.
Data recovery results
Fig.12: Data recovery results
Click image to enlarge

For our test scenario, we managed to recover all files from the reformatted disk. But the information about the original folder structure, file names, and other attributes was lost. R-Studio named some files using the information from the tags and attributes of those files.

Conclusions
If you have an Ext2/3/4FS disk that has been accidentally reformatted, try performing the steps above in the demo mode of R-Studio. If you can successfully find and preview the files you are looking for, go ahead and register the product to get your files back. Attempting a data recovery on an accidentally formatted disk using R-Studio is risk-free, provided that the disk is in good physical shape and that no new data is written to the disk. In many cases, you can recover 100% of your data, even if some of the file information is lost (such as file names and folder structures). R-Studio can even glean some of this file information from metadata and tags.

Linux Recovery Feedback
15 feedbacks
Rating: 4.9 / 5
Just recovered my old ext4 partition with R-Studio after trying testdisk and R-Linux without success. That partition was overwritten by another ext4 partition and I was losing my hope until I tried R-Studio demo. It detected all my files and directories again!

Bought it and 100% recommend it for anyone with a similar issue.
Hello!
Thank you very much for R-Studio for Linux.
Please pay attention to new Linux package manager `Snappy` => https://snapcraft.io/
Good luck!
Great programm, great service, TOP !A+++
While currently evaluatin R-Studio for Linux i`m quite impressed with how thorough it is.

Regrettably it`s not possible to simply restore the accidently zapped partitions ?

An installer wiped my boot drive without asking and erased LVM and other partitions.
I used R-Linux to recovery my company files after a RAID 1 failure. Not only did it work great in windows 10 but it was free. You guys are awesome!!! A+++++++++++++ I hope I never need your software again:)