Whole document tree
For Multiboot-compliant kernels, GRUB can load them in a consistent way, but, for some free operating systems, you need to use some OS-specific magic.
4.1 How to boot operating systems
GRUB has two distinct boot methods. One of the two is to load an operating system directly, and the other is to chain-load another boot loader which then will load an operating system actually. Generally speaking, the former is desirable, because you don't need to install or maintain other boot loaders and GRUB is flexible enough to load an operating system from an arbitrary disk/partition. However, the latter is sometimes required, since GRUB doesn't support all the existing operating systems natively.
4.1.1 How to boot an OS directly with GRUB
Multiboot (see section `Motivation' in The Multiboot Specification) is the native format supported by GRUB. For the sake of convenience, there are also support for Linux, FreeBSD, NetBSD and OpenBSD. If you want to boot other operating systems, you will have to chain-load them (see section 4.1.2 Load another boot loader to boot unsupported operating systems).
Generally, GRUB can boot any Multiboot-compliant OS in the following steps:
Linux, FreeBSD, NetBSD and OpenBSD can be booted in a similar
manner. You can load a kernel image by the command
4.1.2 Load another boot loader to boot unsupported operating systems
If you want to boot an unsupported operating system (e.g. Windows 95), chain-load a boot loader for the operating system. Normally, the boot loader is embedded in the boot sector of the partition on which the operating system is installed.
However, DOS and Windows have some deficiencies, so you might have to use more complicated instructions. See section 4.2.6 DOS/Windows, for more information.
4.2 Some caveats on OS-specific issues
Here, we describe some caveats on several operating systems.
Since GNU/Hurd is Multiboot-compliant, it is easy to boot it; there is nothing special about it. But do not forget that you have to specify a root partition to the kernel.
It is relatively easy to boot GNU/Linux from GRUB, because it somewhat resembles to boot a Multiboot-compliant OS.
Caution: If you use an initrd and specify the `mem='
option to the kernel, to let it use less than actual memory size, you
will also have to specify the same memory size to GRUB. To let GRUB know
the size, run the command
GRUB can load the kernel directly, either in ELF or a.out format. But this is not recommended, since FreeBSD's bootstrap interface sometimes changes heavily, so GRUB can't guarantee to pass kernel parameters correctly.
Thus, we'd recommend loading the very flexible loader `/boot/loader' instead. See this example:
GRUB can load NetBSD a.out and ELF directly, follow these steps:
For now, however, GRUB doesn't allow you to pass kernel parameters, so it may be better to chain-load it instead, for more information please see 4.1.2 Load another boot loader to boot unsupported operating systems.
The booting instruction is exactly the same as for NetBSD (see section 4.2.4 NetBSD).
GRUB cannot boot DOS or Windows directly, so you must chain-load them (see section 4.1.2 Load another boot loader to boot unsupported operating systems). However, their boot loaders have some critical deficiencies, so it may not work to just chain-load them. To overcome the problems, GRUB provides you with two helper functions.
If you have installed DOS (or Windows) on a non-first hard disk, you
have to use the disk swapping technique, because that OS cannot boot
from any disks but the first one. The workaround used in GRUB is the
This performs a virtual swap between your first and second hard drive.
Caution: This is effective only if DOS (or Windows) uses BIOS to access the swapped disks. If that OS uses a special driver for the disks, this probably won't work.
Another problem arises if you installed more than one set of DOS/Windows onto one disk, because they could be confused if there are more than one primary partitions for DOS/Windows. Certainly you should avoid doing this, but there is a solution if you do want to do so. Use the partition hiding/unhiding technique.
If GRUB hides a DOS (or Windows) partition (see section 13.2.5 hide), DOS (or Windows) will ignore the partition. If GRUB unhides a DOS (or Windows) partition (see section 13.2.15 unhide), DOS (or Windows) will detect the partition. Thus, if you have installed DOS (or Windows) on the first and the second partition of the first hard disk, and you want to boot the copy on the first partition, do the following:
4.2.7 SCO UnixWare
It is known that the signature in the boot loader for SCO UnixWare is
wrong, so you will have to specify the option `--force' to
This document was generated by Jason Thomas on February, 4 2002 using texi2html