Super User is a question and answer site for computer enthusiasts and power users. 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 am using Grub2 to select between Windows 7 and Ubuntu. I was wondering how I might be able to communicate with Grub2 with a physical switch to tell it which I want. I have plenty of experience with arduino type electronics, is there some way to communicate the state of a switch through a serial to USB connection? Or is there something even more straight forward like say the parallel heads on my motherboard?

Additionally is there a way to have a shortcut on each system that tells the computer to restart and writes to a file that I want it to default boot into the other system. Then when Grub boots up it sees it, clears that file or whatever then boots into that system?

share|improve this question

As far as I know , Grub2 is almost an OS. You can write yourself a module that does exactly what you want. A good guide can be found here.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .