Technology / OSX
OS X El Capitan / Sierra / High Sierra Hanging on Boot [FIXED]

If your OS X El Capitan/Sierra/High Sierra update won't reboot you can skip to the fix or check here for the (mostly) automated fix script. Otherwise feel free to read the saga below!
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.
Update 8/01/2017 - I updated to 10.12.6 and once again was unable to boot. This time I had to remove kexts from/System/Library/Extensions. Removed everything older than 2016 after runningls -lat.
Update 1/18/2018 - I updated to 10.13.3 High Sierra Beta 5 and once again was unable to boot. I am using the Beta version because 10.13.2 had very high CPU usage by theWindowServerprocess that was fixed in 10.13.3. Before I knew this I installed Malwarebytes to check for spyware/adware causing the CPU usage, then uninstalled it after installing the OS X beta. It seems to have left behind a kext namedcom.malwarebytes.mbam.rtprotection.kextand once I deleted it, things work again.
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 (Shft+Pwr). Nothing.
Single User and Verbose Mode
I was unable to boot into Single User Mode (Cmd+S+Pwr), but it and Verbose Mode (Cmd+V+Pwr) did show that the boot process was hanging and the last message it displayed was:
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 [220]
Path: /System/Library/Frameworks/CryptoTokenKit.framework/ctkd
Identifier: ctkd
Version: 79.1.1
Code Type: X86-64 (Native)
Parent Process: launchd [1]
Responsible: ctkd [220]
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 LogiMgrDriver.kext, LogitechHIDDevices.kext, and 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
Incompatible OS X Sierra Kexts
When I upgraded to OS X Sierra 10.12.6 my system wouldn't reboot. As I had seen this before I removed the kexts in/Volumes/Macintosh HD/Library/Extensions but it still wouldn't boot. I was in a hurry to get my system up again so in a rush I removed everything older than 2016 from /System/Library/Extensions and was able to start up again. I don't use the software/hardware related to these kexts so I just left them all off, I'm not sure which was the actual culprit(s). I did keep a backup and my system has been stable since I moved them - note that you cannot modify the `/System` path so you will need to back them up somewhere else.
mkdir /Volumes/Macintosh\ HD/Library/ExtensionsSystemDisabled
mv /System/Library/Extensions/VeryOldKernelExtension.kext /Volumes/Macintosh\ HD/Library/ExtensionsSystemDisabled
> ls -lat /Volumes/Macintosh HD/Library/ExtensionsSystemDisabled
total 0
drwxr-xr-x+ 71 root wheel 2414 Jul 28 14:28 ..
drwxr-xrwx 32 root wheel 1088 Jul 28 14:19 .
drwxr-xr-x 3 root wheel 102 Nov 15 2014 NoSleep.kext
drwxr-xr-x 3 root wheel 102 Jul 8 2013 EnergyDriver.kext
drwxr-xr-x 3 root wheel 102 Jun 6 2013 CUDA.kext
drwxr-xr-x 3 root wheel 102 Apr 19 2013 PdaNetDrv.kext
drwxr-xr-x 3 root wheel 102 Oct 26 2012 hp_Inkjet7_io_enabler.kext
drwxr-xr-x 3 root wheel 102 Oct 26 2012 hp_Deskjet_io_enabler.kext
drwxr-xr-x 3 root wheel 102 Aug 8 2012 FTDIUSBSerialDriver.kext
drwxr-xr-x 3 root wheel 102 Jun 29 2012 hp_fax_io.kext
drwxr-xr-x 3 root wheel 102 May 22 2012 JMicronATA.kext
drwxr-xr-x 3 root wheel 102 May 18 2012 jawbone.kext
drwxr-xr-x 3 root wheel 102 Mar 7 2012 SiLabsUSBDriver.kext
drwxr-xr-x 3 root wheel 102 Oct 12 2011 MindWave.kext
drwxr-xr-x 3 root wheel 102 Aug 17 2011 LGEMobileSolutionFamily.kext
drwxr-xr-x 3 root wheel 102 Aug 17 2011 PTRayUSBFamily.kext
drwxr-xr-x 3 root wheel 102 Aug 17 2011 RIMBBUSB.kext
drwxr-xr-x 3 root wheel 102 Aug 17 2011 RIMBBVSP.kext
drwxr-xr-x 3 root wheel 102 Aug 17 2011 ZTEUSBCDCACMData.kext
drwxr-xr-x 3 root wheel 102 Aug 17 2011 NovatelWirelessWWAN.kext
drwxr-xr-x 3 root wheel 102 Aug 17 2011 PTUMWDrv.kext
drwxr-xr-x 3 root wheel 102 Aug 17 2011 SierraDevSupport.kext
drwxr-xr-x 3 root wheel 102 Aug 17 2011 SierraFSCSupport.kext
drwxr-xr-x 3 root wheel 102 Aug 17 2011 SierraFSRSupport.kext
drwxr-xr-x 3 root wheel 102 Aug 17 2011 SierraHSRSupport.kext
drwxr-xr-x 3 root wheel 102 Aug 17 2011 SMSIWirelessModem.kext
drwxr-xr-x 3 root wheel 102 Nov 21 2010 BJUSBLoad.kext
drwxr-xr-x 3 root wheel 102 Sep 25 2010 HuaweiDataCardDriver.kext
drwxr-xr-x 3 root wheel 102 Oct 28 2007 USBExpressCardCantWake_Huawei.kext
drwxr-xr-x 3 root wheel 102 Jun 6 2007 RemoteControl.USBLAN_usbpart.kext
drwxr-xr-x 3 root wheel 102 Jun 6 2007 Belcarra.USBLAN_netpart.kext
drwxr-xr-x 3 root wheel 102 Jun 6 2007 Belcarra.USBLAN_usbpart.kext
Conversation 437
*.kext. In my case it was some Logitech files, but it could be a different filename in your case. This is the step by step process I took.- Reboot into Recovery Mode by holding
- You should see a prompt asking you to choose a language, then you are in Recovery Mode.
- From the file menu at the top choose
- In Terminal you need to use
- From here you can use
- After the kext files you suspect are causing an issue have been moved to the Unsupported folder type "reboot" to restart the system.
Good luck!Cmd+Rbefore you hear the chime while starting, keep holding while it boots.Utilities, then selectTerminal.cdto change directories to your extensions folder, then usemkdirto make a new directory called "Unsupported". [shell] cd /Volumes/Macintosh\ HD/Library/Extensions/ mkdir Unsupported [/shell]lsto list the files in the directory. Refer to the article and the list of extensions on my system - if they are in the list then they are probably fine. Anything that isn't in the list might be the culprit, so you can move it to the Unsupported folder with themvcommand. Replace "Filename.kext" with the name of the kext file you want to move. [shell] mv Filename.kext Unsupported [/shell]*.kext.bakfirst to see if it will boot. If it does, try to find updated drivers (it looks like Blackmagic released a bunch of new software recently).mount, are you not able to run ls, mv, mkdir, etc? That should be all you need to move the kext files to a new location so that they don't load. If you can send the exact output you get when you try to run the series of commands in the post it might point to the issue.cd /Volumesand then typels -lato see what files and directories are present. Good luck!- 360Controller
- Wireless360Controller
- WirelessGamingReceiver
I also had an issue with therebootcommand yesterday - it told me the disk was locked - but closing the Terminal window and selecting Reboot from the menu did the trick. As for the kext files inSystem/Library/Extensions, I don't see why they couldn't also cause a problem, however from my experience and what I've seen on the Internet it only seems to be ones inLibrary/Extensions./Volumes/Macintosh HD/Library/Logs/DiagnosticReports/?mount -rw /.mount -uw /instead. If that doesn't work I would try to do a disk verify/repair and see if that finds any errors?mountcommand you need to make sure to include a forward slash at the end for "root", somount -rw /. It looks like you did escape the space in "Macintosh HD" the second time, and it seems like you probably already did this since the "Unsupported" folder already exists. My guess is that the lastmvsays "No such file or directory" because you have already moved all the files to "Unsupported". If you want to move them back try the following, and then just run the script at the very end of the post to automatically remove anything that isn't also found in your Recovery Partition. [shell] mount -rw / cd /Volumes/Macintosh\ HD/Library/Extensions mv Unsupported/*.kext . [/shell] Good luck!/Library/Extensionsdirectory when you boot into Recovery Mode. These are the default ones, so you might want to try moving them to/Volumes/Macintosh\ HD/Library/Extensions. There are also kext files in your System folder, but I haven't seen any there conflicting. That said.... maybe it is something else entirely? Good luck!diskutil listto show your drives, thendiskutil mount /dev/disk1s2where disk1s2 is the ID of your disk. Some more details on mounting/unmounting disks here: http://osxdaily.com/2013/05/13/mount-unmount-drives-from-the-command-line-in-mac-os-x/.mount(don't forget the "/" at the end to indicate your root),cd,mkdir, andmv. Good luck!.mv *.kext UnsupportedNote that some of the kext files here are default and don't need to be moved. If you want to copy and paste from this article directly, start Safari in Recovery Mode by entering:/Applications/Safari.app/Contents/MacOS/Safari &Cheers!/Volumeswith "ls /Volumes". You should be able to disable FileVault in Recovery Moe using Disk Utility. Good luck!ls. The last bit of the post is a little complicated, but it basically compares the files in your Recovery partition to the ones on your OS hard drive and only moves the kext files that aren't provided by Apple.mount -uw /to see if that works, if not you could try running First-Aid from Disk Utility. If you have Filevault encryption enabled on the drive, make sure to disable as well. The crash logs can be found in this directory:/Volumes/Macintosh HD/Library/Logs/DiagnosticReports/Good luck!/Volumes/Macintosh HD/Library/Logs/DiagnosticReports/.mv SOURCE TARGETcommand. Assuming the "Unsupported" directory is in your "Extensions", and is your current working directory, the command would look like the following to move the file up one directory, back to "Extensions". [bash] mv ThirdParty.kext .. [/bash]Applications > Utilities > Console, if you are using the command line it's likely in/Volumes/Macintosh HD/Library/Logs/DiagnosticReports/. Good luck!mount -rw /exactly. You could also trymount -u -w /ormount -u -w /Volumes/Macintosh\ HD. Some more info here, the commands should be the same even on Sierra: http://apple.stackexchange.com/questions/92979/how-to-remount-an-internal-drive-as-read-write-in-mountain-lion Good luck!/System/Library/Extensionsas you did. Glad you got it working!/System/Library/Extensionsto see if you have anything old there (I personally removed all the kexts older than 2016). Also check out the console/crash logs to see if there is anything interesting there. Another thing to keep in mind is that I have read that FileVault can bee very slow to decrypt, especially with a full drive, so it might take some time to complete.ls -lat. If you want to move them the easiest way is withfindas explained in this Serverfault Answer - make sure to update for your own source and destination paths. This will get everything 365 days or older, adjust the value for your thresholds. Good luck! [shell] find /sourcedirectory -maxdepth 1 -mtime +365 -type f -exec mv "{}" /destination/directory/ \; [/shell]/Volumes/Macintosh HD/Library/ExtensionsSystemDisabled(note that it is not under the /System path). If that doesn't work you can usecpto copy them and themrm -rfto remove them. You should already be root but tryingsudo rm -rfcan't hurt. You also want to make sure that the drive is mounted read/write withmount -u -w /. All that said booting to a Linux USB will do the trick too :)/System/Library/Extensions/folder to see if there are any old extensions listed there? Using the Mac in target disk mode is definitely a good idea if you have access to a second Mac.$kextsvariable from line 8, so if 8 doesn't work neither will 13. Make sure that you are escaping any spaces in your path, for example"Macintosh HD"becomes"Macintosh\ HD".ls -la /Volumesand see what it says there - you may need to use something other than "Macintosh HD". The other possibility is that you have damage to your drive in some other way and it's not being read properly - you could try using First Aid in Disk Utility or DiskWarrior for rebuilding it. Good luck!System Preferences > Print and Scan? Once there are no printers installed delete the kext files using Terminal and then reboot, it shouldn't keep creating the files. There are also some pretty involved guides out there for getting rid of Canon drivers, for example http://smallbusiness.chron.com/uninstall-canon-driver-mac-70217.html and http://macuninstallguides.com/remove-canon-printer-driver-on-mac.html. Good luck!ls /Volumesand make sure that you have unlocked your drive if using FileVault. Good luck!/System/Library/Extensions/or/Library/Extensions/Good luck! Jfind . -mtime +365to get a list of old files and then move them manually. If that doesn't work just list the files sorting by time usingls -lat, the oldest files will be listed last.cd /Volumesand thenls -lto list the folder contents. If you see a match for your drive here replace "Macintosh HD" with that name and then proceed with everything else the same. Good luck! J