High Sierra erase drive fails .... both with disk utility and with terminal

I have tried to erase two different HDDs, (60GB Hitachi, and 120GB Toshiba) to re-purpose them for data exchange with my colleagues. I am running High Sierra 10.13.6 (17G4015) and have tried to use Disk Utility and Terminal.


With Disk Utility I get the following error:


I have then tried to use Terminal command as follows. The Terminal approach gives me two different issues as per the following:


Issue 1: Resource Busy (although the device successfully unmounted …finder was closed, nothing was accessing the drive as best as I can tell - it unmounted)


ZKMACPRO:~ zkmacpro$ sudo diskutil unmountDisk force disk3

Password:

Forced unmount of all volumes on disk3 was successful

ZKMACPRO:~ zkmacpro$ sudo dd if=/dev/zero of=/dev/rdisk3 bs=1024 count=1024

dd: /dev/rdisk3: Resource busy

1+0 records in

0+0 records out

0 bytes transferred in 0.026172 secs (0 bytes/sec)


or


Issue 2: Error: -69760: Unable to write to the last block of the device


ZKMACPRO:~ zkmacpro$ sudo diskutil unmountDisk force /dev/disk3

Password:

Forced unmount of all volumes on disk3 was successful

ZKMACPRO:~ zkmacpro$ sudo diskutil eraseDisk JHFS+ Backup /dev/disk3

Started erase on disk3

Unmounting disk

Creating the partition map

Error: -69760: Unable to write to the last block of the device


-------

Here is the output of diskutil list for reference ......


ZKMACPRO:~ zkmacpro$ diskutil list


/dev/disk0 (internal, physical):


   #:                       TYPE NAME                    SIZE       IDENTIFIER


   0:      GUID_partition_scheme                        *1.0 TB     disk0


   1:                        EFI EFI                     209.7 MB   disk0s1


   2:                 Apple_APFS Container disk1         1000.0 GB  disk0s2




/dev/disk1 (synthesized):


   #:                       TYPE NAME                    SIZE       IDENTIFIER


   0:      APFS Container Scheme -                      +1000.0 GB  disk1


                                 Physical Store disk0s2


   1:                APFS Volume MacSSD1TB               888.3 GB   disk1s1


   2:                APFS Volume Preboot                 19.9 MB    disk1s2


   3:                APFS Volume Recovery                514.9 MB   disk1s3


   4:                APFS Volume VM                      16.1 GB    disk1s4




/dev/disk2 (external, physical):


   #:                       TYPE NAME                    SIZE       IDENTIFIER


   0:                                                   *120.0 GB   disk2




/dev/disk3 (external, physical):


   #:                       TYPE NAME                    SIZE       IDENTIFIER


   0:                                                   *60.0 GB    disk3


------------------------

I have tried the Disk Util or Terminal approach with 2 different manufacturer HDDs and HDD enclosures, different cables, and many permutations to isolate that its not a HDD or enclosure or cable issue. I have also tried on my wifes Mac (same OS level) but different hardware / USB connection - with the same issues. To me it's pointing to High Sierra.


I have looked through many entries but cannot find any resolution. I look forward to any advice and guidance on how to proceed.


Thanks Zoran

MacBook Pro 13", 10.13

Posted on Feb 9, 2019 8:46 PM

Reply

Similar questions

13 replies

Feb 12, 2019 9:25 PM in response to Kappy

Hi Kappy,


It's taken a while but I got my hands on an old Lenovo T60 - which had no HDD but powered up. So here are my findings.


  1. I installed my Hitachi 60GB HDD into the T60 and hit boot and was immediately prompted for the HDD password - which I somehow remembered and up came a WXP system. So that confirmed the HDD was definitely working. I went to bios and removed the HDD password, plugged the drive back into an enclosure and USB attached to my Mac. OSX recognised the drive, and allowed me to ERASE / reformat. So my conclusion is that password protected HDDs cannot be ERASED with disk utility.
  2. I attempted to repeat for the Fujitsu 120GB HDD - installed in the T60, it too started the boot and asked for the HDD password - but for the life of me I could not remember the HDD password. So I am stuck on this drive. There is no way I can figure to break out of the T60 boot process and get into BIOS with the HDD installed. So this drive remains inaccessible to WXP (and to OSX).


Now that we know the issue is a password locked HDD, is there anyway to Erase the drive with High Sierra? I have no need for any of the content... or is this drive now a throwaway.


BTW, it would be nice if Disk Utility gave a message that the HDD may be password protected in situations like this rather then offer: "Unable to write to the last block of the device", or "Resource Busy" ....


Thanks Zoran

Feb 9, 2019 9:06 PM in response to zmk1962

