OS X El Capitan / Sierra Hanging on Boot [FIXED]
Update 3/23/2016 – It happened again when I updated to 10.11.4! Even fewer clues this time, additional details and an updated script to remove non-default kext files at the very bottom.
Update 5/14/2017 – This has been an issue for myself and others running OS X Sierra as well.
After Update, OS X Won’t Reboot
After upgrading to OS X El Capitan (10.11) when it was released, I had been generally pleased with the new version but there were a few quirks – like random beach ball pauses – that made me think the 10.11.1 update would address some of them. Thus when I was notified that it was available, I dutifully upgraded… and then my MacBook Pro Retina wouldn’t reboot. I reset the SMC (
Shft+Ctrl+Opt+Pwr while off, then
Pwr), I reset the PRAM (
Cmd+Opt+P+R+Pwr while booting, then hold until the chime sounds again), I tried to boot into Safe Mode (
Single User and Verbose Mode
pci pause: SDXC
This seemed to be meaningful, but was ultimately a wild goose chase.
Recovery Mode Reinstall
I could boot into Recovery Mode (
Cmd+R+Pwr) and used this to access Disk Utility to run First Aid (no errors were found), and then used Terminal to run
resetpassword which was then used to reset permissions on my user folder. Nope.
I reinstalled the operating system over the Internet. No dice.
Using Terminal accessible in Recovery Mode I found several crash logs located in
/Volumes/Macintosh HD/Library/Logs/DiagnosticReports/. I took a look at the latest one and it had the following details about the crash. Spoiler alert, this also ended up being a dead end, but I’m posting it because the only other place on the Internet it exists is a deleted Apple Developer Forum post that I was able to view using the Google Cache.
Process: ctkd  Path: /System/Library/Frameworks/CryptoTokenKit.framework/ctkd Identifier: ctkd Version: 79.1.1 Code Type: X86-64 (Native) Parent Process: launchd  Responsible: ctkd  User ID: 0 Date/Time: 2015-10-22 11:04:40.949 -0700 OS Version: Mac OS X 10.11.1 (15B42) Report Version: 11 Anonymous UUID: F17F633A-3BDD-90AB-37F3-86B22856B7C6 Time Awake Since Boot: 14 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Application Specific Information: Sandbox creation failed: AppSandboxUtilRealPathForPath(self.userAccountHomeDirectoryPath) failed open() for F_GETPATH failed. NSPOSIXErrorDomain:2 No such file or directory WR/DST: /var/root 0 lstat() errno: 2 -1 o:0 (User) m:120755 f:restricted,hidden fs: hfs, fsid: 1000004/11, mf: 0480d000 avail:13621070 Application Specific Signatures: AppSandboxUtilRealPathForPath(self.userAccountHomeDirectoryPath) faile Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_secinit.dylib 0x000000010ade3193 _libsecinit_setup_secinitd_client + 1543 1 libsystem_secinit.dylib 0x000000010ade2b2a _libsecinit_initialize_once + 13 2 libdispatch.dylib 0x000000010aa393c3 _dispatch_client_callout + 8 3 libdispatch.dylib 0x000000010aa392bb dispatch_once_f + 67 4 libSystem.B.dylib 0x000000010962aa0c libSystem_initializer + 131 5 dyld 0x00007fff6005cf1b ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 265 6 dyld 0x00007fff6005d094 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40 7 dyld 0x00007fff600596cd ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 305 8 dyld 0x00007fff60059662 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 198 9 dyld 0x00007fff60059662 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 198 10 dyld 0x00007fff60059662 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 198 11 dyld 0x00007fff60059662 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 198 12 dyld 0x00007fff60059662 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 198 13 dyld 0x00007fff60059662 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 198 14 dyld 0x00007fff60059553 ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 127 15 dyld 0x00007fff600597c3 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 75 16 dyld 0x00007fff6004c0f1 dyld::initializeMainExecutable() + 208 17 dyld 0x00007fff6004fd47 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 3515 18 dyld 0x00007fff6004b276 dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 512 19 dyld 0x00007fff6004b036 _dyld_start + 54 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x000000000000013c rbx: 0x00007fff57441810 rcx: 0x4300ee869eb237d3 rdx: 0x000000010ade3bd5 rdi: 0x0000000000000000 rsi: 0x00007fb8718129bb rbp: 0x00007fff57442090 rsp: 0x00007fff574417f0 r8: 0x0000000000000002 r9: 0x000000010ade3bf0 r10: 0x000000010aba9201 r11: 0x00000046e5c2ef75 r12: 0x00007fb871700060 r13: 0x00007fb8718128b4 r14: 0x00007fb8718128b4 r15: 0x00007fb871812a0c rip: 0x000000010ade3193 rfl: 0x0000000000010206 cr2: 0x00007fb873000000 Logical CPU: 4 Error Code: 0x00000000 Trap Number: 6
The OS X Fix You’ve Been Looking For
I was ultimately able to surmise that the issue was an incompatible kernel extension (kext file). After booting into Recovery Mode, I opened Terminal. First I mounted the filesystem as read write, then navigated to
/Volumes/Macintosh HD/Library/Extensions, created a new folder named “Unsupported” and moved all the kext files into it, then rebooted.
Note: see the updated script at the very bottom of this post to automatically remove non-default kexts. If you have renamed your hard drive to something other than “Macintosh HD” use the new name in the following commands.
mount -rw / cd /Volumes/Macintosh\ HD/Library/Extensions/ mkdir Unsupported mv *.kext Unsupported reboot
Voila! I was able to reboot.
It ended up being my Logitech Control Center kext files, as best I could determine. The full list of kext files on my system is below. Note that the 360Controller.kext, Wireless360Controller.kext and WirelessGamingReceiver.kext later caused problems with 10.11.4, see bottom.
/Volumes/Macintosh HD/Library/Extensions > ls -1 360Controller.kext ACS6x.kext ATTOCelerityFC8.kext ATTOExpressSASHBA2.kext ATTOExpressSASRAID2.kext ArcMSR.kext CalDigitHDProDrv.kext HighPointIOP.kext HighPointRR.kext LogiMgrDriver.kext LogitechHIDDevices.kext LogitechUnifying.kext PromiseSTEX.kext SoftRAID.kext Wireless360Controller.kext WirelessGamingReceiver.kext
After moving them all to Unsupported I ended up moving them all back except for
LogitechUnifying.kext and am posting this from the previously unbootable machine. These may not be the same incompatible kext files you have (VirtualBox and Evernote also seem to be offenders), but hopefully sets you on the right track. Good luck!
Failed Update to El Capitan 10.11.4
Once again my El Capitan upgrade didn’t go very smoothly. Same as last time, my laptop failed to reboot after the install seemed to complete, however this time there were even fewer clues – no crash logs, etc. Luckily I had fixed this once before so I booted into Recovery mode (
Cmd+R while booting), selected
Utilities > Terminal to access the command line. The script below creates a
Library/ExtensionsDisabled folder and moves and of the non-default kext files into it by comparing against the
/Library/Extensions directory on the recovery partition. You may need to move some kext files back to their original location if they aren’t the cause of the problem. Keep in mind that the default name for your hard drive will be “Macintosh HD” which means you need to escape the space on the command line, so it becomes “Macintosh\ HD”. If you have renamed your hard drive, use whatever name you selected instead.
Open Safari from Terminal in Recovery Mode
If you want to access Safari to browse the web (this post?) once you have Terminal open enter
/Applications/Safari.app/Contents/MacOS/Safari & to open a browser window. Once the process is completed close the Safari and Terminal windows and reboot.
Script to Disable Non-Default Kext Files
This script will look for any extensions on your system that aren’t part of the “default” extension installed by Apple. If they are found they are moved into a directory named “/Volumes/Macintosh\ HD/Library/ExtensionsDisabled/” so that they will not be loaded when you reboot. Make sure that your hard drive is named correctly in the commands, by default it’s “Macintosh HD” unless it was changed. If you’re new to the command line the easiest way to do this is to launch Safari from Terminal and then cut and paste from this post. Good luck!
# mount the drive as read/write mount -rw / # create a directory for "disabled" extensions mkdir /Volumes/Macintosh\ HD/Library/ExtensionsDisabled # view files that exist in your Extensions folder but not the recovery partition kexts=`comm -23 <(ls /Volumes/Macintosh\ HD/Library/Extensions|sort) <(ls /Library/Extensions|sort)` echo $kexts # move "extra" kext files to the "disabled" directory for kext in $kexts; do mv /Volumes/Macintosh\ HD/Library/Extensions/$kext /Volumes/Macintosh\ HD/Library/ExtensionsDisabled/$kext; done exit