13

I want a machine that loses power to automatically reboot when power is available. I've looked around and haven't found a solution that works for 11.04.

Purportedly at one point you could do:

echo 'server_mode=1' > /proc/pmu/options

However, my install doesn't have a /proc/pmu folder. I assume this is still possible, where is the setting available?

EDIT:

If this isn't possible from the OS, is there a way to script these sorts of changes to BIOS or is this something that requires physical access to the machine on boot to manually edit the settings?.

Organic Marble
  • 22,803
  • 12
  • 65
  • 118
sarwar
  • 233
  • 1
  • 2
  • 6

3 Answers3

19

That's not something you can control in your operating system. That's what the BIOS is for. In most BIOS setups there'll be an option like After power loss with possible values like Power off and Reboot.

RobinJ
  • 8,800
  • 8
  • 46
  • 69
4

In the BIOS, look for something like "always restart on power failure"

In Ubuntu, edit /etc/default/grub.

sudo nano /etc/default/grub

and add

GRUB_RECORDFAIL_TIMEOUT=5

Then run:

sudo update-grub

This will make your machine display the boot options for 5 seconds before it boot the default option (instead of waiting forever for you to choose one).

MadMike
  • 4,234
  • 8
  • 28
  • 50
Anton
  • 41
  • 1
-3

You would need a Uninterruptible Power Supply - Soft shutdown with an auto boot.

You might want to look here : http://www.apcupsd.com/ for a recommendation.

Ringtail
  • 16,011
  • 12
  • 60
  • 183
  • 1
    A UPS won't auto boot the machine, which is what the OP is asking. It will restore mains power, sure, but the BIOS has to kick the machine into action – Bevan Jan 17 '19 at 05:51