Thursday, May 14, 2015

When a remote headless server does not respond

My home server (tucked up cozily inside my false ceiling) has been running unattended for a few months now. It has been BIOS configured to auto boot post an power failure. However, it stopped responding tonight. What an absolute nightmare!

My optiplex

I had to bring down the brick and set up the whole shebang of monitors, keyboard, network cable around it just to 'see' why it had stopped responding.

Once the monitor came on, I realized that the server was hung on the GRUB screen waiting for user input. WTF! It should have auto timed out and taken the first option in the list, booting normally.

Upon digging a bit, realized that the default GRUB behavior on previous failed boots is to show the GRUB screen and wait for user input. Logical but not very productive for unattended servers. Luckily, Linux being linux, there is a simple option to change this behavior and let Ubuntu boot irrespective of prior failed boots.

One has to add the following variable to /etc/default/grub and reload grub

GRUB_RECORDFAIL_TIMEOUT=0

BTW, don't forget to run update-grub after editing /etc/default/grub!

No comments: