HOWTO boot FreeBSD, Linux, and Windows XP with GAG, GRUB, LILO, and BootEasy

Abstract

This posting endeavours to allow users to successfully boot the following Operating systems: Windows XP, most GNU/Linux distro, and FreeBSD/PC-BSD; using the following boot loaders: GAG, GRUB, LILO, PC-BSD (aka BootEasy). The target audience are PC-BSD users coming from Linux.

There will be several references provided at the end of the posting.

Using the Graphical Boot Manager, GAG

Simply boot off the install media and follow the on screen instructions.

Note well that must install a boot loader such as LILO or GRUB in a Linux / partition in order to boot Linux from GAG, like most other abstract boot loaders.

Using GNU GRUB

In order to boot PC-BSD from GRUB, you must tell GRUB which drive, slice, and
partition to load from; usign GRUBs own notation
syntax
.

The systems kernel is stored on disk as /boot/kernel/kernel and it’s Loadable Kernel Module (LKM) drivers are stored in the same directory; with a .ko suffix. Although it is possible to load the kernel directly, it is better to load stage three instead, which gives you an easier interface to loading the desired kernel.

You will have to edit the GRUBs configuration file. The name and location of GRUBs configuration varies based on your Operating System. Under Debian (and thus Ubuntu), OpenSUSE, and FreeBSD based systems, you will find it as /boot/grub/menu.lst. On Fedora/Red Hat Linux and Gentoo based systems you will find it in /boot/grub/grub.conf. Many distros may provide a symbolic link to /etc/grub.conf, please refer to your operating systems documentation if you can not find the file.

Open it as root and edit it accordingly with the settings for your system. This example is is meant for triple booting Windows XP, GNU/Linux, and PC-BSD, where they are installed in that order, into primary partitions.

title WindowsXP
root (hd0,0)
makeactive
chainloader --force +1
boot

title Foo Linux
root (hd0,1)
kernel /boot/vmlinuz

title PC-BSD
root (hd0,2,a)
kernel /boot/loader

By default, if the slice number is omitted, GRUB searches the first slice which has a partition. I have however specified the slice number in this example.

If your distro has already configured Windows and Linux in menu.lst/grub.conf,
you should probably leave it as is; appending the PC-BSD entry to the
configuration. The location and file name of the linux kernel can vary a bit,
/boot/vmlinuz, /vmlinuz, and /boot/vmlinuz-x.y.z should be common, but my grasp
of Linux kernels dates to Linux 2.2, not modern 2.6 — as always check your
operating systems documentation when necessary! initrd users please see the grub
manuls notes on
linux
.

Using LILO

For those whom still prefer the LInux LOader, you can still use it for booting PC-BSD: edit /etc/lilo.conf accordingly:

# cp /etc/lilo.conf /root/lilo.conf.old
# vi /etc/lilo.conf
# /sbin/lilo

I will leave the top matter in lilo.conf as an exercise to the reader (if you use LILO, you should know this); so working off the GRUB example, the /etc/lilo.conf file should look like:

other=/dev/hda1
label=WinXP
table=/dev/hda

image=/boot/vmlinuz
label=FooLinux
root=/dev/hda2
table=/dev/hda

other=/dev/hda2
label=PCBSD
root=/dev/hda3
table=/dev/hda

NB that initrd users will want to add a initrd=/path/to/your/initrd/img rule to
the FooLinux image specs.

Users with multiple hard drives, please refer to the FreeBSD
FAQ
for details.

Using the PC-BSD Boot Loader

The header is actually miss leading, as this is really just the boot loader used by FreeBSD, a.k.a. Boot Easy or /boot/boot0. Hence forth called BootEasy.

To boot your operating systems with BootEasy, once is installed – just reboot the PC. Following the previous examples, you would see a prompt like this:

F1: DOS
F2: Linux
F3: FreeBSD

Press F1 on the keyboard to load Windows XP, F2 to chainload FooLinux, or F3 to load PC-BSD.

Note well that you must have a suitable boot loader installed into the linux / partition in order to boot linux from BootEasy.

The FreeBSD FAQ specifically recommends to install
LILO into the Linux /
, although GRUB should work fine when installed into Linuxes /

References

Post script:

If you have a problem with my spelling, grammar, or punctuation: you can pay my family to go on a shopping spree and leave me free to type slower then I can physically move my fingers across the keys.

Disclaimer

The information provided here is done for your convenience at the authors expanse, it however is without any form of warranty or guarantee of fittness — use at yur own risk, I’m not responsible.