I have a PC in our server room which dual boots to windows and linux.

Obviously when we need to reboot the box we can get onto which ever system it is running and reboot.

However, I cannot select the OS to boot at the bootloader for obvious reasons.

Is there a way, other than installing a KVM, where we could replace the bootloader with something that accepts an ssh connection and lets me boot accordingly.

I can't believe I'm the only person who would find this useful.

Regards Mark.

  • "I can't believe I'm the only person who would find this useful." - You're not :) Unfortunately, the answers to this question don't help me with my "Install Linux distro remotely with Anaconda" question :(
    – user66001
    Aug 27, 2013 at 21:13

3 Answers 3


Most Linux bootloaders provide a way to select a particular boot menu item just for the next reboot:

  • lilo -R cmdline — for LILO;
  • echo "savedefault --default=2 --once" | grub --batch — for GRUB Legacy;
  • grub-editenv could be used for GRUB 2 (here you should set prev_saved_entry to your normal default, and set saved_entry to the system which needs to be booted once, but all this depends on code present in grub.cfg).

You can keep Linux selected by default, and boot Windows when needed using such boot-once mechanism. This may be not very convenient when you need to reboot Windows multiple times, but without boot-once changing the bootloader configuration could be hard when the system is stuck booting Windows by default. Although if you add another very small Linux installation, which boots by default, listens for an SSH connection for a minute, and then specifies a boot-once choice configured in some file and reboots, you may have even persistent Windows reboot configuration with the ability to reconfigure it during that delay.

Another option, if you are using Windows earlier than Vista/2008 (e.g., still using NTLDR and boot.ini), is to use NTLDR as the primary boot manager and chain to the Linux bootloader by loading its boot sector saved in a file. Then you could be able to edit boot.ini both from Windows and Linux (if you are not afraid to use ntfs-3g to access Windows system disk from Linux). However, this scheme is easier to break (especially when using LILO as Linux bootloader, which will require updating the boot sector file after every reconfiguration).

Yet another option is to use PXE remote boot with PXELINUX and chain.c32 to continue boot from a particular HDD partition, which then could be switched by changing a config file on the TFTP server — however, this needs cleartext traffic between the machine and boot servers (DHCP and TFTP).


You may be also interested in HW solution, see Serial terminal over ethernet


According to http://en.wikipedia.org/wiki/Comparison_of_boot_loaders#Technical_information http://kboot.sourceforge.net/ accepts SSH connections to it.

Disclaimer: I have not used kboot before, nor know much about it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.