Boot loop

From OpenZFS on OS X
Jump to: navigation, search

Boot Loops[edit]

Oh no, the worst has happened, there is some bug in O3X that makes the machine panic on boot, and repeat. How do you remove O3X so you can boot!?

The simplest is to boot into Recovery Mode:

  • Hold command-R on boot to boot into Recovery.
  • Make sure your normal boot drive is mounted, for example, "/Volumes/Macintosh HD" (if it is not, use DiskUtility to mount it). Note that your default drive name may appear to be available in Terminal, but if you have not mounted the "Data" volume, you will have missing paths.
  • Start Terminal (Recovery Boot has it in the menu)
  • Remove the O3X kexts:
# cd "/Volumes/Macintosh HD/Library/Extensions"
# rm -rf spl.kext zfs.kext
  • Refresh the kernel kext cache:
# kextcache -i "/Volumes/Macintosh HD"
  • Reboot

An alternative way is when in recovery, to comment out the import line in the "/usr/local/libexec/zfs/launchd.d/zpool-import-all.sh" file which gets executed on start. This is especially helpful when you want to still have access to zfs commands but an automatic pool import is triggered which crashes the system.


A note from a new user on December 8, 2022:

I got a into a boot loop and tried the above. I did not have an spl.kext file, but I did have the zfs.kext file. These instructions did not work to get out of the boot loop, and I tried to "comment out the import line" in the "alternative" section above, but it wasn't clear to me exactly which lines mattered.

The solution I found that actually worked for me was in this forum post, by running the command:

# kmutil trigger-panic-medic --volume-root /Volumes/<YourVolumeName>