Skip to content

Instantly share code, notes, and snippets.

@opshope
Created January 4, 2016 17:48
Show Gist options
  • Save opshope/9055e5f2d917c7830d02 to your computer and use it in GitHub Desktop.
Save opshope/9055e5f2d917c7830d02 to your computer and use it in GitHub Desktop.
Fixes a freezing loading bar at boot screen. Run from single user mode or over ssh.
#!/usr/bin/env bash
#try resetting pram & smc first
#try to ssh into the the machine if it appears to be stuck booting (50% loading bar)
#if that fails, try booting holding command+r and repair disk/repair disk permissions
#some comment from internet: verify if the user has the attribute which again in our case they always do when this issue happens because there were some machines that were manually bound a long time ago by some of the PC techs and they weren't paying attention to the checkboxes in Directory Utility so this attribute would get created.
#dscl . -read /Users/<user> OriginalHomeDirectory
#dscl -u <admin username> . -delete /Users/<user> OriginalHomeDirectory
rm -Rfv /System/Library/Caches/*
rm -Rfv /private/var/db/BootCache.playlist
# rm -v /usr/standalone/bootcaches.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment