JAMF Boot Loop

rburdige
New Contributor II

Every once in a while, we will see a system fall into a boot loop. Not a problem. But something else is up when you start to see it every few days. Every time it is a com.jamf.reboot.xxxxxx.plist or something like that. It is not rocket science to fix it when every system is on Prem, but what to do when they are off-site far far away. 

 

We have them start their systems in Safe mode. While they do that, we add them to our boot loop policy and have them run the script from Self-service. You can have it run in the background as well. The script is simple. it looks for any plist that has the word reboot in the file name and removes it. After that we restart the system and hope that it worked. so, far 99.99% of the time it works. 

Here is the shell script: 

#!/bin/bash

for path in /Library/LaunchDaemons /Library/LaunchAgents; do
for file in $(ls -1 $path | grep -i reboot); do
sudo rm -rf $path/$file
done
done

1 REPLY 1

rburdige
New Contributor II

I just went back, and it is a restart, not a reboot. 

Revised Script:

#!/bin/bash

for path in /Library/LaunchDaemons /Library/LaunchAgents; do
for file in $(ls -1 $path | grep -i restart); do
sudo rm -rf $path/$file
done
done