multi-boot bootstrap?

dieterbsd at engineer.com dieterbsd at engineer.com
Mon Mar 28 18:12:05 UTC 2011


The discussion of a new bootloader reminded me of the
following problem:

What we need more than a new bootloader is a new bootstrap.
With MBR, NetBSD's boot selector MBR works reasonably well.
(About as well as can be expected given the limited space available.)
You get a menu of partitions ("slices" in FreeBSD-speak)
and can enter a number to select which one you want to boot.
If you don't enter anything it times out and boots the default.
You can boot a different disk by pressing F1, F2, F3 ...

example:
        Fn: diskn
        1: NBSD4.0
        2: NB5.0.1
        3: FBSD7.1
        4: FBSD8.2

The menu labels are limited to 7 chars due to the limited space
available in the MBR.

But, disks larger than 2 GiB need to be GPT rather than MBR.
I haven't found a bootstrap with similar functionality for GPT.

GPT allows a larger bootstrap than MBR.  So the bootstrap can
be nicer.  Firmware disk numbering is completely insane on some
machines.  So spare the poor user from having to guess which
disk is which number today.  Go through all the disks and look
for bootable partitions.  Extract the GPT partition labels for
these partitions.  Present a menu of choices.

example:
        Enter the menu number for the partition you wish to boot.
        The default will automatically boot in 5 seconds.

        1: FreeBSD 7.1
        2: FreeBSD 8.2 (default)
        3: NetBSD 4.0
        4: NetBSD 5.0.1
        5: OpenBSD
        6: Plan 9
        7: reboot back to firmware

        Boot:

As with the boot loader, this needs to work on all machines,
and all terminals (without having termcap/terminfo), so just plain
ASCII text, no graphics.





More information about the freebsd-hackers mailing list