Hard drive causes kernel panics

My 2017 27" imac running sierra started having kernel panics a couple of days ago. After some fiddling, it turns out that my time machine drive (HFS) is the cause. if it’s present at boot, the mac panics in roughly a minute after logging in, or roughly a minute after I try to mount it. If I try to mount it on my 2018 mini with catalina, same thing. I’d like to be able to get the last day of data off of it, but there doesn’t seem to be a way to have anything talk to the drive.

The backtrace shows com.apple.iokit.IOUSBHostFamily and a bunch of related iokit extensions.

It’s only a day of data loss, so I don’t want to spent much time or resources on it, and I don’t want to purposely incite many more panics playing around, but if anyone has seen this before and/or has a suggestion, I’d appreciate it. Otherwise, I’ll just rescue the platters and that nice big magnet and recycle the rest.

It could be the cable or the drive enclosure.

Some things to try:

  1. Boot the Mac in safe mode and then connect the drive.
  2. Try connecting the drive using a different cable.
  3. Try transferring the drive itself to a new enclosure.

All good suggestions.

If you buy an external drive, as opposed to buying a good enclosure and installing a drive yourself, the enclosure may be not top quality. I have taken apart 3 or 4 Seagate externals after they “failed”. The drives were fine, the enclosures were not.

I should have been less lazy and included the list of things I checked, but it was a long list since I have a lot of drives attached in various ways. The drive lived in an owc dual dock, and the dock and its cable are fine. (I love those docks, though they are expensive.)

The kernel panic drive failure mode is a new one for me though. A friend suggested that I replace the drive controller with one from another disk, but that’s more trouble than I want to bother with. Maybe I’ll give him the disk and let him play with it. It’s encrypted, so future blackmail is unlikely to ensue…

I’ll throw in a me too! Was driving me mad.
In my case it was an external ssd - two different hubs or plugged direct into my Mac Studio it causes a panic.
It had been plugged in since the studio came out until it started doing this.

I find it surprising (but not necessarily impossible) that drive hardware could cause a kernel panic like this. I think it may be more likely that some part of the file system’s control structure has gotten corrupted in a way that is triggering a crashing bug.

Some suggestions to try:

  • If the drive can be connected to another Mac without panicking it, run Disk Utility (or Disk Warrior or your favorite repair utility) to verify and repair the volume. It may be able to fix the damage. Then you can copy the content elsewhere.
  • If you can’t do this, consider installing a utility like Disk Arbitrator. I haven’t actually used it, but if it works as advertised, it will let you attach a drive without mounting it. From there, you should be able to run Disk Utility or other repair tool on it and copy the content elsewhere.
  • If neither of the above work or are possible, see if you can connect it to another computer running another OS (e.g. Linux or Windows). You may need to install third-party software to mount the HFS+ volume, but if you can, you can make a backup of the contents this way.

Either way, once you’ve got the content backed up, see if you can wipe and reformat the drive. On macOS, you may need to be able to attach the drive without mounting it so you can blow away the partition table, then re-create partitions and format them. On a Linux PC, you should be able to use the dd command to write zeros to the first few MB of the disk, which should wipe out anything resembling a partition table (or write them to the entire drive if you prefer). Then see if you can connect it to your Mac and create partitions/volumes.

1 Like