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.

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
1  
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
add comment

2 Answers

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
2  
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
add comment

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
add comment

Your Answer

 
discard

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.