Skip to content

Instantly share code, notes, and snippets.

@krisbolton
Last active May 8, 2024 19:42
Show Gist options
  • Save krisbolton/fc34ee629721d979f9f4275cba8dcfe5 to your computer and use it in GitHub Desktop.
Save krisbolton/fc34ee629721d979f9f4275cba8dcfe5 to your computer and use it in GitHub Desktop.
How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows

How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows:

  1. Hold the Windows key and press X, select PowerShell (Admin), select Yes to the pop-up. You can also use Command Prompt.
  2. In the Powershell interface type diskpart to enter the disk partition tool.
  3. Type list disk to see all disks listed.
  4. Select the USB drive by typing select disk [NUMBER]. Be careful to select the correct drive.
  5. Type clean. An error will occur if you have the drive folder open, close the window and repeat the command if this happens.
  6. Type create partition primary.
  7. Type format fs=ntfs quick to format the drive (you can also choose to set fs=fat32).
  8. Type active.
  9. Type assign.
  10. Type list disk and confirm your drive looks healthy.
  11. Type exit to exit.

You can get visual confirmation by typing ‘disk manager’ into the windows search bar in the bottom left. Select the USB to view.

@bencote2020
Copy link

Thank you for the "easy-as-cake"...LoL fix Kris

@woodchat-Main
Copy link

You are the GOAT!

@tanzilamd
Copy link

Thanks

@econtigliani
Copy link

👍🏻

@Aadarsh369
Copy link

I can't believe I could do that. It's just amazing the idea of a hidden partition on the same drive. Thanks for helping.🦁

@MohammadMousvi
Copy link

thank you

@gudnimg
Copy link

gudnimg commented Oct 18, 2023

Nice, thank you for this I thought the USB stick was dead but this worked ❤️

@BlackRaven37
Copy link

Thanks.
It helped a lot.

@khlef17
Copy link

khlef17 commented Nov 15, 2023

after typing format fs=ntfs, please it came back 0 percent

@khlef17
Copy link

khlef17 commented Nov 15, 2023

please help me, whenever i plug in the usb, it displays a message that i should format the disk and when i try to format it says the disk is write protected. I can not even open the disk

@ShahzaibAnwar
Copy link

very helpful you fixed my issue :)

@riyas777
Copy link

thank you very much .........fix the error very easily

@himloul
Copy link

himloul commented Dec 25, 2023

Thank you 👍

@4riceotter
Copy link

please help me, whenever i plug in the usb, it displays a message that i should format the disk and when i try to format it says the disk is write protected. I can not even open the disk

It takes a while, averaging about 1%/min. ;-) on my laptop!

@dafoll
Copy link

dafoll commented Jan 11, 2024

thanks bro! :D

@bozzbala
Copy link

Thank you!

@MrYassinGeek
Copy link

Thank you very much it was very helpful and useful i had fixed my issue with my usb

@fauxir
Copy link

fauxir commented Jan 20, 2024

Fantastic!

@cxzcxz3221
Copy link

ty so much

@SatyaDewangan05
Copy link

thanks buddy

@quasar-011
Copy link

My computer says that :
Windows could not format your disk
after I type clean
Can you tell me the issue?

@krisbolton
Copy link
Author

My computer says that : Windows could not format your disk after I type clean Can you tell me the issue?

Hi @Quasar011 I've not come across this error myself, so I'm not sure. I've found the following links which might help you:

  1. https://answers.microsoft.com/en-us/windows/forum/all/unsolve-windows-unable-to-complete-the-format/dc80d6d6-f741-4f2e-bbbc-a6633caf084b

  2. https://www.reddit.com/r/techsupport/comments/lj866k/windows_cannot_format_this_drive_quit_any_other/

@Elpathoo
Copy link

You did it it helped me a lot! Rufus just crashed my USB and made a mess on my bootable USB, Thanks!!

@swethakolan
Copy link

Thanks a lot! Worked for me 🥳

@Kuyadrei
Copy link

Hi! Is this working with sdcard?

@anunes74
Copy link

anunes74 commented Apr 1, 2024

Many thanks! It saved my day. :)

@TurbineDH
Copy link

Thanks!!! I had a problem installing Linux in an old laptop. This helps a lot!!!

@andoink1
Copy link

Savior! I ran into this issue and couldn't believe I was having so much trouble fixing it, but your steps worked perfectly. I think the 'clean' was the essential step I was missing. Thank you!

@amesbond007
Copy link

Format timing is too long why ?

@apatullo
Copy link

apatullo commented May 8, 2024

Thanks for the steps to smite my misbehaving USB partitions. Much appreciated.

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