Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Nov 1997 09:01:55 -0800 (PST)
From:      Doug White <dwhite@gdi.uoregon.edu>
To:        FreeBSD Questions <questions@freebsd.org>, hackers@freebsd.org
Subject:   Re: FreeBSD 2.2.2 Won't Boot (fwd)
Message-ID:  <Pine.BSF.3.96.971118085947.1355C-100000@gdi.uoregon.edu>

next in thread | raw e-mail | index | archive | help
Hello!

For those of you running System Commander, here's the problem.

To the boot block bashers, is there a way we can work around this?
SysCommander is a pretty popular boot manager.  We could either disable
the partition type check or also make 0xB5 a valid system type.  

Doug White                              | University of Oregon  
Internet:  dwhite@resnet.uoregon.edu    | Residence Networking Assistant
http://gladstone.uoregon.edu/~dwhite    | Computer Science Major


---------- Forwarded message ----------
Date: Tue, 18 Nov 1997 01:55:12 -0500
From: Bryan Batten <BryanBatten@compuserve.com>
To: Doug White <dwhite@resnet.uoregon.edu>
Subject: Re: FreeBSD 2.2.2 Won't Boot

I last communicated with you about six weeks ago about boot problems
installing FreeBSD on the 3rd primary partition on drive 0 of a 2 drive
layout, using V Communications' System Commander (V2.24) as a boot manager.


On Fri, 26 Sep 1997, Doug White wrote:

> You're digging much deeper than I could.  I think you're on your way to a
solution here.  Unfortunately I'm out of ideas, you're in over my
> head.

> > Since all Booteasy does is transfer control to another bootstrap
> > program,I
> > guess the next item would be to see what kind of boot program
> > FreeBSD sets up in it's own partition. Any pointers to source?
>
> If you have the full source it's in /usr/src/mdec, or
> http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/boot/biosboot/

Remember that?  It turns out that others are having the same problem; see
the thread "System Commander problems" in newsgroup
comp.unix.bsd.freebsd.misc. Anyway, here's what I've found out:

After installing Free BSD 2.2.2, all attempts to boot the newly installed
OS using System Commander fail with a "No bootable partition" message.

I then de- installed System Commander, and re- installed FreeBSD, this time
using its "Install MBR" option ... and it worked! I could boot FreeBSD.
However, when I re- installed System Commander and tried to boot my newly
installed FreeBSD using that, I was once again back to the "No bootable
partition" message.

Now, System Commander has a bad habit of ****ing around with the System
Indicator byte in partition table entries (it loves to set bit 4), with the
result that what was 0x09 becomes 0x19, what was 0xA5 becomes 0xB5, etc. -
but that doesn't seem to bother any other OS I'm running - Linux, OS/2
Warp, MSDOS, and SCO.

System Commander also provides a "Boot through MBR" option in which a file
containing MBR data is read into memory, and control transfers to that. I
had saved the MBR containing "Booteasy" and tried that. Sure enough, I
could select it from System Commander's menu, and FreeBSD would boot.
However, on rebooting, SC was out of the picture, and I was once again back
to Booteasy. 

Thanks to help from Doug White (dwhite@resnet.uoregon.edu), I was able to
find the applicable sources and identify the cause of the problems.

I looked into Booteasy and found that it writes itself "back" to the boot
sector on the first drive each time it's invoked so's to save the
(possibly) new default boot selection. 

This explains why System Commander so quickly disappears without a trace
when its "Load using MBR" option is selected. The second thing I observe
about "Booteasy" is that all it really does (after writing itself back to
the first block of the first drive) is load one block from a specified
partition - or load the MBR of the second drive - and transfer control to
it. 

Patching the saved "Booteasy" MBR so that it didn't write itself back to
disk returned me to the "No bootable partition" problem - but did prevent
SC from disappearing.

The next part of the problem was found by examining the function boot1 in
an assembly source file called start.S contained in the directory
/pub/FreeBSD/FreeBSD-stable/src/sys/i386/boot/biosboot. This is the code
that is loaded by the MBR code.

boot1 reads the MBR record and scans the partition table for a System
Indicator byte of type 0xA5. If one is found, additional boot code is read
in from that partition. If one is not found, the "No bootable partition"
message is issued and processing halts. (A potential problem here is that
the search stops at the 1st BSD partition - apparently precluding booting
from another BSD partition on the same drive.)

To see if SC's modified boot indicator was the problem, I once more tried
to boot Free BSD through SC, got the "No bootable partition" message, then
rebooted Linux from a floppy and used fdisk to see the partitions. Sure
enough, /dev/hda3 (3rd partition drive 0), was showing a type code of 0xB5.

There is really a two part problem here: One is due to a characteristic of
the "Booteasy" code in the MBR, and the other is what I consider to be a
bug in System Commander: i.e. it sometimes sets bit 4 of the System
Indicator byte.

Booteasy:

My suggestion for Booteasy is to modify it so that it doesn't write itself
back to disk. This has the disadvantage of no longer being able to change
the default boot drive selection, but the advantage is that
interoperability with other products (e.g. System Commander) is improved.

It might also be a good idea to look at start.S with respect to the single
bootable partition problem.

Can you pass this on? Or, can I impose on you enough to ask for pointers as
to how I can pass this on?

System Commander:

With respect to System Commander, I think V Communications should fix it
so's not to muck around with the System Indicator byte. Whatever that bit
is being used for can be duplicated by using other storage ins its
(required) DOS partition. I've been trying unsuccessfully to contact V
Communications thru their Compuserve address about this, but I don't get
any answers to my mail.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971118085947.1355C-100000>