Autorestart NUC/ROCK after a power cut

I remember seeing something about this .

I have a 10i7 NUC running ROCK , I know there is a setting in the BIOS for “Restart on Power Restore” . I would like to put my NUC in a relatively inaccessible place but with our current power outages being 2 or 3 times daily it would be messy to have to restart the NUC manually so I was wondering if auto restart was an option

Has anyone tried this and does it work reliably with ROCK as opposed to Windows ?

Many power cuts are survived by database and hardware, but there is always the potential of damage as well. With 2 or 3 a day, I would hook the NUC up to a UPS.

ROCK can’t communicate with the UPS and do a graceful shutdown if the UPS runs out of juice as well, but if the cuts aren’t too long it will just happily keep running until power comes back.

You would want the UPS in a place where you can’t hear it as the UPS fans are loud when it recharges

2 Likes

I don’t see why it wouldn’t work - I guess one concern would be disk or database corruption when the machine is cut off when the power goes out … having a UPS would definitely be a safer option - and if you have a “smart” UPS, you could get it to power down on failure. You wouldn’t be able to do that with ROCK though, mind - it would need to be linux with Roon installed, instead of the ROCK image.
(are you in ZA by any chance? we have loadshedding here all the time, so I’m familiar with how to mitigate)

Add a Raspberry Pi (or other SBC) into the mix, and use this to communicate with the UPS. When running on battery, it can send a shutdown signal to ROCK using http.

Then, set the NUC BIOS to boot when power is restored.

2 Likes

Yes. It works with the same independent of ROCK, linux, Windows.

With respect to the potential for corruption, it’s equivalent to pulling and re-inserting the mains plug and then restarting the machine. This is to say that using this feature is probably no worse than what you’re doing now other than to potentially cause more restart cycles if you tend to wait for your power to stabilize before manually restarting.

A UPS combined with an option for controlled shutdown is obviously advised. Power outages are reasonably uncommon for me. I use the BIOS setting and don’t have a UPS.

1 Like

Yep how did you guess ? I am in Fourways JHB.

I have a UPS on the main Windows PC’s in the study but not at the moment on Hi Fi kit which is where the NUC will be (is now, groveling and cable changes now complete)

The UPS is on lead acid batteries so using it to power anything and discharging it too far eats the batteries. It’s there just to allow a graceful shutdown. The NUC has had far too many “ungraceful” shutdowns of late as we tend to shut down everything in advance of the scheduled shutdown. The NUC seems to get forgotten by my better half . Out of sight out of mind ?

A graceful shutdown also seems to negate the restart function. According to a FAQ on the Intel site If the NUC is closed down , then powered off it will NOT reboot but will stay in in the closed down state when power is restored. It almost needs a non graceful shutdown for the restart to function

I will monitor as best I can, the setting in the BIOS works fine, pull the plug then re insert and it reboots.

Corruption is the risk I agree but I keep plenty of BU’s and add very little new content , but the whole system works on corruption doesn’t it :smiling_imp: :smiling_imp: :smiling_imp:

Our power cuts are nominally 2.5 hours on a schedule , but hopefully very occasionally 4.5 hrs . They happen most days 3 times a day

We power down and unplug before going to bed mostly, we even unplug the UPS

LOL - yes, I fgured it must be somewhere in sunny ZA - I’m also in the north of Joburg, so I totally get it.
We’ve bitten the bullet and installed solar and batteries, because I run a business from home, and have UK client, so I just can’t afford to be off for any period of time.

Martin’s suggestion of adding a raspberry-pi to the mix to facilitating a safe shutdown is a really good idea, and it doesn’t even have to be physically located in the same space if it’s going to interact with the NUC over http - I would consider getting another smaller UPS, if there’s a possibility of doing that.

And yes, LMAO - the whole of Eksdom is corrupt, it’s why we’re in this situation in the first place :stuck_out_tongue:

1 Like

Just for interest , my first AutoStart went well except the Tidal connection, obvioulsy the NUC starts quicker than the internet connection !!

Not too good …

I just dug this out of my notebook.

If you have a Linux box connected to the UPS shared by the NUC (ROCK) you can initiate a shutdown of ROCK by executing the following:

I use apcupsd with my UPS on Ubuntu and have added the following to the shutdown script:

# Power off Roon server
$ curl http://rock.local/1/poweroff &

# Power off Shinobi NVR
$ ssh martin@shinobi.local "sudo /sbin/shutdown -h now" &

To login remote server, use a certificate (ssh-keygen -b 4096) and add the following to /etc/sudoers on the remove machine.

martin ALL = NOPASSWD: /sbin/shutdown
1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.