Skip to content

Instantly share code, notes, and snippets.

@reven
Created December 9, 2017 03:43
Show Gist options
  • Save reven/1b114a6e3a71c665119655ff62068315 to your computer and use it in GitHub Desktop.
Save reven/1b114a6e3a71c665119655ff62068315 to your computer and use it in GitHub Desktop.
Recover a USB drive with hidden partitions in Windows 10
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!
cmd
diskpart
list disk
select disk 1 (Careful! Choose the correct number here. See note above.)
list partition (Inspect the results to double-check this is the right disk)
clean
list partition (There should be none)
create partition primary
list partition (There should be one)
format fs=fat32 quick
list partition (There should still be one)
exit
(From https://superuser.com/questions/752874/16-gb-usb-flash-drive-capacity-down-to-938-mb)
@alexnum
Copy link

alexnum commented Sep 5, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment