Autoboot on Mac Mini running HA OS 8.x

I’m trying to enable my Mac Mini (late 2012) running HA OS to auto boot after power failure.

Most articles online I see recommend using setpci to enable this feature.

@reboot /usr/bin/setpci -s 00:1f.0 0xa4.b=0

I have been able to install pciutils using:

apk add pciutils

but then setpci command gives me the following error:

pcilib: Cannot open /sys/bus/pci/devices/0000:00:1f.0/config

I can see the file is rw and I am running as root.

Does anyone have an idea what I’m doing wrong?

For me I just use the command line tools in HA to do that. The problem with restarting a Mac is that you need super user permissions (sudo) which can be problematic if trying to do it on a headless command. You can, however, have Applescript do the job for you using System Events by issuing the following command via a remote SSH:

osascript -e 'tell app "System Events" to restart'

Perhaps that will give you some better results. You will want to set up a stored SSH key on HA (ssh-keygen) so you don’t have to log into the SSH request, but otherwise it should be straight forward.

@mdvickst I had the same issue. Simply create a Ubuntu Live USB, start it up and run the command from there. The setting is persistent on my Mac Mini Mid 2011. Details can be found here:


I got it working on HA OS with this addon:

1 Like

This. This is the way