Restore bootable USB flash drive to normal

6,154

I found a similar post on Stack Overflow where someone had the same problem and just ran this diskutil command from the command line:

diskutil zeroDisk /dev/disk2

Such a simple fix, so hard to find.

Share:
6,154

Related videos on Youtube

Tyler
Author by

Tyler

Software/Web Developer primarily using Wordpress, PHP, MySQL, Python, HTML

Updated on September 18, 2022

Comments

  • Tyler
    Tyler over 1 year

    I’m trying to create a persistent installation of Parrot OS on my 16GB USB flash drive. I made the mistake of making the USB flash drive bootable without partitioning the drive into 2 in the beginning. Now I am unable to revert the USB flash drive back to normal.

    I am using macOS. When I open Disk Utility the USB flash drive is only recognized as 701KB and I am unable to erase it using the diskutil in the command line since it gives the error:

    The chosen size is not valid for the chosen file system.

    Any help is greatly appreciated, thank you.

  • Christopher Hostage
    Christopher Hostage over 5 years
    In general, formatting a disk would get you what you wanted. The built-in Mac Disk Utility GUI is sometimes useful for it, but the usefulness of the Disk Utility has lessened in the last five years. (i.e. not showing all plugged in devices)
  • jjrr
    jjrr almost 5 years
    be aware that you might get and error (like in my case), such as "Error with zero disk erase: Couldn't open disk (-69879)"
  • user702846
    user702846 over 3 years
    @jjrr what did you do then ?
  • jjrr
    jjrr over 3 years
    (sorry, I don't remember anymore exactly :/ -- maybe this stackoverflow.com/a/53052852/5533078 )