ChainLoading - Windows

For DOS/Windows, Grub is not able to multiboot them since they are not conform to its specification. In this case, Grub provides an alternative mechanism to boot the Windows partition: chain-loading. The full specification is available at: https://www.gnu.org/software/grub/manual/grub/html_node/DOS_002fWindows.html

Instructions for Boot

These are the instructions for setting up boot sequences for GNU/Linux. They are multi-boot standard procedures.

#1 - Perform Primary Partition Remap (optional)

If your boot drive got miss-arranged from being the 1st disk, the Windows is not bootable at all. Hence, you need to use drivemap command to swap it.

grub> drivemap -s (hd0) (hd1)

Caution: you should set the boot order properly inside your BIOS/firmware, not relying on bootloader to do such swapping.


#2 - Hide / Set Primary Partitions (optional)

If the disk has multiple primary partitions (e.g. multiple Windows), you need to use parttool command to set the hidden status using + OR - sign in order to boot into the correct Windows. The command is as the following pattern:

grub> parttool (hd0,1) hidden-        # don't hide (hd0,1)
grub> parttool (hd0,2) hidden+        # hide (hd0,2)

The question is "to hide?":

  • - means no
  • + means yes


#3 - Set Root Partition

You need to set your root partition via set command:

grub> set root=(hd0,1)


#4 - Set Chainloader Flag

Next is to set the chainloader flag using chainloader command:

grub> chainloader +1


#5 Set Bootable Flag for Root

Now we need to set the bootable flag for the root partition before booting into it. use parttool command with boot argument:

grub> parttool ${root} boot+

The question is "to set root as bootable?":

  • - means no
  • + means yes


#6 - Boot it

Once done, you can proceed to execute boot sequences using the boot command and release the boot sequence to that operating system.

grub> boot

That's all about chainloading for DOS/Windows.