Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com 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.

1 Answer 1

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 or ask your own question.