Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to be able to set my target disk and reboot in windows remotely, can this be done?

I have SSH set up and am able to log in from outside of my network.

share|improve this question
up vote 0 down vote accepted

If I understand correctly, I don't see why not. Does each "target disk" have an entry in the GRUB menu? If so, there are a number of strategies you could use. If you are content with having a default boot option, you could simply edit the file /boot/grub/grub.cfg to change the line set default="0" (or whatever number is set) to the one you want, then reboot ("sudo init 6", if I remember correctly).

This file says "DO NOT EDIT THIS FILE" at the top, but that is only because it gets regenerated, and will reset to the default when this happens, either during an update, or when you do an update grub command explicitly.

This can easily be scripted if you don't want to edit the file. The easiest way is to use sed, which can find and replace that line in the grub config file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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