Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Feb 2009 04:00:23 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        "Overdorf\, Sam" <sam.overdorf@intel.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: FreeBSD multiboot question.
Message-ID:  <87myccbnm0.fsf@kobe.laptop>
In-Reply-To: <96D71EC226B22D48B4F8F6F9C33C91CE3A5EB70F@orsmsx508.amr.corp.intel.com> (Sam Overdorf's message of "Mon, 23 Feb 2009 17:35:00 -0800")
References:  <9ef7e7380902220154t74657d52uc9497c77672b79f8@mail.gmail.com> <9a52b1190902220711u65e38320t97ca56547bef246d@mail.gmail.com> <87ljryccm0.fsf@kobe.laptop> <49a20440.oqh9j8d04xp6dYo8%perryh@pluto.rain.com> <87mycd847c.fsf@kobe.laptop> <20090223195041.GC58188@kokopelli.hydra> <20090223160951.056f54d1@scorpio> <20090224001322.GD59353@kokopelli.hydra> <96D71EC226B22D48B4F8F6F9C33C91CE3A5EB70F@orsmsx508.amr.corp.intel.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 23 Feb 2009 17:35:00 -0800, "Overdorf, Sam" <sam.overdorf@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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87myccbnm0.fsf>