<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div class="p1">Walter, I honestly don\u2019t know the answer but was interested to see what AI (ChatGPT) would say. &#160;No idea if it\u2019s correct but sending along as it seems to reference Sun docs:</div>
<div class="p1">&#160;</div>
<div class="p1">\u2014\u2014</div>
<div class="p1">&#160;</div>
<div class="p1">Walter\u2019s missing piece is documented very explicitly in the <span class="s2"><strong>SunOS 3.0</strong></span> <code><span class="s2"><strong>nd(4P)</strong></span></code> <span class="s2"><strong>man page</strong></span><span class="s1">, and it\u2019s a little different from the modern</span> <code>ndbootd</code> <span class="s1">mental model.</span></div>
<div class="p1">&#160;</div>
<div class="p2">For the original SunOS ND boot, the sequence is:</div>
<ol type="1">
<li><span class="s1">The Sun-2 PROM reads</span> <span class="s2"><strong>blocks 1\u201315 of</strong></span> <code><span class="s2"><strong>/dev/ndp0</strong></span></code><span class="s1">. Those blocks contain</span> <code>bootnd</code><span class="s1">.</span></li>
<li><code>bootnd</code> <span class="s2">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</span> <code><span class="s1"><strong>/boot</strong></span></code><span class="s2">.</span></li>
<li><code>/boot</code> <span class="s2">then understands the filesystem and loads</span> <code><span class="s1"><strong>/vmunix</strong></span></code> <span class="s2">from that same public ND filesystem.</span></li>
<li><span class="s1">Once</span> <code>vmunix</code> <span class="s1">is executing, the kernel\u2019s ND driver takes over and mounts its configured root, typically the client\u2019s private ND partition such as</span> <code>nd0</code><span class="s1">.</span></li>
</ol>
<div class="p1">Sun\u2019s own documentation literally describes it as:</div>
<div class="p4">PROM loads blocks 1 thru 15 of /dev/ndp0 (bootnd)<br />
bootnd loads /boot<br />
/boot loads /vmunix</div>
<div class="p1">So <span class="s2"><strong>yes, there is effectively a third piece</strong></span><span class="s1">, if we\u2019re calling the PROM-loaded</span> <code>bootnd</code> <span class="s1">stage 1. But</span> <code>/boot</code> <span class="s1">isn\u2019t sitting at some predetermined ND block number after block 16. It\u2019s an ordinary file in the filesystem contained on</span> <code>/dev/ndp0</code><span class="s1">.</span> <code>bootnd</code> <span class="s1">reads the filesystem metadata over ND, locates</span> <code>/boot</code><span class="s1">, and loads it. Then</span> <code>/boot</code> <span class="s1">similarly locates and loads</span> <code>/vmunix</code><span class="s1">. The SunOS 3 reboot documentation also identifies</span> <code>/boot</code> <span class="s1">as the system bootstrap and</span> <code>/vmunix</code> <span class="s1">as the system image.</span><span class="s1 Apple-converted-space">&#160;</span></div>
<div class="p2">That\u2019s the important distinction with NetBSD\u2019s <code>ndbootd</code><span class="s1">. Modern</span> <code>ndbootd</code> <span class="s1">deliberately constructs a</span> <span class="s2"><strong>fake minimal ND disk</strong></span><span class="s1">:</span></div>
<ul>
<li><span class="s1">block 0: disk label-ish</span></li>
<li><span class="s1">blocks 1\u201315:</span> <code>bootyy</code></li>
<li><span class="s1">block 16 onward:</span> <code>netboot</code></li>
</ul>
<div class="p1">It only exists to get far enough to switch to RARP/bootparams/NFS.<span class="Apple-converted-space">&#160;</span></div>
<div class="p6">The original SunOS scheme instead expects <code>/dev/ndp0</code> <span class="s1">to be a</span> <span class="s2"><strong>real Sun filesystem exported block-for-block via ND</strong></span><span class="s1">. Thus the old path is essentially:</span></div>
<pre><code class="language-text">Sun-2 PROM
   |
   | ND raw block reads, ndp0
   v
blocks 1-15
   |
   v
bootnd
   |
   | ND reads of filesystem on ndp0
   v
/pub filesystem: /boot
   |
   | ND reads of filesystem on ndp0
   v
/pub filesystem: /vmunix
   |
   v
SunOS kernel
   |
   | kernel ND driver
   v
private ND root, e.g. nd0</code></pre>
<div class="p1">And that also explains why Walter\u2019s observation about <code>ndd</code> <span class="s1">is important.</span> <code><span class="s2"><strong>ndbootd</strong></span></code> <span class="s2"><strong>alone cannot reproduce the historical SunOS 1/2/3 boot environment</strong></span><span class="s1">, because the historical loader needs continued arbitrary block access to the actual public filesystem after the initial boot blocks. You need an ND implementation that exports the complete disk/partition image, which sounds like exactly what</span> <code>ndd</code> <span class="s1">can provide.</span></div>
<div class="p1">There\u2019s an additional useful confirmation in Sun\u2019s own description of ND: public devices <code>/dev/ndp*</code> <span class="s1">were actual read-only filesystems containing shared</span> <code>/bin</code><span class="s1">,</span> <code>/usr/bin</code><span class="s1">, libraries, etc., not merely bootloader storage. The boot files normally came from</span> <code>/dev/ndp0</code><span class="s1">.</span><span class="s1 Apple-converted-space">&#160;</span></div>
<div class="p1">&#160;</div>
<div class="p1">So I think the answer to send Walter is essentially:</div>
<div class="p7"><strong>\u201cYour assumption that stage 1 requests a stage-2 binary beginning at ND block 16 applies to</strong> <code><strong>ndbootd</strong></code><strong>/NetBSD-style booting. Native SunOS 3.x doesn\u2019t work that way. The PROM loads blocks 1\u201315 (</strong><code><strong>bootnd</strong></code><strong>) from</strong> <code><strong>/dev/ndp0</strong></code><strong>;</strong> <code><strong>bootnd</strong></code> <strong>then interprets the filesystem on</strong> <code><strong>/dev/ndp0</strong></code> <strong>and loads</strong> <code><strong>/boot</strong></code><strong>;</strong> <code><strong>/boot</strong></code> <strong>loads</strong> <code><strong>/vmunix</strong></code> <strong>from that filesystem. The kernel subsequently mounts its configured ND root, e.g.</strong> <code><strong>nd0</strong></code><strong>. Therefore to reproduce a native SunOS 1.x\u20133.x network boot, the server needs to export a genuine public ND filesystem, not merely serve the bootstrap blocks.\u201d</strong></div>
<div class="p8">That\u2019s a pretty definitive answer. Sun\u2019s 1985 <code>nd(4P)</code> <span class="s1">documentation essentially answers his question word-for-word.</span></div>
</div>
<div name="messageSignatureSection"><br />
<div style="color: rgb(32, 33, 36); font-family: Arial, Helvetica, sans-serif; font-variant-ligatures: normal; orphans: 2; widows: 2; text-decoration-thickness: initial; margin-top: 7px"><font style="font-size: 14px;">---</font></div>
<div style="color: rgb(32, 33, 36); font-family: Arial, Helvetica, sans-serif; font-variant-ligatures: normal; orphans: 2; widows: 2; text-decoration-thickness: initial; margin-top: 7px; font-weight: bold"><font style="font-size: 16px;">Todd Vernon</font></div>
<div style="color: rgb(32, 33, 36); font-family: Arial, Helvetica, sans-serif; font-variant-ligatures: normal; orphans: 2; widows: 2; text-decoration-thickness: initial; margin-top: 7px"><font style="font-size: 14px; font-weight: normal">Entrepreneur | Investor</font></div>
<div style="font-family: Arial, Helvetica, sans-serif; font-variant-ligatures: normal; font-size:14px; orphans: 2; widows: 2; text-decoration-thickness: initial;margin-top: 7px; color: rgb(80, 0, 80);">Email: <a href="mailto:todd@toddvernon.com" target="_blank"><font style="font-size: 14px;">todd@toddvernon.com</font></a></div>
<div style="font-family: Arial, Helvetica, sans-serif; font-variant-ligatures: normal; font-size:14px; orphans: 2; widows: 2; text-decoration-thickness: initial;margin-top: 7px; color: rgb(80, 0, 80);">LinkedIn: <a href="https://www.linkedin.com/in/toddvernon/" target="_blank"><font style="font-size: 14px;">toddvernon</font></a></div>
</div>
<div name="messageReplySection">On Sep 2, 2026 at 2:46\u202fPM -0400, Walter Belgers via rescue &lt;rescue@sunhelp.org&gt;, wrote:<br />
<blockquote type="cite">Hi,<br />
<br />
I am trying to get a Sun 2 to boot from the network. Booting NetBSD or SunOS 4.0.3 is not a problem, it's your plain old rarp/tftp/nfs sequence but with ndbootd added for the stage1 and stage2 boot loaders.<br />
<br />
But, I'd like to netboot an older SunOS (1.x/2.x/3.x) using ND (network disk) and am trying to understand the boot process. As far as I understand, this happens:<br />
<br />
b ie() will send an ND request to "minor 0x40" (the public disk) for blocks 0~15, which are 512b blocks with 0 being a disk label and the rest making up stage 1 (which can be 7.5KB at most).<br />
<br />
Stage 1will then run and request blocks 16 and higher from ND minor 0x40 which is then run as stage 2.<br />
<br />
But.. what happens then? How does stage 2 boot the kernel? Is there a third stage boot loader in the boot blocks that is fetched via ND? Or does the kernel also come from ND minor 0x40? I am trying to figure this out by reading the code but I'm not a coder and could not figure this out :-/. I also asked Tom Lyon who AFAIK wrote ND but after 40 years his memory was a bit hazy ;-)<br />
<br />
Eventually, /dev/nd0 (or equivalent as stated in /etc/fstab) will be mounted as the root filesystem, which is again served via ND, but this can be on minor 0 (/dev/ndp == minor 0x40, /dev/nd0 == minor 0). Ndbootd only implements booting via minor 0x40 so cannot be used for this, but there's a tool ndd that can provide this functionality. Both can run together as they will ignore requests for the other minor.<br />
<br />
At one point I had a setup that used a 2nd stage bootloader that used NFS (yes, cheating) to mount the root filesystem and start a SunOS 3.2 kernel, which would then revert to using ND to bootstrap the system. (2nd stage: "root on nfs:/export/sunos/root fstype nfs", but kernel says "root on nd0" and act accordingly).<br />
<br />
I do know I could just run SunOS 4.0.3 and set up a boot service but I'd like to run the boot server on modern hardware (without cheating and using an emulator).<br />
<br />
Regards,<br />
Walter.<br />
<br />
<br />
_______________________________________________<br />
rescue list - http://sunhelp.org/mailman/listinfo/rescue_sunhelp.org<br /></blockquote>
</div>
</body>
</html>