Dual boot a headless machine?

Solution 1:

You can have Linux boot by default and, when you want Windows, arrange for it to boot the next time only.

  • For Grub 1, there is an example under “Booting once-only” in the manual. Make menu.lst look like:

    default saved
    
    title Linux
    root (hd0,0)
    kernel /vmlinuz root=/dev/sda1 ro
    
    title Windows
    root (hd0,1)
    chainloader +1
    savedefault 0
    

    The savedefault 0 line under Windows means that if you boot Windows, the next boot will boot Linux. When you want to boot Windows, from Linux, run grub-set-default 1 and reboot.

  • For Grub 2, there's a utility to do this automatically. You'll need to have GRUB_DEFAULT=saved in /etc/default/grub. Then run grub-reboot Windows from Linux when you want the next boot to be Windows; the boot after that to be Linux.

Another possibility that requires more setup but gives you more flexibility is to install grub on a small FAT partition. Then you can easily edit its configuration file from either operating system.