5

I can not partition nor use a removable USB disk without file system. I obtained the following informations:

sh-3.2# diskutil info disk2
   Device Identifier:        disk2
   Device Node:              /dev/disk2
   Whole:                    Yes
   Part of Whole:            disk2
   Device / Media Name:      IC1100        CF

   Volume Name:              Not applicable (no file system)

   Mounted:                  Not applicable (no file system)

   File System:              None

   Content (IOContent):      None
   OS Can Be Installed:      No
   Media Type:               Generic
   Protocol:                 USB
   SMART Status:             Not Supported

   Total Size:               8.0 GB (7994327040 Bytes) (exactly 15613920 512-Byte-Units)
   Volume Free Space:        Not applicable (no file system)
   Device Block Size:        512 Bytes

   Read-Only Media:          No
   Read-Only Volume:         Not applicable (no file system)

   Device Location:          External
   Removable Media:          Yes
   Media Removal:            Software-Activated

   Virtual:                  No
   OS 9 Drivers:             No
   Low Level Format:         Not supported

After following this guide, I am now able to see the disk in Disk Utility, but it is uninitialized, and when I try to format it, I get the error Couldn't open device

EDIT: I tried the following:

  • Disk Utility > Erase
  • Terminal > diskutil eraseDisk MS-DOS NAME disk2
  • Terminal > diskutil eraseVolume MS-DOS NAME disk2
  • Terminal > diskutil partitionDisk disk2 1 MBR MS-DOS NAME 7.8GB

They ALL lead to the same error: Error: -69877: Couldn't open device

EDIT 2: This is the partition table:

    sh-3.2# fdisk -e /dev/disk2
    fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
    The signature for this MBR is invalid.
    Would you like to initialize the partition table? [y] y
    Enter 'help' for information
    fdisk:*1> p
    Disk: /dev/disk2    geometry: 971/255/63 [15613920 sectors]
    Offset: 0   Signature: 0xAA55
             Starting       Ending
     #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    ------------------------------------------------------------------------
     1: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
     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
 

EDIT 3: If I type fdisk /dev/disk2 , this is shown:

sh-3.2# fdisk /dev/disk2    
Disk: /dev/disk2    geometry: 971/255/63 [15613920 sectors]
Signature: 0xD913
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: D5  843 125  41 -  856  48  15 [3289417632 - 1579849264] <Unknown ID>
 2: B0  380 233  63 -  580 252  34 [1433382022 - 2359874114] <Unknown ID>
 3: 21  542 173  50 -  368 171  22 [ 805962412 - 2236752874] <Unknown ID>
 4: C1  311 233  33 -  417  95   7 [3864719105 - 4292535645] DRDOSs FAT12

How can I solve? Thanks (I'm using Mac OS X 10.11.3)

12
  • How (which application, which commands) are you actually trying to format the disk?
    – nohillside
    Jan 24, 2016 at 12:50
  • Question updated with the commands I tried.
    – Ford1892
    Jan 24, 2016 at 13:23
  • You could try erasing the first few sectors of the device: sudo dd if=/dev/zero of=/dev/rdisk2 bs=1m count=16 (you might have to disconnect and reconnect the device after that).
    – Siguza
    Jan 24, 2016 at 13:45
  • I got this reply: 16+0 records in 16+0 records out 16777216 bytes transferred in 18.323810 secs (915596 bytes/sec) But nothing changes, then I always get the same errore.
    – Ford1892
    Jan 24, 2016 at 13:52
  • Does sudo gpt show -l /dev/disk2 yield anything?
    – Siguza
    Jan 24, 2016 at 14:28

5 Answers 5

3

Restore a DMG (maybe an OSX InstallESD.dmg or any other application) to the disk/drive via Disk Util. This will overwrite it (deleting all data). Then you can partition again how you like.

I have encountered this several times myself with USB pen drives as well as SSDs inside a MacBook Air. Formatting and Erasing brought up the exact same errors you describe. DD didn't work out, Resizing the partition gave me an error about corruption on the disk. First Aid/Scanning & Repairing the volume didn't yield any results, the tool completed with the message that there wasn't anything to repair.

Only the Restoring of a random DMG to the drives made it manageable again.

Hope this helps!

7
  • This sounds like it wouldn't work, but it TOTALLY WORKS. I just used a random 37MB Citrix install dmg which was nice and quick. Restored that onto my rogue usb drive, that succeeds, then just for good measure i ejected it, pulled it, reinserted it, and was now able to erase. This should be the accepted answer!
    – XP84
    Nov 11, 2017 at 1:52
  • 1
    Doesn't work for me, it fails with a Could not change the partition type for /dev/disk2s1 - Permission denied Jan 27, 2018 at 18:37
  • @FilipeCorreia Usually that means you need to use sudo Jan 9, 2019 at 17:23
  • Can someone paste the correct Terminal command to sudo restore from a DMG? That would be sweet thanks May 29, 2022 at 4:12
  • please more description step by step .. or provide the file its totaly helpfully maybe Mar 1 at 6:04
2

Similar problem, so I tried erasing as FAT… (can't remember the exact format) which worked. Then was able to erase again as Mac OS Extended (Journaled).

I suspect my problem was that I had made the disk a boot drive at some point.

3
  • Using exFAT I could erase it, thx for the idea ;)
    – rémy
    Aug 12, 2019 at 7:58
  • Did you do it in Disk Utility or in Terminal? May 29, 2022 at 4:14
  • I don't remember what I did yesterday, much less three years ago. That said, I can't remember ever using Terminal to erase a drive. And doubt I would for fear of erasing the wrong drive, which could happen in Disk Utility too. So almost certainly in Disk Utility.
    – Greg
    May 30, 2022 at 15:14
0

I have iMac mid-2011 running on High Sierra. My Time Machine (My Book Studio) failed after it experienced power outage while backing up the files. This external disk became useless; tried every means mentioned in this site to recover the file but to no avail. Typical errors were "device cannot be opened", "no permission" and disk cannot be opened. Finally I connected the drive to Windows 10 laptop, ran My Book Studio Utility (this app came with My Book Studio), and was able to format the entire disk to NTFS. I reconnected this drive to a laptop running High Sierra, and using Disk Utility was able to reformat it to Mac OS Extended (Journaled). At least I was able to revive the external drive. Hope this helps.

0

For me the solution was to choose Show All Devices in the View menu:

enter image description here

Then I could select the device and successfully erase it:

enter image description here

-1

Worked for me too. I had a volume inside a container inside a disk. I was able to erase the volume but not the other two. They all passed First Aid with only the Overallocation remark. The DMG failed at first because I was trying to restore the disk. I then changed to the Container and that solved the problem. Thank you!

You must log in to answer this question.

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