MacBook main volume can’t be mounted during boot

bootefihard drivemountpartition

MacBook 7.1 (white unibody) from 2010, I have upgraded to a new SSD some years ago. During startup the MacBook turns off when the loading bar is at about 80%. Booting in verbose mode I can see the error message for about 3sec before the computer switches off (haven't found out how to stop it from shutting down to have a more detailed look at the output). I took a picture of the error:
Boot Error Message

This is a transcript of the image (some more details appear during shutdown for split of a second, but I haven't been able to capture it.

...
disk0s2: I/O error
jnl: disk0s2: update_fs_block: failed to update block 2 (ret 5)
jnl: disk0s2: journal_open: Error replaying the journal!
hfs_mount: journal_open == NULL; couldn't be opened on MacBookSSD
mount_hfs: error on mount(): error = -1.
mount_hfs: Invalid argument
Tue Dec ... localhost com.apple.xpc.lauch[1] <Emergency>: Boot task failed: mount
Tue Dec ... localhost com.apple.xpc.lauch[1] <Emergency>: Shutting down in 3 seconds.

I have booted in recovery mode (cmd + r) and tried to do the "First Aid" and it appeared to be successful: Volume MacBookSSD appears to be ok, Exit-Code 0. However the error remained.

I have further tried the following:

  • Safe start (boot holding SHIFT). Same error appeared during startup.

  • FSCK in recovery mode using terminal:

    fsck_hfs -fy /dev/rdisk0s2
    ...
    ** The volume MacBookSSD appears to be OK. 
    
    
  • Tried to mount the device manually (same error as above):

    mkdir /tmp/3
    /sbin/mount_hfs /dev/disk0s2  /tmp/3
    mount_hfs: error on mount(): error = -1.
    mount_hfs: Invalid argument
    
    
  • Reset NVRAM (cmd + Alt + p + r during startup)

  • Reset SMC (Shift + Alt + Ctrl + Power)

Edit: I have tried booting in single user mode (cmd + s during boot) and ran

fsck_hfs -fy /dev/disk0s2

again. Output is:

** /dev/rdisk0s2
** Root file system
Executing fsck_hfs (version hfs-407.50.6).
** Checking Journaled HFS Plus volume.
The volume name is MacBookSSD
** Checking extents overflow file. 
** Checking catalog file. 
** Checking multi-linked files. 
** Checking catalog hierarchy. 
** Checking extended attributes file. 
** Checking volume bitmap. 
** Checking volume information. 
** The volume MacBookSSD appears to be OK. 
disk0s2: I/O error. 
*****The volume was modified *****
diskutil list

shows for the affected disk0 the following output:

/dev/disk0 (internal, physical):
#:                   TYPE NAME         SIZE        IDENTIFIER
0:  GUID_partition_scheme             *240.1 GB    disk0
1:                    EFI EFI          209.7 MB    disk0s1
2:              Apple_HFS MacBookSSD   239.1 GB    disk0s2
3:             Apple_Boot Recovery HD  650.0 MB    disk0s3

With diskutil verifyDisk /dev/disk0 I get:

Started partition map verification on disk0
Checking prerequisites
Checking the partition list
Checking the partition map size
Checking for an EFI system partition
Checking the EFI system partition's size
Checking the EFI system partition's file system
Checking the EFI system partition's folder content
Problems were found with the partition map which might prevent booting
Error: -69842: Couldn't mount disk

With diskutil repairDisk /dev/disk0 I get

Repairing the partition map might erase disk0s1, proceed? (y/N) y
Started partition map repair on disk0
Checking prerequisites
Checking the partition list
Adjusting partition map to fit whole disk as required
Problems were encountered during repair of the partition map
Error: -69697: Partition map repair failed while adjusting structures to fit current whole disk size
Underlying error: 5: Input/output error

So diskutil is apparently not capable of repairing my disk. In order to check for hardware defects I ran dmesg and get something like the following (showing only some lines from the bottom since it's a lot of output I can't copy here):

...
disk0s2: I/O error
jnl disk0s2: update_fs_block:failed to update block 2 (ret 5)
jnl: disk0s2: journal_open: Error replaying the journal!
hfs: early jnl init: failed to open/create the journal (retval 0).
hfs_mountfs: hfs_early_journal_init failed, setting to FSK
hfs(1): Journal replay fail. Writing lastMountVersion as FSK!
disk0s2: I/O error. 
hfs_mountfs: hfs_early_journal_init failed, erroring out
hfs_mount: hfs_mountfs returned error=22 for device disk0s2

...

disk0s1: I/O error. 
disk0s1: I/O error. 
disk0s1: I/O error. 
disk0s1: I/O error. 
msdosfs_fat_uninit_vol: error 5 from msdosfs_fat_cache_flush
Starting poll type 4
Restarting poll type 4
Command 0x2 completed. inCount: 2 ...
disk0: I/O error. 

...

Does this look like a hardware error to you and I should just install a new device?

PS: I've been able to mount /dev/disk0s2 with a CloneZilla USB stick in unix terminal and was able to save most of my data to an external file (unfortunately no installed applications…). However, mounting disk0s2 in Mac Recovery Terminal or single user mode still fails.

Update on free disk space: When I mount /dev/sda2 with the CloneZilla live USB Terminal, df -h shows a usage of about 79% (175G of 223G in use). Seems about right.

Best Answer

To conclude so far: SATA cable was not damaged, as suggested somewhere else.

I came to the conclusion that the SSD itself is broken and I failed to repair it. Even GParted was also not able to format the partition.

Therefore I have just replaced the SSD with a new one. Luckily I was able to save most of the data, since the partition could still be accessed from a Linux system.