Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jul 1995 09:15:52 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        awebster@dataradio.com (Andrew Webster)
Cc:        freebsd-questions@freebsd.org
Subject:   Re: BOOT Question
Message-ID:  <199507252345.JAA03851@genesis.atrad.adelaide.edu.au>
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
Andrew Webster stands accused of saying:
> 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.

I'd guess it has to do with the second bootstrap living in the slack space
on the first cylinder.  The first bootrecord is at 0/0/0, and the first 
place a filesystem can start is 0/1/0.  (cylinder/head/sector)

If we assume the worst case, an MFM disk, that leaves 16 sectors, or 
8192 bytes total space free.  7168 equates to 14 sectors, so I suspect 
that this is a slightly conservative value.

>   Andrew Webster   Network Manager / Special Projects

-- 
]] Mike Smith, Software Engineer        msmith@atrad.adelaide.edu.au    [[
]] Genesis Software                     genesis@atrad.adelaide.edu.au   [[
]] High-speed data acquisition and                                      [[
]] realtime instrument control          (ph/fax) +61-8-267-3039         [[
]] My car has "demand start" - Terry Lambert                            [[



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