Skip to main content
p. 131

5.7 Chainloading Other Operating Systems

UEFI makes it relatively easy to support loading other operating systems because you can install multiple boot loaders in the EFI partition. However, the older MBR style doesn’t support this functionality, and even if you do have UEFI, you may still have an individual partition with an MBR-style boot loader that you want to use. Instead of configuring and running a Linux kernel, GRUB can load and run a different boot loader on a specific partition on your disk; this is called chainloading.

To chainload, create a new menu entry in your GRUB configuration (using one of the methods described in the section “Generating a New Configuration File”). Here’s an example for a Windows installation on the third partition of a disk:

menuentry "Windows" {
insmod chain
insmod ntfs
set root=(hd0,3)
chainloader +1
}

The +1 option tells chainloader to load whatever is at the first sector of a partition. You can also get it to directly load a file, by using a line like this to load the io.sys MS-DOS loader:

menuentry "DOS" {
insmod chain
insmod fat
set root=(hd0,3)
chainloader /io.sys
}