We all know what to do when you accidentally delete a file. Just head to the recycle bin and restore the file. But what if you have lost a whole partition?
Whether your SD card was infected with viruses or you misclicked while creating a new partition, losing a partition containing important data can be a big blow. The computer just prompts you to format the space, which doesn’t help you regain your lost files.
But how can you recover a lost partition? Let’s find out.
As long as no new information is written on the disk, there is a good chance of being able to retrieve all of your lost data intact.
How can a partition get deleted?
There are many ways of losing a partition of your SD card or USB drive. From accidental mistakes to system errors, here are all the main causes of a deleted partition.
- ❓ Repartitioning – The most common way to lose a partition is by accidentally deleting it. But how do you accidentally delete a partition? It isn’t like you can right-click on your hard drive and delete it, can you?
As it turns out, it is actually quite easy to delete a partition. When you are, let’s say, reinstalling our OS, all it takes is a click to create a new partition. Disk management is another tool where you directly work with partitions, and can easily wipe out an existing partition when trying to create new ones.
Partitions removed like this do not erase the old data but just ‘forget’ where it is. Use a data recovery tool to recover your files.
- 🔨 Corrupted Partition Table – If you haven’t deleted the partition, your partition has probably disappeared due to data corruption. There are many causes for this. Improper ejection of the SD card (or USB), sudden power failure, or even a software issue.
Usually, only a few files get corrupted, which, while damaging, is not enough to take down a whole partition. Sometimes though it is possible for the system’s partition table itself to get corrupted. This makes the whole partition inaccessible to the OS, along with all the data on it.
But as the corruption only affects the filing system, your files themselves are probably still intact. With the right methods, it is possible to recover all of your data. If the affected sectors are few, CHKDSK might help. Otherwise, you can always use a data recovery tool to get the files back.
- 🐜 Malware – Viruses are another big cause of losing data. Some especially dangerous viruses can even start deleting partitions of a disk.
This is a problem as partitions that were taken down by malware are not easily repaired. Your only solution is to recover your data from the lost partition.
Just as with corrupted a corrupted partition, viruses generally target the file table itself. This means that there is a good chance that you can get back your lost data with a data recovery application.
- ⛔ Bad Sectors – Both SD cards or USB sticks have a limited life. While modern storage media are designed to be very rugged, sooner or later they reach the end of their lifecycle and cannot store data anymore.
As that happens, sectors on the disk start going ‘bad’. Sectors are the logical units of storage in any kind of memory device. A typical partition spans over multiple sectors, divvying up its files across them.
Each sector has a limited number of read/write cycles. When these cycles are exhausted, data can no longer be stored on them. And if these sectors contain system files, their loss can hide the whole partition. The error checking tool can often fix bad sectors.
How to recover a deleted partition on an SD card or USB
Contrary to what you might expect, recovering a deleted partition is not that difficult. Unlike deleted files, a lost partition usually stems from issues in the file system itself. This means that your data is usually intact.
No matter whether your SD card was formatted as NTFS or FAT, you can recover your data with the right approach.
Method 1. Attrib
Many online articles consider the attrib command the solution to all issues with storage media. Lost files, deleted partitions, or corrupted hard disks, everything can apparently be restored from the command prompt.
Unfortunately, that’s not true. The attrib command has one function and one function alone: it can change file attributes. In practice, this is usually used to show hidden files.
Some milder viruses merely hide the files instead of deleting them. If the only issue with your partition’s missing data is that the files are hidden, then the attrib command is just what you want.
To use it, head to the command prompt and enter the following:
attrib -h -r -s /s /d X:\*.*
Where X is the drive letter of your SD card. The other flags are there to ensure that your files are revealed no matter what. If this fails, then the partition actually doesn’t exist anymore. You are going to need better methods.
Method 2. Data Recovery Software
The most foolproof method of regaining your lost data, no matter the cause, is to use a dedicated recovery tool. And while there are many SD card and USB data recovery applications in the market, Disk Drill stands apart with its superior performance.
The software has a generous free plan you can use to recover your important files without even buying the application. The download size is small as well, allowing you to try it out without sinking too much time on it.
- To get started, connect your SD card or USB drive to the PC. For a pen drive or external HDD, it just means plugging into any USB slot. With a microSD card, you will need a card reader. Most laptops and PCs include a card reader built-in these days. Even if your system doesn’t have one, you can always use an external card reader.
- Now, download the installation file from the official site and run it. You can install to the default location directly, customize it with Options first. Hit the Install button when you are done to proceed.
- Once the installation is complete, connect your SD card or USB to the computer and fire up Disk Drill. After a couple of screens setting things up, you get to the main window.
- Here you can see all storage devices your computer can access along with their connection type and size. Choose the one representing your SD card or USB drive and click on the Search for lost data button to start scanning.
- As Disk Drill starts scanning the selected drive, you will notice that it sorts all the files found by their type. This is particularly handy if you are hunting for some specific files. Instead of waiting for the whole scan to complete, you can Review found items and see if your files are already there.
- This takes you to a file explorer view, where you can navigate freely through the discovered files. You can filter by the file type from the left and expand each folder on the right to see what it contains. When you find something you want to keep, select it and click on the Recover option.
- You will be prompted to select a location to save the recovered file to. Make sure you do not store it on the very SD card or USB stick you are recovering from in the first place; doing so might overwrite some of your still unrecovered data.
How can you repair a corrupted partition?
An inaccessible partition does not always mean that it has been deleted. It could be that the data has been corrupted, or the partition has become RAW. In this case, you might still be able to repair the partition.
Repairing a partition with file system errors is not easy. Many times it can be impossible for a tool to tell where one file ends and the other begins.
It is recommended to use a data recovery application directly – if there is anything to recover, a dedicated tool is your best chance of getting it back. By messing around with other methods you might accidentally overwrite the partition and make things more difficult.
That being said, sometimes these alternatives can get the job done too. If the issue is minor, you might not even need a data recovery tool at all.
Solution 1. Error Checking Tool
The error checking tool should be your first stop to check for file-system errors. A built-in feature of the Windows OS, it can find and fix basic issues. Do keep in mind though that it will probably not be able to fix everything.
The tool is meant to diagnose the simplest corruption problems, not fix entire partitions affected by it. But no harm in trying it out first.
- To use it, right-click on the drive with the missing partition. It can represent an SD card, a USB stick, or even a hard disk. In the menu that pops up, click on Properties.
- To check the disk for errors, select the Tools tab. Options for error checking and disk defragmentation show up under this tab.
- Simply click on the Check button to get started. Windows will scan the disk and all its partitions to root out any file system errors. If the problem is basic enough, it might even fix it.
Solution 2. CHKDSK
After the attrib command, the chkdsk command is considered to be the best solution to storage issues by many. While there is no disputing the utility of this command-line tool, it isn’t that powerful.
The Check Disk utility is a function accessible from the command prompt to repair data corruption on a disk. It can be used on both the hard drive and removable media like USB sticks or SD cards.
The command scans the disk indicated, and depending on which optional parameters are specified, locates bad sectors and attempts to repair them. To use it, open the command prompt as an administrator.
How to use chkdsk
Using chkdsk is simple enough. Enter the command, specify the drive you wish to scan, and type in some additional parameters. /F is for fixing the drive. /R tells the utility to try to recover data from the corrupted sectors. /X forces the drive to dismount before initiating the scan, which can be necessary when a virus is keeping the drive open.
Confused? Here is the command for performing a basic repair on the C drive:
chkdsk C: /F
And here is the command for repairing, recovering, and dismounting the drive at once:
chkdsk C: /F /R /X
Losing entire partitions’ worth of data is one of the worst ways to lose your files, topped only by the entire disk going dead. Fortunately, it isn’t that hard getting that data back.
While you can try out a bunch of different methods like the chkdsk or the attrib command, the best method is to leave the heavy lifting to a data recovery tool. With the right software, you can recover your data intact no matter what the cause of losing the partition.