Of course it's possible the disk is bad. What sort of external drive is it? Have you done this from the Recovery HD?


  1. Restart the computer. Immediately after the chime hold down the Command and R keys until the Apple logo appears. When the Utility Menu appears:
  2. Select Disk Utility from the Utility Menu and click on the Continue button.
  3. When Disk Utility loads select the volume (indented entry, usually Macintosh HD) from the Device list.
  4. Click on the Erase icon in Disk Utility's main window. A panel will drop down.
  5. Set the Format type to APFS (SSDs only) or Mac OS Extended (Journaled.)
  6. Click on the Apply button, then wait for the Done button to activate and click on it.
  7. Quit Disk Utility and return to the Utility Menu.
  8. Select Restart from the Apple menu on the far left.

Feb 10, 2019 10:27 AM in response to zmk1962

For FAT you should use MBR for the partition scheme rather than GUID which isn't recognized by Windows. If you have access to a PC then reformat them MBR with FAT32. Macs can write to that format making it easy to change to GUID with HFS+. You can try on the Mac but I'm not sure that it will work. You may have try more than once to get the MBR with MSDOS to work. Doesn't hurt to try. NTFS formatted drives are a PITA on Macs.


Because you have already tried formatting them on your Max they no longer are recognizable as having been NTFS which is why Tuxera doesn't recognize them. Try the following. If it doesn't work the first time then redo it again.


  1. Open Disk Utility in the Utilities' folder.
  2. After Disk Utility loads select the drive (out-dented entry with the mfgr.'s ID and size) from the side list. 
  3. Click on the Erase tab in the Disk Utility toolbar. A panel should drop down.
  4. In the drop down panel set the partition scheme to MBR. Set the Format type to MSDOS.
  5. Click on the Apply button and click on the Done button when it is activated.
  6. Re-select the drive entry from the side list.
  7. Click on the Erase tab in the Disk Utility toolbar.
  8. From the dropdown panel wet the partition scheme to GUID. Set the format type to Mac OS Extended, Journaled.
  9. Click on the Apply button and click on the Done button when it is activated.


Does this succeed?

Feb 10, 2019 7:46 PM in response to Kappy

Hi Kappy, thank you for persisting with this. Here is my feedback:


I no longer have access to a PC/windows environment to format drives. I am totally reliant on Mac OS X High Sierra.


I executed steps 1 - 5 and fail at 5. I repeated these steps 6 times for the Fujitsu drive and 6 times for the Hitachi drive. Here are the screen shots:


When I connect the drive to the USB port a pop up appears stating that the disc was not readable - I selected initialize:



Disk Utility opens - this is what I see:



I selected Show All Devices view:



Then followed your suggested steps:



The Fuj drive failed 6 times with : unable to write to the last block of the device



The Hitachi drive failed 6 times with: couldn't open device



So I can never get to Step 6 of your suggested plan. ...


I did some more research on these errors and found another suggestion "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. ". from this link: https://apple.stackexchange.com/questions/224752/couldnt-open-device


When I tried the restore .DMG approach, both the Fuj and Hitachi drive fail with error 256: Could not restore- Resource busy



I went to terminal and issued diskutil unmount to ensure nothing was using the disk ...


ZKMACPRO:~ zkmacpro$ sudo diskutil unmountDisk force /dev/disk2

Password:

Forced unmount of all volumes on disk2 was successful

ZKMACPRO:~ zkmacpro$ 


Retried the Restore .DMG approach with both the Fuj and Hitachi drive all attempts failed with the same error.






Feb 9, 2019 9:28 PM in response to Kappy

Hi Kappy,


Thank you for the quick reply.


I have tried with 2 different HDDs - I think you agree that chances are low that they are BOTH bad.

Disk 2: Fujitsu 120gb HDD SATA 5400rpm (apologies I previously stated it was a Toshiba)

Disk 3: Hitachi 60gb HDD SATA 5400rpm


I have connected the drives via external Simplecon and Orico SATA HDD enclosures - both are USB attached. I have also swapped the drives between the HDD enclosures.


I have also tried using Disk Utility in Recovery mode as you suggest - it was a suggestion that I came across in another post but I had the same issue - unable to write to the last block of the device.


Both HDDs were previously used in Windows machines and were working. I do not require the data thats on them. I just want to re-purpose the media.



Feb 9, 2019 9:39 PM in response to zmk1962

It could be the enclosures are malfunctioning. Are you using HFS+ w/GUID formatting? Don't use APFS on HDDs. Were they once formatted NTFS on Windows? If so, you may have formatting problems. Try this: First format the drives using MBR and MSDOS (FAT32). If possible, do this on a PC. Macs cannot write to an NTFS disk. Second, move the drive to the Mac then format it GUID Mac OS Extended, Journaled.

Feb 9, 2019 10:04 PM in response to Kappy

I have used the enclosures previously with other drives (HDD and SSD) to migrate to SSD and also to "archive" the old HDDs for posterity. I have done this for mine, my wifes and my daughters Macs .. so I am comfortable the enclosures are ok.


I confirm I am not trying to use APFS on HDDs.

I have tried to format the drives as GUID MacOS extended Journaled and GUID FAT32 - same issue.


I am pretty sure the HDDs are FAT32 but the 120GB may be NTFS. I no longer have access to PCs or windows machines at all. I have moved totally to Apple many years ago. I do have Tuxera installed on Mac and have used that successfully in the past to write to NTFS drives when I have had to.


When I try to mount the drives with Tuxera Disk manager I receive message: Error while mounting disk2: No supported file system found.


Hence I just want to erase and re-format these drives - I only have access to High Sierra OS !!!


I am starting to suspect the drives may have some partition on them which is part of an encryption/password protection mechanism. But I am just guessing. I have tried an erase with the highest level security and that has also failed with the same issue.

Feb 10, 2019 8:57 PM in response to zmk1962

The problem with High Sierra is that Disk Utility is known to fail formatting a disk. I wonder if that is the problem you are having.


Let's try a Terminal approach. Be sure the two externals are connected. Open Terminal. At the prompt copy and paste the following:


diskutil list


Press RETURN. From the ensuing listing identify one of the two external disks which should show a listing somewhat like the following:


/dev/disk1 (internal, physical)

===============================================

   #:                       TYPE NAME                    SIZE       IDENTIFIER

===============================================

   0:      GUID_partition_scheme                        *1.0 TB     disk1

   1:                        EFI EFI                     209.7 MB   disk1s1

   2:          Apple_CoreStorage FUSION                  279.3 GB   disk1s2

   3:                 Apple_Boot Boot OS X               134.2 MB   disk1s3

   4:                  Apple_HFS Macintosh HD            419.2 GB   disk1s4

   6:                  Apple_HFS Common Downloads      299.9 GB   disk1s6


You now want to copy and paste the following command line substituting the appropriate variables from your system that correspond to my listing above.


diskutil eraseDisk JHFS+ diskname /dev/disk1s4


Press RETURN. Hope the error doesn't occur. The above command is case-specific. The device specifier should be the one for the external drive. Usually, the format is /dev/disk<num>s<num>. You will see it in the listing of the last column from the diskutil list command. For an unformatted disk use /dev/disk<num>s2.


If this works then repeat on the other external drive with appropriate changes to the command line for the Identifier.


If all else fails then try zeroing the disk:


zeroDisk [force] device


Press RETURN, where device would be /dev/disk<num> and [force] is optional. If needed enter as shown above but remove the brackets, i.e., zeroDisk force disk<num>. This writes zeroes to each byte on the disk including the last one. This is not recommended for SSDs on a regular basis, but doing it once will not shorten its life by very much.

Feb 11, 2019 1:40 AM in response to Kappy

Here's the output of diskutil list:


ZKMACPRO:~ zkmacpro$ diskutil list

/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *1.0 TB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_APFS Container disk1 1000.0 GB disk0s2


/dev/disk1 (synthesized):

#: TYPE NAME SIZE IDENTIFIER

0: APFS Container Scheme - +1000.0 GB disk1

Physical Store disk0s2

1: APFS Volume MacSSD1TB 888.3 GB disk1s1

2: APFS Volume Preboot 19.9 MB disk1s2

3: APFS Volume Recovery 514.9 MB disk1s3

4: APFS Volume VM 17.2 GB disk1s4


/dev/disk2 (external, physical):

#: TYPE NAME SIZE IDENTIFIER

0: *120.0 GB disk2


/dev/disk3 (external, physical):

#: TYPE NAME SIZE IDENTIFIER

0: *60.0 GB disk3

ZKMACPRO:~ zkmacpro$


As you can see disk2 and disk3 do not show any volume or Type Name information.


Here's the output for zeroDisk on disk2 and disk 3:


ZKMACPRO:~ zkmacpro$ diskutil zeroDisk force disk2

Proceed? (y/N) y

Started erase on disk2

Error: -69759: Securely erasing data to prevent recovery failed

Underlying error: 16: Resource busy

ZKMACPRO:~ zkmacpro$


ZKMACPRO:~ zkmacpro$ diskutil zeroDisk force disk3

Proceed? (y/N) y

Started erase on disk3

Error: -69879: Couldn't open disk

Underlying error: 2: No such file or directory

ZKMACPRO:~ zkmacpro$ 




Feb 13, 2019 1:00 PM in response to zmk1962

I had no idea the drives were encrypted. Obviously, you didn't remember so both of us were spinning our wheels not having any success. Glad you discovered that. As for the other drive, it's unlikely you can do anything with it until you can remove the encryption. You might seek advice in a Windows forum over at MS. Perhaps they keep a backup password file for those who encrypt their drives and then forget the password. Or there is a way to escape it at startup. PCs usually have standard function keys to depress at startup that puts you into the BIOS. As I recall they may be F9 or F11, but I am not positive. I don't know it that gets you past the password for encrypted drive. Out of my Windows experience which sort of ended with W7.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

High Sierra erase drive fails .... both with disk utility and with terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.