Recover missing space on USB thumb drive

I have an 8GB thumb drive that I used to burn a boot image onto, and then when I was done with it the damn thing showed 49MB and re-formatting did not make it any bigger! So how to get back my original free space?

I figured I was going to have to plug it into my linux box and do some gpart or fdisk stuff, but turns out Windows has some handy tools. First to see what your thumb drive looks like, search for “disk management” or “create and format hard disk partitions” and you’ll find the tool to use.

Choose the thumb drive and you’ll see all your missing space in the “unallocated” box!

Now run the windows command “diskpart” from msdos prompt. Type “list disk” to see the drives. Based on the disk number in the parition tool you will type “select disk N” where N is the disk number from the parition tool list.

Then do the commands “clean”, and “create primary partition”

If you have your partition tool open you will see these commands take effect realtime so you know it is working, and that is it!