Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.