Subject: Re: Prep bootloader
To: None <port-prep@NetBSD.org>
From: Jochen Kunz <jkunz@unixag-kl.fh-kl.de>
List: port-prep
Date: 03/08/2006 19:18:14
On Wed, 08 Mar 2006 09:31:27 -0700 (MST)
Tim Rightnour <root@garbled.net> wrote:

> The answer is mildy annoying.  You can write a second stage bootloader
> for prep, theoretically at least, but the only way to get the firmware
> to load it, is still to have the magical boot partition.  So while we
> can write a bootloader that will read netbsd off the disk, we will
> still have to go through partition table gyrations in order to boot.=20
> Given that.. I'm not sure it's worth anyone's time to write one, and
> I'm not really sure what the benefit would be.
The benefit is: You install the boot loader once and you don't need to
tuch the raw disk with dd(1) again. You just need to replace /netbsd
like on all other architectures and you are done. You don't need to tuch
the boot code even on a major OS update. I realy do not like=20
"dd of=3D/dev/rsd0c ..." games only to update a kernel. You don't need to
waste some MB for a boot partition if the kernel is stored as /netbsd
also.

Makeing mkbootimage(8) optionally read the current MBR partition table
is usefull ether way. Even if you use mkbootimage(8) to install only the
bootloader.

I have to admit to be quite clueless in the bootloader department. How
hard is it to build a bootloader that reads a kernel image file from
FFS? I suppose most of FFS handling is in some kind of MI lib. So it may
be "just a bit if glue code" to do the actual IO via firmware calls. Is
there a firmware interface for device independent IO? (All I know is a
bit OpenFirmWare and the hp700/hppa PDC.)
--=20


tsch=FC=DF,
       Jochen

Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/