5

I have a 32Gb USB flash drive, and I flashed it with a bootable image. So, that process modified the partition table, and the drive now reports a size of 1Gb. Unfortunately, erasing or reformatting the drive doesn't fix it. From what I've read, I need to completely nuke the partition table. Usually, this would be very easy to do on a Linux machine, but I must do it on a Mac right now. The Disk Utility app doesn't seem to have an UI for this. Is there another tool or set of commands I could use?

macOS Big Sur 11.3.1

2
  • Can you add at your question, USB key plugged, the results of terminal command : diskutil list external?
    – user415185
    Commented Jul 29, 2021 at 5:15
  • 3
    Can Disk Utility not do the task even by formatting the Device, rather than the Partition? By default it only shows you the Partition view, Cmd/2 will show the device view.
    – Tetsujin
    Commented Jul 29, 2021 at 6:21

2 Answers 2

7

Since some recent version of macOS (High Sierra? more precision needed here), Disk Utility stopped presenting by default physical devices. Thus users are protected against erasing their disks by error. I would say that MacOS is evolving to hide more and more risky functions to protect users (which is easier than to teach them the truth).

To recover the usual vision of devices and volumes, one has simply to open the left top View menu and select Show All Devices. In fact this Show All Devices will show all physical devices (disks, USB flash drives, SSD…) but not truly all volumes.

From there, you will see that actually your drive wasn't shrunk, but just the unique volume on it was defined to be 1 GB. By fully erasing your physical drive, you will destroy its actual partition and create a new volume of 32 GB.

15

Like this

// find the path to the usb
diskutil list

// delete the partition and reformat
diskutil partitionDisk <YOUR-USB-DEV-PATH> MBR MS-DOS FAT32 100%

example

diskutil partitionDisk /dev/disk2 MBR MS-DOS FAT32 100%

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .