[rescue] Q about sun2 boot flow

Walter Belgers walter+rescue at belgers.com
Fri Sep 4 16:22:31 UTC 2026


Hi,

> On 3 Sep 2026, at 09:06, Todd Vernon via rescue <rescue at sunhelp.org> wrote:
> For the original SunOS ND boot, the sequence is:
> The Sun-2 PROM reads blocks 1–15 of /dev/ndp0. Those blocks contain bootnd.
> bootnd is not simply loading another fixed range of raw blocks. It understands enough of the Unix filesystem on the public ND device to find and load the file /boot.
> /boot then understands the filesystem and loads /vmunix from that same public ND filesystem.
> Once vmunix is executing, the kernel’s ND driver takes over and mounts its configured root, typically the client’s private ND partition such as nd0.

There's two ways (well actually three) of getting it to work.
First is to extend the functionality of ndbootd to provide /boot and /vmunix as well as the first+second stage boot loaders.
Second is to use ndd and change the MAX_MINOR variable to go to 0x40 (ndp0) and provide a file from ndd, that contains the correct information.
(Third is using non-original boot loaders that load the kernel via NFS and then have the kernel do the rest via nd0.)

> So yes, there is effectively a third piece, if we’re calling the PROM-loaded bootnd stage 1. But /boot isn’t sitting at some predetermined ND block number after block 16. It’s an ordinary file in the filesystem contained on /dev/ndp0. bootnd reads the filesystem metadata over ND, locates /boot, and loads it. Then /boot similarly locates and loads /vmunix. The SunOS 3 reboot documentation also identifies /boot as the system bootstrap and /vmunix as the system image. 
> That’s the important distinction with NetBSD’s ndbootd. Modern ndbootd deliberately constructs a fake minimal ND disk:
> block 0: disk label-ish
> blocks 1–15: bootyy
> block 16 onward: netboot
This is the crux: "block 16 onward: netboot". How should this look? A small filesystem with /boot and /vmunix on it? Or does the boot loader expect the netboot program to start exactly at block 16? Or is it a small filesystem wich the first file netboot (does that then end up in block 16?) and blocks 1-15 overwritten with bootyy? Or 
There's quite a few parameters which makes it hard to find out what is correct. Even Claude first mentions bootnd and then bootyy to be the first stage.

My SCSI2SD broke so I can't run SunOS 3.x on the real hardware at the moment, and I can't get any emulator to work. Also, I tried netbooting 4.0.3 and install SunOS on a SCSI disk but several disks work but will not be detected at boot time, the latest I tried (a Fujitsu) seemed to work but I cannot get boot blocks on it.

Although computers have become way more complex, it is clear that you need to know much less to operate them these days ;-)

Walter.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sunhelp.org/pipermail/rescue_sunhelp.org/attachments/20260904/26369358/attachment.html>


More information about the rescue mailing list