16 GB USB flash drive capacity down to 938 MB

66

44

After writing the FreeNAS IMG to a 16 GB USB flash drive, I can now only use 938 MB. I used the Win32 Disk Imager tool to write the IMG to the device. Then later, when I inserted the the USB drive into my Windows 7 computer it said that it had to be formatted, because it couldn't read it. I believe this is normal. So I formatted it inside Windows using the format option when prompted. So in Windows Explorer now, 938 MB is reported as capacity of this device.

a

Also, when i check the properties dialog box I can see the same numbers.

b

And when I check with diskmgmt.msc I can see there are several volumes I don't recognize and unallocated space of 12.79 GB.

c

Now, I have another 2 GB USB flash drive with the same problem. It too was used for FreeNAS, and it too has a reported capacity of only 938 MB. I thought it was broken there for a while, until I saw the same problem with this 16 GB model.

I tried using diskpart on the 2 GB model, and I saw that there were several partitions there (list partitions) just like on this one. So I used the clean option to try to wipe it, but that wiped off everything so it's totally useless now. I'm not sure how to rebuild it.

Is this a standard routine, like part of the whole "user experience", that whenever you make a bootable USB falsh drive with FreeNAS, it messes up your device? I am new to FreeNAS, so i wouldn't know. But it sure looks like it. Maybe it is in fact the format operation in Windows that messes things up... I don't know. It's not very nice.

How do I restore the capacity back to 16 GB-ish (14.9 GiB)?

Samir

Posted 2014-05-13T10:50:40.917

Reputation: 17 919

From @Zviadi Mghebrishvili: I had this problem and just solved it via this video: https://www.youtube.com/watch?v=_TRWUJ1oZHc

– fixer1234 – 2015-03-21T10:00:48.330

I think diskpart might be part of the solution, but I'm not sure how to use it. I don't want to make the same mistake with this 16 GB USB flash drive as with the 2 GB model. – Samir – 2014-05-13T10:54:38.680

Windoes does not really support partitions on removable flash drives. Your best bet would be to delete every partition in order to recovery lost space. You also can't extend any of the data partitions because of the location of the unallocate space and can't create another partition because you already have four paritions the max under a case like this. – Ramhound – 2014-05-13T10:54:55.667

Answers

118

I managed to do it with diskpart. What I was missing is the command to create a new partition. So here is a run-down of all the commands I used, step by step.

Beware that when typing select disk 1 (step 4), your disk number may be different. Selecting the incorrect disk might erase your whole computer's main disk drive, losing all your data on it.

I assume you know how to get to the Run prompt since you have arrived at SU. But if not, just press and hold down the Windows key on your keyboard. While still holding the Windows key, press the R key. Voilà! La Run prompt! L'invite de commande!

  1. cmd
  2. diskpart
  3. list disk
  4. select disk 1 (Careful! Choose the correct number here. See note above.)
  5. list partition (Inspect the results to double-check this is the right disk)
  6. clean
  7. list partition (There should be none)
  8. create partition primary
  9. list partition (There should be one)
  10. format fs=fat32 quick
  11. list partition (There should still be one)
  12. exit

In case you haven't realised it yet, you have to press the Enter key on your keyboard after each command line above.

Here it is now:

a

Shows up as a 14.6 GB drive.

b

And it looks good in diskmgmt.msc too. So it's all good now.

Samir

Posted 2014-05-13T10:50:40.917

Reputation: 17 919

2I always had to resort to a Mac, or another Linux computer, but this really helped me out. Thanks! – Pred – 2015-06-29T15:35:12.710

2I'm glad it helped. But you know, technically... a Mac is not a Linux computer! ;-) – Samir – 2015-06-29T17:13:36.543

3Proceed with caution! Don't select the incorrect disk. Double check the capacities in list disk before you select. – Ryan R – 2015-10-19T03:52:16.900

This worked for me. Thanks! You're a life saver! – James – 2016-02-18T19:14:33.033

2This work for me too. But need to caution while selecting the disk. – Bikram Shrestha – 2016-05-30T03:08:23.800

