Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jul 95 19:39:19 MDT
From:      terry@cs.weber.edu (Terry Lambert)
To:        awebster@dataradio.com (Andrew Webster)
Cc:        freebsd-questions@freebsd.org
Subject:   Re: BOOT Question
Message-ID:  <9507260139.AA20516@cs.weber.edu>
In-Reply-To: <199507252010.QAA12832@vhf.dataradio.com> from "Andrew Webster" at Jul 25, 95 04:12:30 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> On FreeBSD-2.0.5-RELEASE, why is there a limit to the maximum size of the
> boot2 program?  I can understand the 512 byte limit on the boot1 program,
> but since boot1 loads boot2, why limit it to a paltry 7168 bytes?  I'am
> attemping to add some UPS functionality to the system, and need to add a
> bit of code to prevent the OS from booting if the UPS is not online.
> Right now, my code slightly exceeds the 7168 byte limit.
> 
> I know the answer is to write smaller code, but for my own curiosity, I'd
> like to know why the limit.  There is no documentation mentionning it.

So it will fit in one cylinder on the smallest floppy device we support.

Also because existing file systems have it right before the disklabel
which is right before slice 'a', meaning there's no place for it to
grow *to* without a reinstall.

The acknowledged "correct" fix is to write a boot block that can read
a file (probably called "biosboot" or just "boot") off the UFS / on
slice 'a' and run it instead of loading and running the kernel.  That
way, there wouldn't be the one cylinder limit on the size, or the
rigid disk layout limits imposed by where the boot lives on the hard
drive.  The boot file thus loaded would continue to run using BIOS
calls and do whateve, finally loading the kernel when it was all done.

Then you could put all sorts of crap in it until people (like me)
started complaining that it was too large for a 1.2M floppy.  Or
until you filled all of conventional memoy with BIOS code (640k limit).


					Terry Lambert
					terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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