Thursday, January 5, 2017

Windows Server 2012 dual boot with Centos 7



I needed a system that would dual boot Windows Server 2012 with Centos 7.
 I used half of the physical drive to create the Windows NTFS partition and installed Windows Server 2012 there.  Then with the remaining space, I installed Centos 7 on the remaining free space.

As expected, the Windows install does NOT show up in the boot loader menu.
Here is the instructions I followed to get it to display the Windows OS option.  Worked without issues.

  1. to find out, on what partition Windows is actually installed (for me it is 0/sda1), run
fdisk -l
for example, it shows
.... /dev/sda1 * 2048 718847 358400 7 HPFS/NTFS/exFAT ....
  1. to find out partion UUID, by using blkid /dev/sda1 and find matching UUID
blkid /dev/sda1
  1. then add the menu entry to /boot/grub2/grub.cfg like
menuentry "Windows 2012 R2" --class windows --class os {
     insmod ntfs
     set root='(hd0, 1)' 
     search --no-floppy --fs-uuid --set=root XXXXXXXXXXXXX(UUID from step 2)
     chainloader +1
}


Worked like a champ!

Reference:  
 Windows Server 2012 R2 and Centos 7 dual boot

No comments:

Post a Comment