Home > Articles

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

The FreeBSD Boot Manager

You can install the FreeBSD boot manager during the FreeBSD installation to enable booting of multiple operating systems. After the install, you can configure the boot manager with the boot0cfg program.

boot0cfg -B will install the boot manager onto the hard disk's MBR. This is one way to restore the boot manager if Windows should wipe it out (if, for example, you install Windows after you install FreeBSD). Of course, you would have to boot from a FreeBSD boot disk to use boot0cfg -B if the boot manager has been wiped out. In addition, if you want to make changes to the boot manager configuration, you will need to reinstall it using this command, followed by the changes you want to make.

boot0cfg is command-line based. Fortunately, you probably do not need to be concerned with most of the options, although you might find them interesting in an academic sense, if nothing else. The options shown in Table 3.1 are the most important ones for making changes to the boot manager configuration.

Table 3.1. Boot Manager Configuration Options




boot0cfg will be more verbose about what it is doing.

-b image

Here, image is the name of the boot image to use. The default is /boot/boot0.

-d drive

Here, drive is the drive number used by the PC's BIOS for referencing the disk. Usually this is 0x80 for the first drive, 0x81 for the second, and so on.

-f file

Here, file is the name of a file to which the original MBR should be backed up in case there are problems. If the file already exists, it will be replaced with the new version.

The -o option is also supported, and it allows a comma-separated list of arguments, whose meanings are listed in Table 3.2.

Table 3.2. Arguments for boot0cfg -o




If the PC's BIOS supports it, this will tell boot0cfg to use int 0x13 extensions instead of the old-style CHS (Cylinder-Head-Sector) for disk I/O. This will get around the 1,024 cylinder boot limit described previously. However, if the PC's BIOS does not support this option, it may cause the system to hang on the next reboot.


Forces boot0cfg to use the drive number specified in the –d option to reference the drive you're working with.


By default, the boot manager can write to the MBR and update it (to set the active flag, primarily). This can cause problems if you have hardware antivirus support enabled that prevents writing to the MBR. The noupdate option will prevent the boot manager from attempting to write to the MBR.

boot0cfg also supports the -s n option, where n is a number from 1 to 5 that specifies the default slice (commonly referred to as a partition in MS-DOS/Windows) to boot if no selection is made. The -t n option is also supported, where n is a number representing the number of "ticks" to wait before booting the default operating system. There are approximately 18.2 ticks in a second.

  • + Share This
  • 🔖 Save To Your Account