JustToThePoint English Website Version
JustToThePoint en español
JustToThePoint in Thai

How to recover a partition table and deleted files II

A learning experience is one of those things that says, ‘You know that thing you just did? Don’t do that, Douglas Adams.

Did you accidentally delete some vacation photos, lovely and unforgettable family pictures, important office documents, multimedia or other files, do not panic,at least not yet.

Deleting files and directories securely and permanently is almost always irreversible, so even using dedicated recovery software is very unlikely that you are able to recover your data.

If you have deleted your files and folders by mistake or accident, because you did not think you were going to need them, or if your computer got fried after a power outage or a storm, you are not the only one -just follow these instructions and do not panic! First, you should read our first article How to recover deleted files.

If your Windows does not boot up normally, create a Linux bootable USB, boot from it, and try to access and recover your files.

How to recover a partition table and deleted files

How to recover a partition table and deleted files

 

TestDisk is a powerful free data recovery software. It can run under Windows, GNU/Linux, and macOS. It is an ideal tool when you want to recover files from corrupt and damaged partitions or unbootable systems.

  1. Installation: brew install testdisk (macOS); sudo apt install testdisk (Ubuntu, Debian); sudo pacman -S testdisk (Arch). Run TestDisk in the terminal: sudo testdisk. Select Create a new log file and hit ENTER. TestDisk

    TestDisk

     
  2. Select the drive that was holding the deleted files using the arrow keys and tap on Proceed. TestDisk

    TestDisk

     
  3. Typically, TestDisk will automatically detect the partition table type you are using, e.g, EFI GPT, Intel, or XBox. Hit ENTER to continue. TestDisk

    TestDisk

     
  4. Select the Analyse option for the utility to analyse the partition structure and search for lost partitions. Otherwise, choose Advanced, and hit Enter. TestDisk

    TestDisk

     
  5. If you want to recover deleted files (and obviously you want that), select the Undelete option. TestDisk

    TestDisk

     
  6. Choose the file to recover and press c to copy the file. TestDisk

    TestDisk

     
  7. Select the location where recovered files should be copied. TestDisk doesn’t try to unerase files to their original locations, but lets you copy the deleted files you want to recover on to another partition or disk. TestDisk

    TestDisk

     
It is worth noticing that if your continue to use the computer after you have deleted or lost some files, the chances to recover anything from it will be reducing by the minute and byte.

When all hope is gone

Abandon hope all ye who enter here, Dante Alighieri

SafeCopy is one of the best tools when everything else fails and data seems to be completely unrecoverable. The utility copies data to a new location and tries to extract data from damaged media.

  sudo safecopy /dev/sdb1 dataRecover.iso --stage1

After that, you may want to try to mount dataRecover.iso. If you are running out of luck and no recovery files are to be found, try sudo testdisk. Select a media (/dev/loop0), hit Continue even if write access isn’t available. You may likely want to go with Intel/PC partition, Advanced, and select the Undelete option. Success! Select the location where recovered files should be copied, and that’s all folks! 😄  

How to recover your partition table

Would it save you a lot of time if I just gave up and went mad now?, Douglas Adams.

Sometimes, you need to recover the partition table: sudo testdisk. Select a media (e.g., /dev/loop0 or /dev/sda), and hit Continue even if write access isn’t available. This option is not always there, but depends on the situation.

You may likely want to go with Intel/PC partition, Advanced, Analyse the current partition structure and search for lost partitions, choose the Quick search option to locate partition tables, select or highlight the found partition, and press INTRO to proceed with recovering the partition table.

Use the up/down arrow keys to select your hard drive with the lost partition/s. Examine your current partition structure for missing partitions and errors. In my particular case, Windows has created a system reserved partition (* indicates primary bootable, [System Reserved]), the system partition (P indicates primary partition), and a recovery partition.

Recover partition tables

Recover partition tables

 

If everything looks good to you, choose the Write option to recover it, then Y to confirm these changes, quit the tool, and reboot.

PhotoRec

PhotoRec is file data recovery software designed to recover lost files including video, documents and archives from hard disks, CD-ROMs, and lost pictures from digital camera memory.

  sudo photorec dataRecover.iso

PhotoRec

PhotoRec

 

You may want to select File Opt to choose the type of files you want to recover, e.g., doc, gif, jpg, kpbx, etc., then hit Search. PhotoRec

PhotoRec

 

To recover lost files, PhotoRec needs to know the filesystem type where the file were stored: Ext2, Ext3, and Ext4 are all file systems created for GNU/Linux. Windows uses NTFS and FAT/32, and Mac OS uses HFS+. PhotoRec

PhotoRec

 

Typically, the default options are the best way to go. PhotoRec

PhotoRec

 

From now on, it is quite the same process as with previous recovering tools, search for a location to save the recovered files to, and press c when the destination is correct. PhotoRec

PhotoRec

 

Bibliography: Digital Ocean, Top 20 Best Linux Data Recovery Tools to Recover Deleted/Corrupted Files

If you have not been able to recover your data yet, it is likely to be a mechanical failure of your drive, then you need a professional disk drive repair service. “Unless the damaged drive has extremely valuable data on it, it is a more secure and cost-effective option to purchase a new drive rather than repair the damage one,” Platinum Data Recovery.

Bitcoin donation

JustToThePoint Copyright © 2011 - 2024 Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun. Social Issues, Join us.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.