You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Can not erase or modify any parameter of my internal ssd disk. It is somehow write protected for apple tools too.

After the last security update from Apple my High Sierra MacBook Pro was not able to boot. I have made all normal steps, boot disk creation, diskutil first aid, terminal commands.... nothing helped. I have made a complete backup of my disk0 with dd to another disk.


After that I have tried to delete and recreate APFS Volumes delete APFS container, but nothing happened in my APFS descriptors... after the terminal commands it looked like the Volume disappeared from diskutil, but after a reboot, everything is like at the beginning. The most interesting was that after a direct dd command to disk0 the APFS parameters and partition data was not changed at all. That was the point where I thought that the partition area and maybe the whole disk is in read-only mode. But on such a way that even the internal apple tools: terminal commands, diskutil commands can not override this. And now I can not erase disk from anywhere. diskutil stuck on erasing process...


I have made a boot disk with Ubuntu, and tried to make a format from there, but the Ubuntu was not able to write to disk...


Some more important information: All the SSD tests told me that SSD drive is healthy!!!! And SIP is disconnected in recovery mode.


I think it should be some kind of security protocol protecting the partition area, but during the update something happened, and now the system is working on wrong way.


Any suggestion?


MacBook Pro, OS X 10.11

Posted on Feb 25, 2020 5:09 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 26, 2020 12:38 PM

Thanks for the extra information. I don't like the way Disk Drill shows the SMART Attributes since I believe it is leaving out some information or at least displays it in a poor manner. Try running DriveDX and posting the report here using the "Additional Text" icon which looks like a piece of paper. IIRC DriveDX does not require installing and is its own app package.


The error logs from Ubuntu implies you do have a defective SSD. I've seen similar log entries with some bad SSDs. You can try rescuing this SSD by trying to reset the SSD to factory defaults by using the SSD's own built-in hardware secure erase feature (if this SSD has it -- not all Apple SSDs support this feature). The hardware secure erase can sometimes fix issues with a malfunctioning SSD. Only Linux has the necessary utility to perform the hardware secure erase.


While you can do this from an Ubuntu boot disk I don't know if the disk you are using has the necessary "hdparm" utility installed by default (if not, it can be installed). I do know Knoppix has this utility (and many others) installed by default (Knoppix v8.2 may be a better choice than v8.6). Knoppix will take a while to boot and the laptop may appear frozen on the Apple boot picker menu. To perform the hardware secure erase boot Linux, then you will need to put the laptop to sleep for a minute and then wake it up. Some Apple laptops won't wake up properly when booted from some external drives.


If the laptop wakes up, then open a terminal and run the following commands. You will first need to get the Linux identifier for the SSD. You can use "lsblk" or "fdisk" to get the drive identifier.

sudo  lsblk  -f
sudo  fdisk  -l


To actually perform the secure erase use the following two command making sure to replace "sdX" with the SSD's actual drive identifier:

sudo  hdparm  --user-master  u   --security-set-pass   abc  /dev/sdX

sudo  hdparm  --user-master  u   --security-erase   abc  /dev/sdX


The first of the "hdparm" commands sets the ATA Security mode on the SSD which means if the second command does not complete successfully the SSD will have a security lock that will need to be disabled before the SSD data can be accessed again.


The second "hdparm" command actually initiates the built-in hardware security erase feature. The erase can typically take anywhere from 30seconds to several minutes.


Another option is to try a power cycle trick to "fix" the SSD. Perform an Option Boot and let the laptop sit at the Apple boot picker menu for an hour, then power off the laptop. Rinse and repeat two more times. In theory by having the SSD powered on without any data access it will allow the SSD's internal mechanisms time to try to and "fix" itself.


IIRC Apple SSDs from this era were known to have some issues. We've had to replace some of our organization's 2013 MBAir SSDs due to hard failures. If you replace the Apple SSD with a third party SSD, just keep in mind that you may still need a properly formatted original Apple SSD installed internally in order to install later versions of macOS. Recent macOS installers include system firmware updaters which sometimes require an original Apple SSD to be installed during a macOS upgrade. Something to keep in mind.


FYI, Apple PCIe SSDs use a proprietary Apple connector so a regular and common M.2 SSD will not work without an adapter. OWC makes PCIe NVMe SSDs with an actual Apple proprietary connector. NVMe SSDs require the use of macOS 10.13+. OWC also sells enclosures for the original Apple SSDs.

