Old article from my previous blog, but can be useful :
Hi,
Was asked at work to look into the possibilities of dual booting Ubuntu 10.04 & Windows Server 2008 R2, but enabling reboots between the two operating systems by using just RDP & SSH.
Grub2 , grub-choose-default & ext2fsd did the trick for me, here is small guide how i got this working :
1 Install your Windows OS first. (In my case HPC 2008 R2)
2 Install your linux os second, using a separate partition, grub2 will automatically detect and add your Windows partition to the boot list. (in my case i used Ubuntu 10.04 LTS, remember to choose ext2/3 for your linux partition, as ext4 is not supported by ext2fsd (however it might work ok))
3 In Ubuntu 10.04 , i had to modify /etc/default/grub , change the line GRUB_DEFAULT=0 to GRUB_DEFAULT=saved
4 Update the change you made in step 3 by executing : sudo update-grub
5 Now check your /boot/grub/grub.cfg , count the lines that start with “menuentry” , the first one is treated as 0 (Zero)
6 To reboot into Windows at the next reboot from Linux, and your entry for windows is 3 in the list in grub.cfg , you would run sudo grub-reboot 3 , and then reboot (this tells grub to reboot into windows ONCE, if you want for example Windows to be the default entry, you can issue grub-set-default 3
7 Reboot into Windows, download ext2fsd , if you are using Windows 7 or Server 2008 R2 , you need to start the installation by running it in Compatibility mode , in my case Vista mode worked fine in hpc 2008 r2.
8 Start Ext2 Volume Manage, choose your ext partition, right click and choose “Show Properties” , click on “Mount Points” and choose a drive letter for your ext partition in Windows, then choose “Ext2 Properties” and put a tick in “Mointpoint for fixed disk, need reboot” and then apply & restart windows.
9 Download and install grub-choose-default the Gui is pretty self explanatory, just choose which os to boot at the next reboot, and it will
So now you can use the gui of grub-choose-default in Windows to control the Grub2 boot menu, and grub-reboot command in Linux.
I.e quite handy, now you don’t need to use your remote management feature (like ilo) and sit and wait for the grub boot menu to appear on your headless server. (you might not even have ILO or a keyboard and mouse attached to the server)