Nov 13, 2014

Grub: Windows multi boot, mutually exclusive partitions

Suppose we have this filesystem layout:

  (hd0,0) - Centos 6
  (hd0,1) - Windows Server 2003
  (hd0,2) - Windows Server 2003
  (hd0,3) - Windows Server 2012

In /etc/grub.conf, insert or update the following boot entries for windows (centos is already present):

  title windows 2003 (hd0,1)
    unhide (hd0,1)
    hide (hd0,2)
    hide (hd0,3)
    rootnoverify (hd0,1)
    chainloader +1
    makeactive

  title windows 2008 (hd0,2)
    hide (hd0,1)
    unhide (hd0,2)
    hide (hd0,3)
    rootnoverify (hd0,2)
    chainloader +1
    makeactive

  title windows 2012 (hd0,3)
    hide (hd0,1)
    hide (hd0,2)
    unhide (hd0,3)
    rootnoverify (hd0,3)
    chainloader +1
    makeactive

When any one windows boots up, all other windows partitions will be hidden, and therefore be protected from any unwanted modifications.

No comments: