<

How to restore factory Hard Drive / Flash drive Capacity

Published on
15,927 Points
9,527 Views
4 Endorsements
Last Modified:
Approved
Problem description : Some external hard disks / USB flash drives do not show actual space as mentioned in the factory settings.

This is a common problem when you use an 8 GB USB drive to make it bootable to install a firmware/ driver on a server, which is a DOS flavored utility. After this, connect the flash drive to a laptop and it shows less than 2 GB. The reason for this is when making the flash disk to run a DOS program, it will format the flash disk with FAT file system. To correct this we need command line mode.

In Disk Management we can see the remaining space is available as unallocated. To partition it and make use of it, run the following from the command prompt:

Before executing the disk part command, make sure that the data from the flash drive is backed up as the command wipes data from the flash drive - or any other drive you select.

Run command prompt as administrator
Type "diskpart"

Type "list disk" it will show the following output (as example)
Disk ###  Status      Size     Free     Dyn  Gpt
--------  ----------  -------  -------  ---  ---
Disk 0    Online      2040 GB     0 B
Disk 1    Online       683 GB      0 B

Open in new window


To select Disk 0:
Type "select disk 0" (or whatever number that corresponds to your flash drive or disk), and proceed at your own risk, in particular if you have other external hard disks or USB flash drives connected to your computer.

This will shows the output as "Disk 0 is now the selected disk."

In the prompt type "clean" if you are satisfied that you have selected the right disk.
Now the entire disk shows as unallocated. You can create new partition using disk management or by using the following commands
create partition primary
select partition 1
active
format fs=fat32
assign
exit

Open in new window

After creating the primary partition and making it active, you can format the USB drive with NTFS file system from the windows explorer as well. Now it will show the entire space.
4
Comment
Author:SHB
3 Comments
 

Expert Comment

by:USTRLLC
Very good tweak..
0
 
LVL 47

Expert Comment

by:David
This does not restore "factory" capacity.  All it does is clear a few dozen bytes in block zero which holds partition tables for a few operating systems.  

Software can actually reprogram the block counts in SSDs, USB flash drives, SATA and SAS disks to make the drive report any capacity (less than the true physical capacity).  If I were to send the command to a device to instruct it to report that total capacity was 57KB, then you could run this all day long, and even do a full format on windows, DOS, LINUX, and all you will ever see is 57KB.

Granted people like me write such code for appliance manufacturers, and antivirus people and entities that care about security and hacking, but it does not change the fact that your technique won't work if I short stroke a device, nor will it even be able to detect that this has happened.
0
 

Expert Comment

by:Chitheeswaran Natarajan
Hi Shani Basha,

I've tried the commands above, but it was not successful for me and it was producing the same result as I do it with Device Manager.

At the end of "format fs=fat32" I've got the below message,
"100 percent completed"
Virtual Disk Service error:
The volume size is too big."

So I tried the same command with NTFS and it was success.

I even tried multiple tools like "HDD restore capacity" (Works for HDD connected in SATA cable), since I've WD external hard disk connected by USB.

Now I don't have any clue how to restore my lost space.

Details about my device:
OS: Windows 7 64 bit
Model: WD Elements external hard disk connected by USB
Claimed size : 2 TB (1.86 TB)
Size as per Windows: 37.26 GB
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Join & Write a Comment

This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month