Subject: Netbooting - two stage bootstrapping?
To: None <port-pmax@netbsd.org>
From: Simon Burge <simonb@telstra.com.au>
List: port-pmax
Date: 08/20/1998 01:17:04
Whilst redoing the pmax WWW pages (and borrowing heavily of the Alpha
and Vax pages), I caught some info on how the Alpha netboots.  From the
Alpha netboot page:

    Booting and running NetBSD/alpha over a network requires a BOOTP
    server, a TFTP server and an NFS server. (These are usually all run
    on the same machine.) There are two basic stages to the boot:

     1. The PROM software sends a BOOTP request to get its own address,
        the address of the TFTP server and the file to download. It
        downloads this file, which is the second stage bootstrap, via
        TFTP and then executes it.

     2. The second stage bootstrap uses further information in the BOOTP
        packet that the console received to find the NFS server and path
        and retreive the kernel (the file /netbsd). After loading the
        kernel into memory, it executes it.

     3. The kernel probes and configures the devices, and then sends
        out another BOOTP request so it can find out its address, the
        NFS server, and path. (The kernel probably should get this
        information from the console, but it currently doesn't.) It then
        mounts its root via NFS and continues.

Currently, NetBSD/pmax loads the kernel via tftp, skips the second stage
described above, and jumps straight to the last stage.  This has a least
one major drawback when compared with the above scheme - you need to
update the kernel somewhere down in /tftpboot as well as in the NFS root
directory (which are in different object file formats!).  With a two
stage boot (load the network loader, then the kernel), the program in
/tftpboot would (hopefully!) remain pretty static, and we'd only have to
update the kernel in the root directory.

Is there any interest in moving to a scheme like this?

One thing I'm not sure of off the top of my head is how you'd specify
different kernels.  Something like "boot 3/tftp/newkernel" may try and
load "newkernel" from the /tftpboot area instead of being interpreted
by the first stage loader.  If there are problems in this area, it's
probably just easier to move kernels around in the NFS root directory.

Simon.