Amazing tool! This should be the standard formatting process instead of Windows Explorer right-click "Format" option, which is pretty useless – Emilio – 2019-02-02T15:08:53.837

14If you try to use these commands on your own computer, make sure to select the correct number for "select disk 1". Yours might be at a different number, and not 1, so you don't end up deleting wrong partitions. – Samir – 2014-05-13T11:32:26.790

4

When you write an image to a flashdrive, it will create the partition based on the specifications on the image. In your case it creates a partition of 938 MB.

Because flashdrives will only show the first partition, you cannot access the rest. However, using computer management->Disk management, you normally can increase the partition and include the unallocated space. Seeing your image, it may not be possible with this particular image unless you somehow made an error when trying to flash the image.

Try to remove all but the F: Partition, then right click it, and use enlarge.

It is possible the image won't work anymore, but you can always delete all partitions and flash the image again.

LPChip

Posted 2014-05-13T10:50:40.917

Reputation: 42 190

You can mount more than one partition--it's just not always mounted by default, and you have to go into disk management. Also, LPChip, please edit your answer rather than just correcting mistakes in the comments. – trlkly – 2014-10-02T09:24:58.667

@trlkly edited the post, but as for mounting the other partitions, I tried doing that in the past and was unsuccessful. Can you perhaps post an answer of your own showing how to do that, with images and all? – LPChip – 2014-10-02T09:36:44.430

Well, I've done it before, but it must have been special to the particular disk. All the information I find seems to indicate you have to actually flip a bit in the drive's firmware to make this possible. (It has to appear to Windows as a non-removable drive or hard drive.) – trlkly – 2014-10-02T12:40:35.713

Its important to point out this limitation of only reading the first partition is mainly on Windows. – Ramhound – 2014-05-13T11:23:40.910

I don't need it to boot, don't need it anymore. I just wanted my USB flash drive back and working again, with all of its bits and bytes, under Windows. – Samir – 2014-05-13T11:26:41.453

1"flashdrives can only have 1 partition"[citation needed]. I haven't tried, but every flash drive I've seen has come as a MBR-partitioned device so there should be no reason why it can't have multiple partitions. Maybe this is an artificial limitation in Microsoft Windows? – a CVn – 2014-05-13T11:36:53.767

@MichaelKjörling My bad. I mean only the first partition will be visible in windows. – LPChip – 2014-05-13T14:51:33.827

1

It seems you have accidentally deleted a major partition on your removable disk. Create a partition in order to utilize the full capacity.

You will not be able to create a partition in Windows, so use a third-party software like EaseUS Partition Master Home. This version is free. For help with this, you can check out my blog.

A. Prasad

Posted 2014-05-13T10:50:40.917

Reputation: 719

1what a stupid thing! it asks you to pay in order to perform operation. SPAAAM! – Madrugada – 2016-11-01T17:15:09.273

It asks you to buy this product once you want to apply your changes. – Pieter De Bie – 2018-03-09T06:36:30.153

Thanks! It's always good to have several options available in the tool set. But in this case, diskpart did the trick. I did encounter some minor error when I created the partition, but I think that was because I aborted the format command once, because it was not flagged to perform a quick format, and I didn't want to wait very long. So the next time I tried to format it reported something about uncompleted... something. So I rebooted into command prompt mode (safe mode) in Windows 8 and to my surprise diskpart was available there too. So that's all good, all nice. – Samir – 2014-05-13T11:30:21.867

good.I have faced this problem and solved by using ease us partition master. – A. Prasad – 2014-05-13T11:32:14.203

I personally use Acronis Disk Director 11 for my partitioning needs in Windows. Because the diskmgmt.msc pretty much sucks. I'm not familiar with Ease US Partition Master. I will have a look at it. They even have a payed Pro version, so that's nice. Since I have had problems with and complaining to Acronis about their very outdated Disk Director 11 and they have yet to update it, I might switch to that one. It reminds me of early versions of Disk Director. It's sad that not even Windows 8 has a proper partitioning tool. – Samir – 2014-05-13T11:38:25.410

You can try this till now i don't have any problem with free version. i think no need to purchase if you are using for home PC/Laptop. – A. Prasad – 2014-05-13T11:41:37.393