Similar questions

10 replies
Question marked as Top-ranking reply

Feb 26, 2020 12:38 PM in response to elpi07

Thanks for the extra information. I don't like the way Disk Drill shows the SMART Attributes since I believe it is leaving out some information or at least displays it in a poor manner. Try running DriveDX and posting the report here using the "Additional Text" icon which looks like a piece of paper. IIRC DriveDX does not require installing and is its own app package.


The error logs from Ubuntu implies you do have a defective SSD. I've seen similar log entries with some bad SSDs. You can try rescuing this SSD by trying to reset the SSD to factory defaults by using the SSD's own built-in hardware secure erase feature (if this SSD has it -- not all Apple SSDs support this feature). The hardware secure erase can sometimes fix issues with a malfunctioning SSD. Only Linux has the necessary utility to perform the hardware secure erase.


While you can do this from an Ubuntu boot disk I don't know if the disk you are using has the necessary "hdparm" utility installed by default (if not, it can be installed). I do know Knoppix has this utility (and many others) installed by default (Knoppix v8.2 may be a better choice than v8.6). Knoppix will take a while to boot and the laptop may appear frozen on the Apple boot picker menu. To perform the hardware secure erase boot Linux, then you will need to put the laptop to sleep for a minute and then wake it up. Some Apple laptops won't wake up properly when booted from some external drives.


If the laptop wakes up, then open a terminal and run the following commands. You will first need to get the Linux identifier for the SSD. You can use "lsblk" or "fdisk" to get the drive identifier.

sudo  lsblk  -f
sudo  fdisk  -l


To actually perform the secure erase use the following two command making sure to replace "sdX" with the SSD's actual drive identifier:

sudo  hdparm  --user-master  u   --security-set-pass   abc  /dev/sdX

sudo  hdparm  --user-master  u   --security-erase   abc  /dev/sdX


The first of the "hdparm" commands sets the ATA Security mode on the SSD which means if the second command does not complete successfully the SSD will have a security lock that will need to be disabled before the SSD data can be accessed again.


The second "hdparm" command actually initiates the built-in hardware security erase feature. The erase can typically take anywhere from 30seconds to several minutes.


Another option is to try a power cycle trick to "fix" the SSD. Perform an Option Boot and let the laptop sit at the Apple boot picker menu for an hour, then power off the laptop. Rinse and repeat two more times. In theory by having the SSD powered on without any data access it will allow the SSD's internal mechanisms time to try to and "fix" itself.


IIRC Apple SSDs from this era were known to have some issues. We've had to replace some of our organization's 2013 MBAir SSDs due to hard failures. If you replace the Apple SSD with a third party SSD, just keep in mind that you may still need a properly formatted original Apple SSD installed internally in order to install later versions of macOS. Recent macOS installers include system firmware updaters which sometimes require an original Apple SSD to be installed during a macOS upgrade. Something to keep in mind.


FYI, Apple PCIe SSDs use a proprietary Apple connector so a regular and common M.2 SSD will not work without an adapter. OWC makes PCIe NVMe SSDs with an actual Apple proprietary connector. NVMe SSDs require the use of macOS 10.13+. OWC also sells enclosures for the original Apple SSDs.

Feb 26, 2020 3:19 PM in response to HWTech

Thank you very much for those very informative and useful advises! You saved me a lot of time, I have just now started to google how to reset a read-only ssd...


