Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pmac100

macrumors newbie
Original poster
Nov 29, 2022
7
0
Hi...

I have a 2013 MacBook Pro running Catalina. Mail recently stopped working, couldn't access the user home directory. Rebooted, Mac would shut down during reboot sequence. Rebooted in verbose mode, looked like a disk permissions issue. Couldn't reboot in Safe Mode either.

Rebooted in recovery mode, ran Disk Utility on both container disk and volumes, got a "failed to open with error: Permission denied... exit code 66... File system verify or repair failed (-69845)".

Try to reinstall Catalina, got a permissions error.

Rebooted off an external HD running Catalina, Disk Utility couldn't fix the internal HD from there either. BUT I can browse the user home folder that I couldn't see when previously booted off the internal drive.

If possible, I'd like to avoid erasing the internal drive and reinstalling. Looks like permissions somehow got messed up on the internal drive. Any suggestions for fixing this? Thanks!
 
Boot from the external disk, unmount all volumes of the internal disk before running First Aid.
 
Thanks for the suggestion; same errors, unfortunately. Also, I tried running FirstAid at the physical disk level (one level above container) and got "Problems were found with the partition map which might prevent booting"
 
So, nothing was repairable (volumes, containers, disks), I still got various permissions errors.

I did manage to pull off most of the data I needed while booted off an external drive, intending to just reformat the internal drive and reinstall the OS. But DiskUtility would not erase any volumes, or delete any partitions. I even went into Terminal and tried "diskutil apfs deleteVolume" and "diskutil apfs deletecontainer" commands, both of which started to work, but then threw back error messages ("Error 13: Permission denied").

Is there no "nuclear option" to force a reformat regardless of permissions?
 
I would create a bootable installer, boot from it without the external drive connected, and use diskutil eraseDisk from Terminal. The command erases the whole disk, not just the APFS container.
List the physical disks to get the number of the internal one
Code:
diskutil list physical
Erase the disk, format as Mac OS Extended (Journaled), a name you want, GPT and the disk with the correct number at the end.
Code:
diskutil eraseDisk JHFS+ Name GPT disk10
After that, you can check again from Terminal with diskutil verifyDisk or from Disk Utility. If all is well, you can use Disk Utility to partition or reformat JHFS+ into APFS, then install macOS.
https://support.apple.com/en-us/HT201372
https://ss64.com/osx/diskutil.html
 
Looks like I'm out of luck; I get a "writeable disk is required (-69772)" when attempting both an erase and a partition. This drive is a Samsung SSD which seems to have been an issue for others at times.

IMG_1810.jpg
 
Try diskutil unmountDisk disk0 or diskutil unmountDisk force disk0 before using eraseDisk.

If macOS fails to format a disk, I use a bootable Windows disk or GParted Live to format it as GPT/FAT32. https://gparted.org/livecd.php
 
OP wrote:
" This drive is a Samsung SSD which seems to have been an issue for others at times."

You should have stated in your first post that you swapped the factory drive out for a 3rd-party drive. That changes everything.

Best bet:
Put the Apple factory drive BACK IN, and see if you can get booted and running again that way.
 
Try diskutil unmountDisk disk0 or diskutil unmountDisk force disk0 before using eraseDisk.

If macOS fails to format a disk, I use a bootable Windows disk or GParted Live to format it as GPT/FAT32. https://gparted.org/livecd.php
It was a fun exercise to create a bootable GParted USB and boot the Mac off it, but alas, still could not format or delete partitions. Got various errors when trying; "Error fsyncing/closing /dev/nvme0np1: No data available"; "Partition(s)... have been written, but we have been unable to inform the kernel of the change, probably because they are in use..."

OP wrote:
" This drive is a Samsung SSD which seems to have been an issue for others at times."

You should have stated in your first post that you swapped the factory drive out for a 3rd-party drive. That changes everything.

Best bet:
Put the Apple factory drive BACK IN, and see if you can get booted and running again that way.
TBH, that detail didn't initially occur to me; the previous owner had replaced the original drive, and I replaced that about 4 years ago again. But searching on the errors I've been seeing, this Samsung drive occasionally pops up in relation.

It seems like I'm looking at replacing the drive again...
 
I’m surprised GParted failed to format the disk.
Have you tried to update the firmware of the SSD? If Samsung released an update https://semiconductor.samsung.com/consumer-storage/support/tools/
Tried that, unlike creating a bootable GParted USB, I'm having a heck of a time creating a bootable Samsung firmware update USB, using either Etcher or unetbootin. In some cases, a "Windows" boot disk shows up on Option - powerup, but just gives a blank screen when selected. I was expecting to see a EFI boot disk option.
 
Tried that, unlike creating a bootable GParted USB, I'm having a heck of a time creating a bootable Samsung firmware update USB, using either Etcher or unetbootin. In some cases, a "Windows" boot disk shows up on Option - powerup, but just gives a blank screen when selected. I was expecting to see a EFI boot disk option.
Try to erase the USB drive from Disk Utility choosing Master Boot Record and MS-DOS (FAT), then write the ISO with Unetbootin.

https://support.apple.com/guide/disk-utility/partition-schemes-dsku1c614201/22.0/mac/
https://support.apple.com/guide/disk-utility/file-system-formats-dsku19ed921c/22.0/mac/
 
Try to erase the USB drive from Disk Utility choosing Master Boot Record and MS-DOS (FAT), then write the ISO with Unetbootin.

https://support.apple.com/guide/disk-utility/partition-schemes-dsku1c614201/22.0/mac/
https://support.apple.com/guide/disk-utility/file-system-formats-dsku19ed921c/22.0/mac/
Yep, tried that too, no luck. USB shows up as a Windows disk in the boot menu, I choose it, there's a brief second that a cursor flashes in the upper left, then a blank screen.
 
Other suggestions:
- write the iso with dd https://osxdaily.com/2015/06/05/copy-iso-to-usb-drive-mac-os-x-command/

- from a bootable Windows USB, try diskpart clean on the SSD
"Removes any and all partition or volume formatting from the disk with focus."
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskpart
“The Command Prompt can be accessed by pressing Shift+F10 during Windows Setup.”
https://learn.microsoft.com/en-us/w...ws-setup-command-line-options?view=windows-11
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.