Subject: Re: NetBSD is running now -- questions...
To: None <port-atari@NetBSD.ORG>
From: Waldi Ravens <waldi@moacs.indiv.nl.net>
List: port-atari
Date: 10/21/1995 14:45:40
Hallo Leo,

> > Not yet. At least one harddisk must have an AHDI partition
> > table, because NetBSD can only be booted under TOS/MagiC.
> > A bootloader is necessary to boot NetBSD without TOS.
>
> It seems that partitions labeled 'UNX' can be auto booted from
> TOS, Volker raised that possibility.

The only thing TOS does, is to read the root sector (sector 0),
calculate a checksum, and (if the checksum matches some magic
number) execute the root setor code at offset 0. Everything
else is left to this root sector code.

The NetBSD root sector code (i.e. the primary boot loader) will
have to load the remainder of the boot block (sectors 1..15,
the boot block is 8KB) Sectors 1..13 contain the secondary boot
loader, sectors 14..15 contain the disklabel. At this point the
location of the root fylesystem is known, per definition it's
on the first partition (sd?a).

(The boot code in ROM can only handle harddisks with a 512 bytes
 sector size, so we don't have to worry about different sector
 sizes and can happily use the DMAread() XBIOS function.)

The secondary loader must then load the kernel from /netbsd.
I think it's reasonable to require that the root fylesystem
is of type ffs, so that would be the only filesystem type
the loader must understand.

> The loader should also checkout the hardware config.

If it turns out that 6.5KB for the boot loader is a little
low (dutch: `aan de krappe kant'), some of those checks
could probably be moved to the kernel? The current NetBSD
loader under TOS doesn't do much checking, does it?

> I saw that the hp or sun ports had ufsboot code that might
> be interesting.

I hope so. Basically we need a very much stripped down ffs
driver, allowing us to read a file in the root directory.

> No, the loader code won't be trivial I'm afraid.

I'm more optimistic, the hard work is already done by the
kernel itself.


Waldi