Meanwhile, I have managed to install the gsmartcontrol on ubuntu (I'm now a little bit more familiar with this op :)))but I did not find any strange things in the report.

As you wrote I have made a check with DriveDx too. I did not find in it the mentioned "Additional text" tab just the "Error log" which was empty. You will see below the report from this program:

Now I will go to Ubuntu to try your advise.

I'll be back... :)


Feb 26, 2020 2:38 AM in response to HWTech

Thanks for ideas!

The exact modell is: MacBook Pro (Retina, 13-inch, Early 2013)

The internal disk Macintosh HD is 100% disk0. I have checked several time from distil, from terminal commands..

I have got this smart check from disk drill:


till now I have never used Ubuntu, but thanks for idea. I will check how to do it and will try your ideas. I will come back later with results.

Feb 25, 2020 10:12 PM in response to elpi07

What is the exact model of your laptop? You can get this information by entering your serial number here or here.


Did you confirm that "disk0" was indeed your internal boot drive for the laptop? Recently I've found Recovery Mode and macOS USB installers are "disk0" and the physical internal drive is "disk1". Were all the volumes unmounted from drive before issuing the "dd" command? You need to check what is mounted by running "mount" since the actual mounted volumes will be on another "disk" device.


If you can boot Ubuntu, try running GSmartControl and posting the complete health report here. Also see if you can run the drive's internal self-diagnostics using GSmartControl. Unfortunately not all Apple SSD support SMART or the SMART selftests. You can also try checking the Ubuntu system logs to see if Ubuntu had any problems communicating with the SSD during startup or while using GSmartControl.


Did you try "dd" using Ubuntu?

Feb 26, 2020 4:25 AM in response to elpi07

I have tried some writing procedures at Ubuntu and this is the system log:


11:00:43 kernel: ata1: EH complete

11:00:43 kernel: sd 0:0:0:0: [sda] tag#14 CDB: Write(10) 2a 00 00 06 88 28 00 08 00 00

11:00:43 kernel: sd 0:0:0:0: [sda] tag#14 CDB: Write(10) 2a 00 00 06 88 28 00 08 00 00

11:00:43 kernel: sd 0:0:0:0: [sda] tag#14 Add. Sense: Unaligned write command

11:00:43 kernel: sd 0:0:0:0: [sda] tag#14 Sense Key : Illegal Request [current]

11:00:43 kernel: sd 0:0:0:0: [sda] tag#14 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE

11:00:43 kernel: ata1.00: configured for UDMA/133

11:00:43 kernel: ata1.00: configured for UDMA/133

11:00:43 kernel: ata1.00: error: { ABRT }

11:00:43 kernel: ata1.00: status: { DRDY ERR }

11:00:43 kernel: ata1.00: cmd 35/00:00:28:88:06/00:08:00:00:00/e0 tag 14 dma 1048576 out

res 51/04:00:28:88:06/00:08:00:00:00/e0 Emask 0x1 (device error)

11:00:43 kernel: ata1.00: failed command: WRITE DMA EXT

11:00:43 kernel: ata1.00: irq_stat 0x40000001

11:00:43 kernel: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0

11:00:43 kernel: ata1: EH complete

11:00:43 kernel: ata1.00: configured for UDMA/133

11:00:43 kernel: ata1: EH complete

11:00:43 kernel: ata1.00: configured for UDMA/133

11:00:43 kernel: ata1: EH complete

11:00:43 kernel: ata1.00: configured for UDMA/133

11:00:43 kernel: ata1: EH complete

11:00:43 kernel: ata1.00: configured for UDMA/133

11:00:43 kernel: ata1: EH complete


This "Illegal request" is the most interesting part for me....


So for the above reason I did not managed to write with dd under Ubuntu to disk, and unfortunately I did not succeed to install till now the GsmartControll on my Ubuntu for some reason.


My last idea is to remove the ssd from the Mac and to connect it to another computer as an external disk and reformat it there...

But first I have to find somewhere a right box for this msata connection.




Feb 26, 2020 6:35 PM in response to elpi07

Thanks for posting the reports for the SSD as they are much clearer than Disk Drills report. The Attributes look Ok, but the GSmartControl report shows multiple errors which confirms the entries in the Ubuntu system log you posted earlier. This SSD would definitely be a good candidate for trying the built-in hardware ATA Secure Erase to reset the SSD (if the SSD supports it). If you have any problems performing the secure erase, then please post the exact messages you receive. You can also run this command to show whether the SSD supports ATA Security modes (replace 'sdX' with the correct drive identifier):

sudo hdparm -I /dev/sdX | grep -iE '^security' -A8


Good luck.

Feb 27, 2020 6:27 AM in response to elpi07

You're welcome. I'm glad the hardware secure erase worked to restore your SSD.


Make sure to always have good verified working backups since an SSD can fail at any time without any warning signs. You got lucky that you were able to recover your data before resetting the SSD. Data recovery from an SSD is very difficult to impossible even for a professional data recovery service.

Can not erase or modify any parameter of my internal ssd disk. It is somehow write protected for apple tools too.

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