SOLVED: "You Need to Format the Disk Before You Can Use It" after improper USB unplugging.

Sometimes the following error appears after you have accidentally unplugged your External USB drive without using the Safely Remove option: “You need to format the disk in drive X before you can use it. Do you want to format it?”. As a result of that you cannot access your data using Windows or another OS. The above error happens because when you accidentally – force – unplug (disconnect) your external USB drive (USB HDD, USB drives, etc.) without using the Safely Remove Option (“Safe Remove Hardware”) option, then the USB drive Partition Table becomes corrupted.

Format the Disk before you can use it

To avoid losing your data or corrupting the storage drive's partition table, always make sure that you have closed any open files and terminate any actions regarding your USB drive (including Windows Explorer), and always use the Safely Remove option before unplugging your drive. In the case that you still receive a warning message when Ejecting USB Mass Storage Devices like ‘This device is currently in use. Close any programs or windows that might be using the device, and then try again’, then log off and log on your computer again or restart your computer.

In this tutorial you can find clear instructions on how to restore the corrupted partition table on your hard drive (HDD) after unplugging it improperly. I have used this procedure several times with successful results to resolve the described problem for my customers.

Attention: Keep in mind that you follow this guide at your own risk and you have to be very careful with the steps on it, to avoid losing your data.

In order to solve the USB HDD unrecognized problem I have use the TestDisk utility several times with great results. TestDisk is powerful FREE data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software, certain types of viruses or human error (such as accidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy.

 

How to solve “You need to format this drive” problem & Restore lost HDD partition table using TestDisk.

Step 1. Download Testdisk utility to your computer.

1. Navigate to http://www.cgsecurity.org/wiki/TestDisk and download Testdisk utility.

image

 

2. Click to download the TestDisk version according your OS. (e.g. Windows).

image

3. When download operation is completed, navigate to your download location folder and right-click on “testdisk-7.0-WIP.win.zip” compressed file and select “Extract All” to decompress its contents.

image

.

 

Step 2. Use Testdisk utility to recover hard drive lost partition.

In this step, you can learn how to use TestDisk, to restore the corrupted partition table on your damaged hard drive.

1. First of all, connect the unrecognized hard disk drive (HDD) on your computer.

2. Now explore “testdisk-7.0-WIP.win” folder contents and double-click to run the “testdisk_win.exe” application.

image

2a. Click “Yes” at UAC warning message.

image

 

3. At the TestDisk utility first screen, press “Enter” at the highlighted “Create” option.

image

4. Wait until TestDisk scans your computer for connected disks.

image
5. Using the keyboard arrow keys CAREFULLY select the unrecognized external USB hard drive and press “Enter” to  ‘Proceed’ to disk analysis.

image

6. At the next screen select (using the keyboard arrows keys) the partition table type (e.g. Intel) and press “Enter”.*

* Notice: At this point, TestDisk utility (usually) recognizes the correct partition table type and highlight it automatically. For Windows OS the partition table type is “Intel”.

image

7. At the next screen press “Enter” at the “Analyze” option and let TestDisk utility to analyze your HDD and find the lost partition table structure.

image

8. After disk analysis, TestDisk should display the current partition structure. Press “Enter” again and let TestDisk to “Quick Search” your disk for lost partitions.

image

9. If TestDisk can locate the lost partition(s), during ‘Quick Search’ operation, then you will see a similar screen like below. Press the “P” key letter on keyboard to ensure that the partition found contains your files.

image

 

10. At this point two different things (cases) can happen:

Case 1. If you can see a list of your lost files on your screen like the screenshot below, then press the “q” letter key to return to the previous menu and continue to Step 3.

Important Notice: At this point I suggest to use the "copy" (c to copy) function of Testdisk utility, to recover the founded files to another media before applying the instructions on Step-3.

image

 

 

Case 2. If the TestDisk cannot open (recognize) the filesystem or the filesystem is damaged, then you have to perform a deeper search using TestDisk utility to find lost partitions. To do that:

a. Press “q” to quit this section and return to the previous one.

image

b. At the previous section's screen, press “Enter”.

image

c. Press “Enter” one more time to perform a “Deeper Search”.

image

d. Now be patient until TestDisk analyzes your disk. (This operation may take some time).

image

e. When the Deeper Search operation is completed, press “P” again to see if your files are listed. If you files are listed, then press “q” letter key to return to the previous screen and then continue to the next step.

Important Notice: At this point I suggest to use the "copy" (c to copy) function of Testdisk utility, to recover the founded files to another media before applying the instructions on Step-3.

image

 

Step 3: Write Partition Structure back to disk.

1. After successful recognition (listing) of your files as described above, press “q” to proceed to restore the partition table on your disk.*

ONCE AGAIN: DO NOT PROCEED TO OVERWRITE THE FOUND PARTITION TABLE IF YOUR FILES ARE NOT LISTED ON YOUR SCREEN. At this case use one of the recovery programs mentioned on this article to find out if you can recover your files, or visit a data recovery professional service.

image

2. At the screen below, by using your keyboard arrows, highlight the “Write” option and then press “Enter” to write the found partition structure to the hard disk’s MBR (Master Boot Record). (Press “y” when asked to confirm your decision)..

image

 

3. After that, press “Q” several times in order to quit TestDisk utility and then restart your computer for the changes take effect.

IMPORTANT: If during Startup, Windows wants to check the problematic hard disk for errors DO NOT INTERRUPT the check disk operation.

If you follow the above procedure correctly and with a little luck you should see again your hard disk contents back to life! Smile

Suggestion: Before using the disk, follow the instructions given in this article to test and diagnose your disk for hardware problems.

That's it! Let me know if this guide has helped you by leaving your comment about your experience. Please like and share this guide to help others.

 

If this article was useful for you, please consider supporting us by making a donation. Even $1 can a make a huge difference for us in our effort to continue to help others while keeping this site free: