My MBP SSD crapped out the other day, I'm pretty sure it was user error (too full). I was able to run my emergency OS via external drive and collect my files, but had difficulty deleting them from my SSD (error code -50) and the First Aid procedures failed miserably.
Reset SMC and PRAM just in case, no dice.
At this point I just want to fix the drive, I don't need to recover anything from it. When I attempt to build a fresh HFS+ partition, the Disk Utility gets to disk0s2 and then fails ("Formatting disk0s2 as Mac OS Extended (Journaled) with name Macintosh HD"-->"Disk Erase failed with the error: File system formatter failed"). However, if I set it to Fat32, it will format and partition perfectly and the disk verifies. It also S.M.A.R.T. verifies just fine.
Unfortunately that doesn't help me, since I need the HFS+ to reinstall the OS. I have exhausted the options within Disk Utility and have gone command level with the problem from the terminal. I've followed walkthroughs with fdisk, downloaded TestDisk and installed gdisk as well--no success. I've tried GPT Destroy, rebuilt the MBR, and zero disk (abandoned after 1Gb) with Disk Destroy, still doesn't let me write a fresh partition and format. I left DD running for about three minutes, and my SMART utility is now reporting 13K CRC errors (apparently all Interface CRC Errors), but zero bad sectors.
Before anyone says it... no, DiskWarrior does not work.
I really am not in a position to replace this drive right now, and the fact that it works perfectly fine with Fat32 is taunting me.
I don't know how to scrub the drive any cleaner or restore it to factory defaults. I really just want to get that clean HFS+ partition up and running so I can reinstall the OS, and it's fighting me. And I'm losing.
EDIT: // Including output from sudo gpt -r show disk0
sh-3.2# sudo gpt -r show disk0 start size index contents 0 1 PMBR 1 1 Pri GPT header 2 32 Pri GPT table 34 6 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B 409640 489562928 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC 489972568 262151 490234719 32 Sec GPT table 490234751 1 Sec GPT header
UPDATE 1: Moving the EFI to a Different Start Block
Entered the following commands:
>sudo gpt destroy disk0 >sudo gpt create -f disk0 >sudo gpt add -i 1 -b 800000 -s 409600 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk0 disk0s1 added >sudo gpt add -i 2 -b 1209600 -s 488762968 -t 48465300-0000-11AA-AA11-00306543ECAC disk0 disk0s2 added >sudo newfs_hfs -v System -J /dev/rdisk0s2 newfs_hfs: WriteBuffer: pwrite(3, 0x10fbdb000, 1048576, 3149824): Input/output error newfs_hfs: write (sector 6152): Invalid argument
An I/O error has just reared it's ugly head...