How to run Windows via grub2

What this page?

This page is written how to run Windows via grub.

Is it possible?

Yup, you can run Windows 2 ways:

  • Copy grub2 to MBR on the partition that you installed Linux, then create image file with dd, and let bcd recognize it.
  • Copy grub2 to MBR on the hard disk (note that it is not partition.), then run Windows via grub2.

You can get many articles the first way, so if you want run Windows like that way, please google it.
Instead, I describe the second way.

How to do

1:Install Windows. Note that you have to make freespace enough to install Linux.
2:Assume that the partition you installed Windows is /dev/sda1
3:Install Linux in the extra space that you made at step 1. After this, install grub to MBR on the hard disk (i.e. /dev/sda).

You may edit grub's configuration files if needed. For details, look at documents of the distribution you installed.
Especially, you may need to edit grub.cfg or /etc/grub.d/40_custom. this is an example.

menuentry "Windows 7" {
    set root=(hd0,2)
    chainloader +1
}