External disk is hijacked by fsck when plugged in to Macbook
The two items that come to mind are getting software that can try and repair the disk structure and prevent the mounting like Disk Warrior or connecting the drive using a USB write blocker / forensic adapter so that the disk just presents as read-only so you can get any data off it.
Then, you would wipe the drive if you can’t get it sorted. The native tool will choke on fsck even if you disable the automatic check when it comes time to mount the drive normally.
I used to frequently have that problem of waiting for a long time for a USB hard disk to mount while waiting for fsck
to complete - due to a defective USB cable that occasionally disconnect the disk.
Clean Unmount
I have made it a habit to manually unmount the disk from command line
hdiutil eject disk2
Prevent fsck From Checking
From https://apple.stackexchange.com/a/230712/57733, first get the UUID of the external disk with diskutil list
, then edit /etc/fstab
with the value
diskutil info /dev/diskXsY
sudo vifs
# Replace with the UUID of your disk
UUID=2FECDB7A-15F0-36F9-9A47-483B9669D6DC none exfat rw,auto 0 0
Or a more direct method is to rename the fsck
link and binary
sudo mv /sbin/fsck_exfat /sbin/fsck_exfat.disabled
sudo mv /System/Library/Filesystems/exfat.fs/Contents/Resources/fsck_exfat /System/Library/Filesystems/exfat.fs/Contents/Resources/fsck_exfat.disabled
I killed the fsck_hfs process with killall and the disk became available to do as I pleased.