Dual booting problems

Jerry McAllister jerrymc at msu.edu
Fri Mar 2 16:40:11 UTC 2007


On Fri, Mar 02, 2007 at 12:34:10AM +0000, RW wrote:

> On Thu, 1 Mar 2007 13:30:26 -0900
> Beech Rintoul <beech at alaskaparadise.com> wrote:
> 
> > I should also mention that you need the FreeBSD boot manager on both 
> > disks, or an alternative boot manager such as grub or gag. Read the 
> > handbook.
> 
> I recall reading that too, but I've never understood what it's supposed
> to achieve. I imagine it must be a quirk of the FreeBSD boot manager,
> I've certainly never needed to install more than one copy of GAG or
> LILO. 

You may have installed the single sector that is needed without knowing
it.   I don't play with those and so I am less familiar with how
they operate.   They use up some space that is normally available,
but is not officially guaranteed to be available to have a larger
program and more complex tables.

In FreeBSD and according to how it is officially done in DOS partitioned
disks, there is a one block utility that goes in sector 0.  Since it is
only one block, its ability to do things is highly limited.  It has
the slice table and some flags and just enough code to look at its 
slice table to see which slices are marked bootable and to look at
other disk to see which ones have a similar boot block.  This block
is called the MBR.   If there are more than one boot possibilities, it
gives you a menu list.   The first four menu numbers are reserved for
slices on its own disk.  Starting with 5, the menu items point to
the MBR on other disk[s].   I have never tried it with more than 2
disks with bootable slices on them, so I don't know if it will list
a 6 or beyond.

The MBR is not supposed to be OS specific, but the MS MBR breaks that 
rule by not recognizing any slice or other MBR that is not MS.

Each bootable slice on a disk (up to 4 are allowed) has its own boot
sector.

If you select F1-F4, then the MBR will cause the boot sector from that 
slice to be loaded and then it passes control to it.   That slice' boot
sector is OS specific and continues the boot process from there.

If you select F5 (maybe F6 or more,  I should try that some time) it
will instead cause the MBR from that second (maybe third, etc) disk to 
be loaded and passes control to it.   Then that MBR looks at its own
slice table and makes up a menu if there are more than one bootable
slices on that drive.   

Since the first drive's MBR does not read the second drive's slice
table or attempt to boot any of its slices, but only passes control
to the second MBR, then the second disk needs an MBR to take over
and handle its own slice table and bootable slices.

If there is only one bootable slice on a drive or you make it a 
'dangerously dedicated drive' you can get away without a full MBR 
on that drive and put a 'standard' boot block on it, but why bother?   
Just always remember to put an MBR on every drive that has any
bootable slices.

Note that fdisk puts the MBR on the drive.   But, bsdlabel puts
the per slice boot sector on it.   That per slice boot sector must
always be there regardless of how many bootable slices or if the
drive is 'dangerously dedicated' if you want that slice to be bootable.
That is a different issue from the MBR.

I hope that clarifies things rather than muddying them up.
It is all in the handbook plus man pages, but the language is slightly 
more formal and there are still a couple places that mung the use
of the words partition and slice even though most have been recently 
cleaned up. I found a couple the other day, I think in 6.1 (but I forgot
to write them down.   I should have sent in a PR).

////jerry

> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"


More information about the freebsd-questions mailing list