Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 have a dual boot system (Linux and Windows) that I normally run headless and which boots by default into Linux (which is what I use mainly). This all works fine, except that on occasions when I want to boot Windows I have to plug in a keyboard and monitor just to select Windows in the initial grub boot screen. I'm wondering if there is an easier way to do this ? I don't mind if I have to boot Linux first, I just want to be able to reboot into Windows occasionally without having to plug in any peripherals.

share|improve this question
No matter what you do, you will need a way to send signals to the system when it boots. If it is headless, what do you have available ? a mouse ? a couple of user-programmable buttons ? a serial console ? network access only ? – b0fh Jul 20 '10 at 11:54
Also, have you considered using virtualisation instead of dual-booting ? – b0fh Jul 20 '10 at 11:54
@bofh: it's just a generic PC so I have network, USB, the usual on-board peripherals, etc. I was wondering if there might be a way of setting something up on a USB stick and having the system boot from that if it is inserted ? – Paul R Jul 20 '10 at 13:41
@bofh: I don't think virtualization will help (assuming you mean running one or both OS's as VMs) as I need to run things like profiling tools which need direct access to CPU performance registers etc. – Paul R Jul 20 '10 at 13:42
that seems simpler - you could have USB having higher boot priority than windows, and have the linux install there – Journeyman Geek Jul 20 '10 at 14:13
up vote 1 down vote accepted

There is no real simple way to do this as grub is only controllable via keyboard at boottime and has no remote control functionality.

Two possibilities come to my mind to solve this problem. First one is scripting based: Write some simple script to adjust your grub.conf/menu.lst before reboot. See default entry in configuration section in grub manual:

# By default, boot the first entry.
default 0

Set this to the entry you want to boot.

This solution requires you to install a ext2/ext3 driver to your windows, to change the crub.conf/menu.lst from a booted windows system.

The second solution i am thinking about might be some adjusted PXE boot where the configuration of the boot menu of the pxe image will be set to the according local disk.

This link provides a lot of infomation including "boot from first disk" setting up pxe boot

I never tried this but i think it might be possible.

Anyways those solutions seem somewhat hacky to me. Maybe someone else comes up with a better one.

share|improve this answer
Thanks for all the suggestions - I'll read up on these some more. – Paul R Jul 20 '10 at 13:44
If you choose to edit menu.lst, you don't absolutely need Windows to be able to modify it: you can also set up grub 1 so that it boots Windows once and then Linux the next time. There's an example in the grub manual under “booting once-only”. – Gilles Jul 20 '10 at 17:47
@Gilles: thanks - I'll read up on that - not having to make any significant changes in the Windows environment is always welcome. – Paul R Jul 20 '10 at 21:25

I am just looking into something similar and looks promising:

13.1.7 fallback

If this variable is set, it identifies a menu entry that should be selected if the default menu entry fails to boot ...

... that feature however seems to be discontinued in Grub2 ... in my case might do the trick, but it probably won't in yours:

4.3.1 Booting once-only

You can teach GRUB to boot an entry only at next boot time. Suppose that your have an old kernel old_kernel and a new kernel new_kernel. You know that old_kernel can boot your system correctly, and you want to test new_kernel. ...

share|improve this answer
Huh - probably way too old a question ... – axm Jun 17 '15 at 20:21
Please quote the essential parts of the answer from the reference link(s), as the answer can become invalid if the linked page(s) change. – DavidPostill Jun 17 '15 at 20:31

edit grub to have windows first before you reboot, i suppose - it'll need a little planning, but i suppose you could have a pair of alternate config files which you rename to the correct one before boot

share|improve this answer
Thanks - I don't know a lot about grub - can you tell me which file I'd need to edit ? – Paul R Jul 20 '10 at 10:41

Your Answer


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.