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

Possible Duplicate:
How to automatically boot from Linux distro to Windows?

I have both Windows 7 and Debian installed on my computer. I thought it would be cool if you could restart your computer, and somehow boot into the other OS. So, instead of rebooting, waiting, picking the "other OS" in GRUB, you could just enter a command, go water your plants or whatever, when you get back, you are where you want to be.

Coolest thing would be if you could give reboot an argument what OS to load next. Possibly, this is not possible for computer architecture reasons?

But then, as a possible workaround, what about changing the GRUB menu, so the "other OS" gets the default slot, and then when you reboot, timeout occurs, you get the default slot (the desired "other OS"), bingo?

99% of the time I'm using Debian so the possibility of a reboot into Windows is what would be most useful to me. But ironically, I almost never reboot Debian -> Debian, Windows 7 on the other hand, I have to reboot all the time. So really, a default Win to Win would be best there.

What do you think? Tell me all about it! Happy New! :)

share|improve this question

migrated from Dec 31 '11 at 15:19

This question came from our site for professional and enthusiast programmers.

marked as duplicate by random Dec 31 '11 at 17:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 2 down vote accepted

If grub lived on a partition accessible by windows, you could write a script to modify grub.cfg so that when it restarts, the new is would be default. Obviously this would be done on the Linux side too.

share|improve this answer
Hm, I have a grub.cfg, and a /etc/default/grub - it says (in grub.cfg) I should not edit it, but rather the other file, and then run update-grub. That works (both files have the default OS var changed). Simplest way to do it would (I guess) be to use the tool grub-set-default but when I run it with a digit nothing happens. It does not complain but the files are not changed. Maybe there is some inconsistencies between tool and GRUB? What do you think? – Emanuel Berg Jan 1 '12 at 1:24

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