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?