How do you reset a USB flash drive back to factory settings?

Page 1 of 4 123 ... LastLast

  1. Posts : 985
    Windows 10 Home 21H1
       #1

    How do you reset a USB flash drive back to factory settings?


    Hi All,
    Ive a couple of USB flash drives that I'd like to wipe clean and factory set them back to the way they were when I bought them. What is the correct way to do it with Diskpart? I know you can format the drive but I want to set everything up..partitions etc back to the way they were.
    I have some instructions I use when using Diskpart to create a bootable USB flash drive to install Windows 10. Are they the same for factory resetting a USB flash drive?
    diskpart
    list disk
    select disk #
    clean
    create partition primary
    format fs=fat32 quick
    active
    exit

    There is another command-Assign that I know can be added after Active. How exactly does that work? I want my flash drives to dynamically assign drive letters each time they're inserted-I don't want a fixed drive letter. Will the assign command set the drive letter as dynamic? Or does Assign set the drive letter to the next available letter and Fix it on whatever drive letter that is? In my case C: is system drive and D: is DVDRW drive. I want it to be dynamically using E: but not fixed on it ..if you understand what I mean
    Ive looked under detail volume for the flash drives and there's a No Default Drive Letter option but I'm not sure really what that means. Obviously it looks like it has Yes/No choice. Can anybody enlighten me a bit on what that means?
      My Computer


  2. Posts : 4,523
    Windows 11 Pro 64-bit
       #2

    You can use Disk Management console to manage all attached storage drives. You can delete, create and format a partition from Disk Management console. Open the Disk Management console by typing Diskmgmt.msc into Start Menu.
      My Computer


  3. Posts : 5,478
    2004
       #3

    sportsfan148 said:
    Hi All,
    Ive a couple of USB flash drives that I'd like to wipe clean and factory set them back to the way they were when I bought them. What is the correct way to do it with Diskpart? I know you can format the drive but I want to set everything up..partitions etc back to the way they were.
    I have some instructions I use when using Diskpart to create a bootable USB flash drive to install Windows 10. Are they the same for factory resetting a USB flash drive?
    diskpart
    list disk
    select disk #
    clean
    create partition primary
    format fs=fat32 quick
    active
    exit
    Usually they are mbr partition table (not gpt), FAT32 and usually not marked active (active means a legacy BIOS based PC will boot it).

    I'd make sure they are mbr not gpt, drop the "quick" so as to write zeros over the disk and not mark them active. Like this:

    diskpart
    list disk
    select disk #
    clean
    convert mbr
    create partition primary
    format fs=fat32 quick
    active
    exit

    sportsfan148 said:
    There is another command-Assign that I know can be added after Active. How exactly does that work
    It assigns the next free letter to the Windows PC you are running it on. So if you plug in a USB key and it assigns it letter J in File Explorer it will (try to) reserve this letter for that USB so next time you plug it in it gets the same letter. It doesn't write anything to the USB only in HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices on the PC concerned.
      My Computer


  4. Posts : 985
    Windows 10 Home 21H1
    Thread Starter
       #4

    As far as I'm aware the Disk Management Console doesn't contain the equivalent of the Clean command in Diskpart. I don't think Delete Volume fully does that. I have GPT formatting on one of the drives and need that back to MBR so that's why I'm asking about using Diskpart for the whole procedure
      My Computer


  5. Posts : 4,523
    Windows 11 Pro 64-bit
       #5

    sportsfan148 said:
    As far as I'm aware the Disk Management Console doesn't contain the equivalent of the Clean command in Diskpart. I don't think Delete Volume fully does that. I have GPT formatting on one of the drives and need that back to MBR so that's why I'm asking about using Diskpart for the whole procedure
    If we are talking about USB flash drive far as i know USB flash drive cannot be converted as a GPT disk partition format.

    Disk Management console can delete partition same way if you were to execute Clean command but Clean All command will delete all partitions and writes zero to entire drive but it takes too much time.
      My Computer


  6. Posts : 5,478
    2004
       #6

    FreeBooter said:
    If we are talking about USB flash drive far as i know USB flash drive cannot be converted as a GPT disk partition format.
    Sure they can.

    sportsfan148 said:
    As far as I'm aware the Disk Management Console doesn't contain the equivalent of the Clean command in Diskpart. I don't think Delete Volume fully does that. I have GPT formatting on one of the drives and need that back to MBR so that's why I'm asking about using Diskpart for the whole procedure
    "Clean" destroys the partition table. There is also "Clean all" which zeros the disk. If you are formatting after without "quick" option it doesn't matter but...

    GPT has a second (backup) partition table at the end of the disk and I'm not sure if clean deletes that. If you just "clean", "convert mbr" and then format with "quick" the first partition table will be will be overwritten certainly. If you omitted the "quick" the second backup partition table would also be overwritten and could not be retrieved. If you did a "quick" format as mbr knows nothing about the second backup gpt structure it could in theory be retrieved.

    You can't use disk management to do this - you must use diskpart (or third party tool but there is no point really).
      My Computer


  7. Posts : 24,502
    10 Home x64 (21H2) (10 Pro on 2nd pc)
       #7

    sportsfan148 said:
    ...factory set them back to the way they were when I bought them....
    Exactly the way they were when you bought them may not be possible. Many USB flash drives came formatted without using a boot record of any sort. The only way I know to 'factory reset' to original manufacturer's condition is to restore an image I took before I first used them.

    Your Diskpart commands will make the USB look clean and empty, but it will have created an MBR for the partition. This is not strictly 'as bought', but close enough for most purposes - in fact, in some ways it's better. A USB without a MBR cannot be managed in Disk Management, it needs a partition table to manipulate.
      My Computers


  8. Posts : 985
    Windows 10 Home 21H1
    Thread Starter
       #8

    lx07 said:
    It assigns the next free letter to the Windows PC you are running it on. So if you plug in a USB key and it assigns it letter J in File Explorer it will (try to) reserve this letter for that USB so next time you plug it in it gets the same letter. It doesn't write anything to the USB only in HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices on the PC concerned.
    Just to clarify for me...Would the letter J example you use be a Dynamically assigned letter (not fixed) ? By that I mean if one day I have another USB plugged in that is using letter J and then I inserted the drive that had been given the letter J by the Assign command...would it then dynamically assign it with the letter K (and not treat the assigned letter J as if it was a fixed letter)

    Have you any idea about what exactly "No Default Drive Letter" means exactly when you select detail volume?
      My Computer


  9. Posts : 985
    Windows 10 Home 21H1
    Thread Starter
       #9

    FreeBooter said:
    If we are talking about USB flash drive far as i know USB flash drive cannot be converted as a GPT disk partition format.

    Disk Management console can delete partition same way if you were to execute Clean command but Clean All command will delete all partitions and writes zero to entire drive but it takes too much time.
    Rufus conveted it to GPT format for my UEFI laptop
      My Computer


  10. Posts : 985
    Windows 10 Home 21H1
    Thread Starter
       #10

    lx07 said:
    Sure they can.

    "Clean" destroys the partition table. There is also "Clean all" which zeros the disk. If you are formatting after without "quick" option it doesn't matter but...

    GPT has a second (backup) partition table at the end of the disk and I'm not sure if clean deletes that. If you just "clean", "convert mbr" and then format with "quick" the first partition table will be will be overwritten certainly. If you omitted the "quick" the second backup partition table would also be overwritten and could not be retrieved. If you did a "quick" format as mbr knows nothing about the second backup gpt structure it could in theory be retrieved.

    You can't use disk management to do this - you must use diskpart (or third party tool but there is no point really).
    Thanks for that mate. I'm just trying to ensure I get rid of all the GPT partitioning completely. I thought that there wasn't a way of cleaning a disk in Disk Management but I wasn't sure.

    Can you clarify for me what exactly the Assign command does. I only want a dynamically assigned drive letter for my USB flash drive. I don't want the letter to be a fixed drive letter which might cause issues in the future if other flash drives are plugged in at the same time
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 08:11.
Find Us




Windows 10 Forums