Subject: Re: Lets boot NetBSD without the MacOS
To: Mike Frager <fragermk@drthunder.ml.org>
From: SUNAGAWA Keiki <kei_sun@ba2.so-net.ne.jp>
List: port-mac68k
Date: 02/24/1999 00:59:29
Mike Frager <fragermk@drthunder.ml.org> wrote:

Mike> Hello everyone,

Hi,

Mike> I'm interested in developing a way to boot NetBSD
Mike> without the MacOS at all. I think I've narrowed down
Mike> two ways to do it:

Cool!

I disassembled Apple_Driver and am looking at the code for
these days.

Mike> First, an imposter Apple_Driver partition: this would
Mike> be loaded in early boot by the start manager and then
Mike> would find a certain NetBSD partition then load and
Mike> execute a second stage loader that would actually boot
Mike> the kernel.

Mike> The advantage of the imposter Apple_Driver is that it
Mike> is loaded very early and would be simple to implement
Mike> since the documentation for writing an Apple_Driver is
Mike> easily available. The downside is that we would have
Mike> to create a user space utility in NetBSD to manage it.

Yes, stock Apple_Driver which is installed by Apple HD/SC
Setup has its size of 16KB.  So I prefer this way.  Existing
stand/libsa, sysinst, pfdisk etc. could be modified for the
purpose.

Mike> Another way is to create an imposter System file: this
Mike> would be loaded in late boot, again by the start
Mike> manager. The code in this imposter file would need to
Mike> locate the NetBSD root partition, load the kernel and
Mike> then execute it. There would be no need for a second
Mike> stage loader.

I thought that the start manager requires the System file is
located in HFS partition, so it is incompatible with our FFS
root partition.

Am I wrong?

Mike> The advantage of the imposter System file is that it
Mike> could be managed from the MacOS. The problem is that I
Mike> have absolutely no idea what in the System file gets
Mike> called first by the start manager and how to get the
Mike> start manager to think that our imposter System file
Mike> is really a System file.

System file has resource fork, so you should find the way to
handle resource fork when going this way.  In addition, it
still depends MacOS for managing boot blocks.  It's not so
good.  Old Macs are easily available in store now, but
little of them have System installed.  System (MacOS) are
not free software...

Mike> Please respond on the list if you have any comments
Mike> about these ideas, especially if you are interested in
Mike> helping me create one of these booters.

/sys/arch/*/stand directories have various examples.

Mike> Also, I could use any and all information related to
Mike> the start manager.  Feel free to email me that
Mike> info. directly.

Mike> Thanks,

Mike> Mike Frager mike@frager.org

--
SUNAGAWA Keiki <kei_sun@ba2.so-net.ne.jp>
Hack on NetBSD, and your code runs on over 20 architectures!