Skip to content

Instantly share code, notes, and snippets.

@krisbolton
Last active June 27, 2026 13:53
Show Gist options
  • Select an option

  • Save krisbolton/fc34ee629721d979f9f4275cba8dcfe5 to your computer and use it in GitHub Desktop.

Select an option

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.

@Nabilhossain01859

Copy link
Copy Markdown

thank you brother you saved my 2 pendrive

@ee-maniac

Copy link
Copy Markdown

thank you!

@kareemX

kareemX commented Jul 18, 2024

Copy link
Copy Markdown

when excuting 'active' command it gives me this
The selected disk is not a fixed MBR disk.
The ACTIVE command can only be used on fixed MBR disks

@devlumba

Copy link
Copy Markdown

ty!

@PsychoFox11

PsychoFox11 commented Aug 3, 2024

Copy link
Copy Markdown

Hmm for me it is listed as 2 drives in PS as well. Maybe it is how this thumbdrive is built. 32GB that came with a driver on it with a wifi dongle. Just trying to reclaim it all if even possible.

@mozzammal2

Copy link
Copy Markdown

great!! worked for me

@Injo-18

Injo-18 commented Aug 6, 2024

Copy link
Copy Markdown

Thank. You

@kds7ap

kds7ap commented Aug 8, 2024

Copy link
Copy Markdown

Great... Thank you 👍

@paolo2000h

Copy link
Copy Markdown

thanks!

@arteson-mec

Copy link
Copy Markdown

thanks! this saved me from throwing my pc out the window and trying to burn down google hq!

@SrDmitrov

Copy link
Copy Markdown

Thank you!

@Shariar-Hasan

Copy link
Copy Markdown

thank you

@noah-hw-kim

Copy link
Copy Markdown

Thank you so much!

@Marius385

Copy link
Copy Markdown

Thank you sir!

@damian-cozma

Copy link
Copy Markdown

Very useful!

@jacekrudek

Copy link
Copy Markdown

Great instruction!

@GabinoJeri

Copy link
Copy Markdown

Thanks a bunch, bud. Was wondering why I had difficulties formatting.

@ShubhamShakyawal

Copy link
Copy Markdown

It worked!!. Thank you.

@marchetti-design

Copy link
Copy Markdown

Genius, thank you!

@theguywhocodes96

Copy link
Copy Markdown

Saved the day for me, thank you for the solution.

@HMClever

Copy link
Copy Markdown

Format timing is too long why ?

If u don't use the "quick" line as the post says that happen

@fahshed

fahshed commented Jan 29, 2025

Copy link
Copy Markdown

life saver

@minh1231231

Copy link
Copy Markdown

Thank you very much!

@darblue8

Copy link
Copy Markdown

Thank you so much

@sulfuricpagan

sulfuricpagan commented Jul 30, 2025

Copy link
Copy Markdown

Helped a lot with a super old USB that came split from the box!

@adityak714

Copy link
Copy Markdown

Thanks for this!!

@saurabhkaul

Copy link
Copy Markdown

haha thank you so much

@eprunty

eprunty commented Nov 8, 2025

Copy link
Copy Markdown

Thank you!

@SplitSlime

Copy link
Copy Markdown

Thanks actually worked :)

@MrHappyHermit

Copy link
Copy Markdown

It worked for me, thank million.

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