FreeBSD multiboot question.

Giorgos Keramidas keramida at ceid.upatras.gr
Mon Feb 23 18:01:30 PST 2009


On Mon, 23 Feb 2009 17:35:00 -0800, "Overdorf, Sam" <sam.overdorf at intel.com> wrote:
> I have three partitions loaded with different versions of FreeBSD.
> I have the multiboot option working and it shows the following:
>
> F1 FreeBSD
> F2 FreeBSD
> F3 FreeBSD
>
> Is there a way that I can change the description from "FreeBSD" to
> something like:
>
> F1 FreeBSD 7.1
> F2 FreeBSD 7.0
> F3 FreeBSD 6.4

Not with the default boot0 loader.  The strings you see are hardcoded in
the limited space of the master boot record[1], and the assembler source
for the 512 bytes of the MBR even uses 'overlapping strings' to cover
other BSD-related (but not necessarily FreeBSD-specific) partition types
using as little space as possible.

You can read the source of the `boot0' MBR in x86 assembler through the
web interface of Subversion[2].  Look near line 623 for the code that
reads:

	/*
	 * Offsets that match the known types above, used to point to the
	 * actual partition name. The last entry must point to os_misc,
	 * which is used for non-matching names.
	 */
		.byte os_linux-.		# 131, Linux
		.byte os_freebsd-.		# 165, FreeBSD
		.byte os_bsd-.			# 166, OpenBSD
		.byte os_bsd-.			# 169, NetBSD

If you want longer names, or even a graphical boot menu, you can always
install some other boot loader.  AFAIK, two of the most popular options
are `sysutils/grub' or `sysutils/syslinux'.

Note that the version of GRUB we have in the Ports is a bit old.  It is
a version of GRUB 0.9X, and development of GRUB has moved to GRUB 2.X
now[3].  It seems that the `sysutils/syslinux' port tracks the vendor
releases more aggressively.

Notes:
------
[1] http://en.wikipedia.org/wiki/Master_boot_record
[2] http://svn.freebsd.org/viewvc/base/head/sys/boot/i386/boot0/boot0.S?annotate=HEAD
[3] http://www.gnu.org/software/grub/


More information about the freebsd-questions mailing list