Linux not booting when keyboard is unplugged

Hello,
I have two linux pc towers and both works normally.
I have only one keyboard.
When i plug the keyboard into the first pc, I connect to 2nd pc remotely and send reboot command. Second pc stucks on black screen.
Could you please guide me what I should do?

Thanks in advance
Boris

When does it get stuck? During the "BIOS" part of the boot, or the linux part?

Either:

  1. Look in the PC BIOS to see if there's a setting (which may allow the machine to boot without a keyboard)

or

  1. Buy another keyboard.

Thanks for your suggestions,

get stuck on bios status. Ubuntu does not come alive..

I will check once again bios settings.

All the best
Boris

There is also typically a BIOS option for "Press F1 to continue on error" Something like that. Disable that function, so that its not sitting there waiting for you to hilariously press F1 (on the non-existant keybaord) to ack the error that there is no keyboard. That's what I've always done on any headless servers.

1 Like

Thanks,
I got rid of similar problems as you have leaded.
I made below changes on ubuntu and it works when keyboard is not plugged or when ubuntu is not become alive after electricity interruptions:

Run Gedit as root (gksu gedit).
  Open*/etc/default/grub*and locate the following lines:
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
  Change the values as follows:
GRUB_HIDDEN_TIMEOUT=10
GRUB_HIDDEN_TIMEOUT_QUIET=false

Also add this line:
GRUB_RECORDFAIL_TIMEOUT=10

  Save and run*sudo update-grub*from your terminal and reboot.

Regards
Boris

1 Like

Beware that electricity interruptions are liable to reset your BIOS settings to default, after which it will "forget" it was supposed to do things like boot without a keyboard, or turn on after power loss. Consumer grade routers are also liable to forget their settings and go stupid. Very irritating.

If you are not dealing with server-grade hardware, the best solution is a sturdy UPS which is regularly tested. (If you are dealing with server-grade hardware, the best solution is still a sturdy UPS which is regularly tested.)

Or, if your needs are small, there was a late-90's-era PC which had actual DIP switches for "resume after power loss". It'll never forget. :wink:

1 Like