I’ve moved all files except one from the original ext4 drive (A) to a newly formatted NTFS drive at destination (B), and then I’ve formatted the drive A by going to the Disk Management on Windows, deleting the volume and the make a new simple volume with a quick format.

After restarting I found out that the destination drive was corrupted.

On Windows I got

Location is not available

G:\ is not accessible.
The disk structure is corrupted and unreadable.

On Windows on drive B I used chkdsk g: /f /r /x from an admin cmd but it says:

Corrupt master file table. Windows will attempt to recover master file table from disk.
Windows cannot recover master file table. CHKDSK aborted.

On drive A I’ve used sudo fsck.ext4 -vy /dev/xxx to recover the ext4 file system. I got a single file back which was the only one I didn’t move.

How should I attempt to recover the files in the drive?

The first software I tried on drive B was Recuva. I got a Warning saying

Failed to scan the following drives:
A:: Invalid data run detected

Resources

  • @The_Lemmington_PostOPM
    link
    1
    edit-2
    4 months ago

    To recover the file system, files, and directory structure from an ext4 drive that you formatted to NTFS, you’ll need to use data recovery tools designed for this purpose. Here are the general steps you can follow:

    1. Stop using the drive immediately: Once you realize you need to recover data from the formatted drive, stop using it and avoid writing any new data to it. This will increase your chances of successful recovery.

    2. Create an image of the drive: It’s recommended to create a byte-by-byte image of the entire drive using a tool like ddrescue or dd. This will ensure that you’re working with an exact copy of the drive, preserving all existing data.

    3. Replicate the loss of data on a smaller drive (optional): If you’re working with a large-capacity drive and want to speed up the recovery process for testing purposes, you can replicate the loss of data on a smaller drive. This will allow you to work with a more manageable drive size while testing the recovery process.

    4. Use a data recovery tool: There are several data recovery tools available for Linux that can scan the drive image and attempt to recover files and directory structures from the previously existing ext4 file system. Some popular options include:

    • TestDisk: A powerful command-line tool that can recover lost partitions and repair file systems.
    • PhotoRec: A data recovery tool designed to recover lost files from hard disks, CD-ROMs, and other media.
    • extundelete: A command-line tool specifically designed to recover deleted files from ext4 file systems.
    • Foremost: A data recovery tool that can recover files based on their headers, footers, and data structures.
    • ext4magic: A tool to recover deleted or overwritten files on ext3 and ext4 file systems.
    • Scalpel: A file carving and indexing application that allows you to specify headers and footers to recover file types from a storage media.
    • ddrutility: A complement to GNU ddrescue that finds which files are related to bad sectors and provides special tools for NTFS (no longer actively supported).
    • dvdisaster: A tool that provides additional error protection for CD/DVD media.
    • xfs_undelete: A tool that traverses the inode B+trees of each allocation group and tries to recover all files marked as deleted on an XFS file system.
    1. Scan the drive image: Use the chosen data recovery tool to scan the drive image. Most tools will allow you to specify the type of file system you’re trying to recover (in this case, ext4).

    2. Recover files and directories: After the scan is complete, the tool should present you with a list of recoverable files and directories. You can then select the ones you want to recover and specify a location to save them.

    3. Verify recovered data: Once the recovery process is complete, verify that the recovered files and directories are intact and usable.

    It’s worth noting that the success of data recovery greatly depends on the extent of the formatting process and whether any new data was written to the drive after formatting. The sooner you attempt recovery, the better your chances of success.

    Additionally, if the recovered data is particularly important or valuable, you may want to consider consulting a professional data recovery service, as they often have more advanced tools and expertise to handle complex recovery scenarios.