Fixing a MBR (and more) that ??? trashed

Jerry McAllister jerrymc at clunix.cl.msu.edu
Wed Sep 14 14:55:41 PDT 2005


> > Gayn Winters wrote:
> > 
> > >>Alex Zbyslaw [mailto:xfb52 at dial.pipex.com] 
> > >>    
> > >>Why do you think it's not safe to add hard drives?
> > >
> > >It doesn't seem "safe" if Windows blows away the multiboot MBR that
> > >FreeBSD so carefully made!  Windows overwriting the MBR 
> > seems to be the reason people recommend loading Windows before loading
> 
> > FreeBSD, which I do.  I just never realized that this problem would
> come back 
> > to bite me when I added another disk drive.
> > >  
> > I know of know reason why it should.  I've added disks half a dozen 
> > times without blowing away any MBRs.  Even the Windows blowing away
> the 
> > MBR is an annoyance, not a disaster since it is easy to rewrite.  
> > Whatever pickle you find yourself in seems to have to do with 
> > more than just adding a disk or Windows killing your MBR.
> > 
> > --Alex
> 
> I certainly am willing to admit that I'm doing something stupid!
> The motherboard and its BIOS are also known to be strange.
> 
> One thing to note is that if I reconfigure (fresh FBSD install), add
> hardware, and then boot first into FBSD, all is well EXCEPT the boot
> loader, whose prompt is:
> 	F1 ???
> 	F2 FreeBSD
> 	F5 Drive 1
> 
> 	Default: F2
> 
> If I select F2, then I get FreeBSD.  If I select F5 I get Windows!  I.e.
> F5 gives me the same slice as does F1!!!  (Drive1 is the extra IDE
> drive.)  I can't blame Windows for this, since it never got booted.

That sounds correct to me.

F1-F4 would be the the [up t0] four slices on the first disk
and then F5 tells it to look on the second disk.   There is looks
for an MBR.   If it happened to be a FreeBSD MBR you should get
a second menu something like F1 ??? F2 FreeBSD, F3 DOS, etc.   But
if it is an MS MBR, it will only know to boot MSxxx.

> Also, if FBSD gets booted first, Windows doesn't (further) corrupt the
> MBR.  Incidentally, rewriting the MBR with
> 	boot0cfg -B -o packet /dev/ad1
> does not change anything.  The F5 option is still there, and it still
> brings up the Windows that is on slice1.  If I add a third IDE drive,
> the situation also remains the same.  In particular, I don't get an F9
> option.

You would never get an F9.   They are only F1--F4 +F5 which takes you
to the next disk's F1-F4.    What the MBR on the second disk does when
you hit F5 depends on what MBR is on it.

You may have something weird on the second disk.  I really don't 
know from what you say.   But, at least the main boot disk (ad0 ??)  
behavior looks correct.   Adding the FreeBSD MBR to the second disk
wouldn't change much if the slice on the second disk has a boot
sector that boots MSxxx.   If it is MS, it may insist on booting
from the first disk anyway.   I am not that familiar with weirdnesses
from MS other than that they are weird. 

////jerry

> 
> I'm still in a curious pickle, but at least this one isn't choking me!
> 
> Thanks again for the help!
> 
> -gayn


More information about the freebsd-questions mailing list