9

I wondering whether it is possible to set up a headless machine (application server) in a dual boot configuration. The goal is to have linux (debian lenny or sid) and windows (XP pro, no use upgrading to anything newer because my legacy apps won't work) installed on separate partitions, and be able to reboot into the other OS, all through remote means (RDP / SSH). I can probably figure out how to make grub boot into windows by default, and automate the whole thing for convenience, so the 'reboot into windows from linux' part is covered. I'm worrying about the other side of things though - changing the grub configuration from windows.

An alternative would be two separate bootable harddisks and a way of changing BIOS settings from both linux and windows (again, without actually physically being at the machine).

The machine in question is an audio workstation, so virtual machines are not an option (I need every bit of performance).

tdammers
  • 203

2 Answers2

15

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.

0

If you enable the special administration console, the XP bootloader is accessible via RS-232.