Solved What is the difference the two bootcodes?

Hi,
What is the difference between mbr and boot here?

gpart bootcode -b /boot/mbr da0
gpart bootcode -b /boot/boot0 da0

Thanks.
 
That's explained in Chapter 12 of the FreeBSD handbook; 'The booting process'.

In short: boot0 is a boot manager, comparable to GRUB whereas mbr is just that: a boot record to boot the OS.
 
If I don't want to install multiple operating systems, then use mbr, can I understand this?
 
This files should only be used if the disk has a MBR partition scheme

The /boot/mbr searches for a partition with the active attribute in the partition table, then it runs next bootstrap stage.
The /boot/boot0 image contains the BootEasy boot manager which has some additional interactive functions for multi-booting from a user-selected partition.

The BootEasy displays

Code:
F1 Win
F2 FreeBSD

Default: F2

More info in https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot-introduction.html#boot-boot0
 
Back
Top