Sunday, August 27, 2023

Use diskpart CLI to reformat a Linux boot USB flash drive

Useful for reformatting a flash drive after using it as a Linux boot drive. 

In a Windows 10 command prompt, running as administrator:


Microsoft DiskPart version 10.0.19041.964

Copyright (C) Microsoft Corporation.

On computer: YOURPC

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          476 GB  1024 KB        *
  Disk 1    Online          931 GB  1024 KB        *
  Disk 2    Online         7396 MB  4509 MB        *

DISKPART> select disk 2
Disk 2 is now the selected disk.

DiskPart succeeded in cleaning the disk.

DISKPART> create partition primary
DiskPart succeeded in creating the specified partition.

DISKPART> format fs=fat32 quick
  100 percent completed

DiskPart successfully formatted the volume.

Leaving DiskPart...

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.