Reviving unmountable & unformattable usb drive

I have a USB drive, which was a bootable Windows drive, which I seldom used. Recently I tried to format it, and it went corrupted (I hope). I'd like to find out if it's broken or not.

I'd tried to format it on the company comptuer, and I believe Symantec had blocked the autorun (been a while, details are not clear).

I've been trying solutions from different posts, with no luck, so I'd like to share the results:

  • Info:
Volume type : Physical Device
BSD device node : disk2
Connection : USB
Device tree path : IODeviceTree:/PCI0@0/XHC1@14
Writable : No
Is case-sensitive : No
Volume capacity : 31 104 958 464
Available space (Purgeable + Free) : 0
Purgeable space : 0
Free space : 0
Used space : 31 104 958 464
Owners enabled : No
Is encrypted : No
Can be verified : No
Can be repaired : No
Bootable : No
Journaled : No
Disk number : 2
Media name : SanDisk Ultra Fit Media
Media type : Generic
Ejectable : Yes
Solid state : No
S.M.A.R.T. status : Not Supported
  • Disk Utility recognizes the disk. Though it's not mountable. The disk you attached was not readable by this computer.

  • Showing all devices and formatting the disk has it mount/unmount a couple of times and the process ultimately fails. Sometimes it keeps connecting & disconnecting; prompting the aforementioned error, repeatedly.

  • First Aid doesn't help.

Volume is already unmounted.
Performing fsck_exfat -y -x /dev/rdisk2s1
Checking volume.
Checking main boot region.
Main boot region is invalid. Trying alternate boot region.
Checking alternate boot region.
Alternate boot region is invalid.
The volume  could not be verified completely.
File system check exit code is 1.
Restoring the original state found as unmounted.
File system verify or repair failed. : (-69845)
  • Here's the output of diskutil
diskutil list
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *31.1 GB    disk2
   1:               Windows_NTFS ⁨⁩                        31.1 GB    disk2s1
  • Trying to format it as exfat
Unmounting disk
Erasing
Unable to write to the last block of the device. : (-69760)
  • Trying to format it as FAT
Unmounting disk
Couldn’t modify partition map. : (-69874)
  • Output of fdisk:
.sudo fdisk /dev/disk2
Disk: /dev/disk2    geometry: 3781/255/63 [60751872 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
*1: 07    0   0   3 - 1023 254  63 [         2 -   60751870] HPFS/QNX/AUX
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused

.sudo gpt recover /dev/disk2
gpt recover: /dev/disk2: error: device contains a MBR


.sudo gpt -r -vv show /dev/disk2
gpt show: /dev/disk2: mediasize=31104958464; sectorsize=512; blocks=60751872
gpt show: /dev/disk2: MBR at sector 0
     start      size  index  contents
         0         1         MBR
         1         1         
         2  60751870      1  MBR part 7


.sudo dd if=/dev/zero of=/dev/disk2 count=40
dd: /dev/disk2: Device not configured
9+0 records in
8+0 records out
4096 bytes transferred in 0.146817 secs (27899 bytes/sec)
mutlu@Mutlus-MacBook-Pro ~ % 


.sudo gpt create /dev/disk2
gpt create: /dev/disk2: error: no room for the PMBR


.sudo gpt add -b 40 -i 1 -s 614400 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B /dev/disk2
gpt add: /dev/disk2: error: no primary GPT header; run create or recover


.sudo gpt create /dev/disk2
gpt create: /dev/disk2: error: no room for the PMBR

I'm quite inexperienced wiht the command line so I am at lost. I have a sense that I could nuke the partition table, and rebuild it somehow, but not sure how to get there. Perhaps it's broken, who knows... Any help would be greatly appreciated.

Thanks in advance!


It seems like the partition may have been deleted.

Try the -f option.

sudo gpt create -f /dev/disk2

By default, one cannot create a GPT when the device contains a MBR, however this can be overridden with the -f option. If the -f option is specified, an existing MBR is destroyed and any par- titions described by the MBR are lost. - [GTP Man Page] https://www.manpagez.com/man/8/gpt/

This post may help you: How to fix broken GPT, GUID and unmountable, no type volumes?