summaryrefslogtreecommitdiff
path: root/static/netbsd/man9/cpu_rootconf.9 3.html
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:15 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:15 -0400
commit253e67c8b3a72b3a4757fdbc5845297628db0a4a (patch)
treeadf53b66087aa30dfbf8bf391a1dadb044c3bf4d /static/netbsd/man9/cpu_rootconf.9 3.html
parenta9157ce950dfe2fc30795d43b9d79b9d1bffc48b (diff)
docs: Added All NetBSD Manuals
Diffstat (limited to 'static/netbsd/man9/cpu_rootconf.9 3.html')
-rw-r--r--static/netbsd/man9/cpu_rootconf.9 3.html98
1 files changed, 98 insertions, 0 deletions
diff --git a/static/netbsd/man9/cpu_rootconf.9 3.html b/static/netbsd/man9/cpu_rootconf.9 3.html
new file mode 100644
index 00000000..fe371383
--- /dev/null
+++ b/static/netbsd/man9/cpu_rootconf.9 3.html
@@ -0,0 +1,98 @@
+<table class="head">
+ <tr>
+ <td class="head-ltitle">CPU_ROOTCONF(9)</td>
+ <td class="head-vol">Kernel Developer's Manual</td>
+ <td class="head-rtitle">CPU_ROOTCONF(9)</td>
+ </tr>
+</table>
+<div class="manual-text">
+<section class="Sh">
+<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
+<p class="Pp"><code class="Nm">cpu_rootconf</code>,
+ <code class="Nm">rootconf</code>, <code class="Nm">setroot</code> &#x2014;
+ <span class="Nd">root file system setup</span></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
+<p class="Pp"><code class="In">#include
+ &lt;<a class="In">sys/types.h</a>&gt;</code>
+ <br/>
+ <code class="In">#include &lt;<a class="In">sys/systm.h</a>&gt;</code></p>
+<p class="Pp"><var class="Ft">void</var>
+ <br/>
+ <code class="Fn">cpu_rootconf</code>(<var class="Fa" style="white-space: nowrap;">void</var>);</p>
+<p class="Pp"><var class="Ft">void</var>
+ <br/>
+ <code class="Fn">rootconf</code>(<var class="Fa" style="white-space: nowrap;">void</var>);</p>
+<p class="Pp"><var class="Ft">void</var>
+ <br/>
+ <code class="Fn">setroot</code>(<var class="Fa" style="white-space: nowrap;">device_t
+ bootdv</var>, <var class="Fa" style="white-space: nowrap;">int
+ bootpartition</var>);</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
+<p class="Pp">The
+ <a class="permalink" href="#cpu_rootconf"><code class="Fn" id="cpu_rootconf">cpu_rootconf</code></a>()
+ is a machine-dependent interface invoked during system bootstrap to
+ determine the root file system device and initialize machine-dependent file
+ system state. <code class="Fn">cpu_rootconf</code>() provides the global
+ variables <var class="Fa">booted_device</var>,
+ <var class="Fa">booted_partition</var>,
+ <var class="Fa">booted_startblk</var>, <var class="Fa">booted_nblks</var>,
+ and <var class="Fa">bootspec</var>. <var class="Fa">cpu_rootconf</var>
+ invokes the machine-independent function <var class="Fa">rootconf</var>
+ which calls the function <var class="Fa">setroot</var> to record the root
+ device and the root partition information for use in machine-independent
+ code.</p>
+<p class="Pp"><var class="Fa">rootconf</var> may adjust the global variables and
+ determines the parameters for setroot. This is for example used to translate
+ a device and partition number provided by the bootloader into a disk wedge
+ device covering the same partition.</p>
+<p class="Pp">If the bootloader already identified a disk wedge, it passes a
+ non-zero value for <var class="Fa">booted_nblks</var>, then
+ <var class="Fa">booted_startblk</var> and <var class="Fa">booted_nblks</var>
+ specify a disk wedge as the boot device.</p>
+<p class="Pp"><var class="Fa">setroot</var> evaluates several sources to
+ identify the root device in the following order until a valid device is
+ selected:</p>
+<ol class="Bl-enum">
+ <li>The kernel configuration variable <var class="Fa">rootspec</var> which is
+ set by <a class="Xr">config(1)</a>. The value is the name and unit of the
+ root device, e.g., &quot;sd0&quot; (disk) or &quot;dk0&quot; (wedge) or
+ &quot;le0&quot; (network) or the prefix &quot;wedge:&quot; followed by the
+ name of the disk wedge. For disk devices the partition passed as argument
+ to <var class="Fa">setroot</var> is used.</li>
+ <li>The variable <var class="Fa">bootspec</var> following the same
+ syntax.</li>
+ <li>The result of an interactive query of the root device if
+ <var class="Fa">boothowto</var> has set the flag
+ <code class="Dv">RB_ASKNAME</code>. The input uses the same syntax as the
+ previous sources. Here also the kernel dump device is queried.</li>
+ <li>The boot device and partition passed as arguments.</li>
+</ol>
+<p class="Pp">If a root device cannot be selected, <var class="Fa">setroot</var>
+ sets the <code class="Dv">RB_ASKNAME</code> flag and loops.</p>
+<p class="Pp">Otherwise the kernel dump device is identified in a similar manner
+ from</p>
+<ol class="Bl-enum">
+ <li>The result of a previous interactive query. See above.</li>
+ <li>The kernel configuration variable <var class="Fa">dumpspec</var>, if
+ set.</li>
+ <li>The second partition of the root device, if it is a regular disk.</li>
+ <li>The first disk wedge device of type DKW_PTYPE_SWAP.</li>
+</ol>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
+ ALSO</a></h1>
+<p class="Pp"><a class="Xr">config(1)</a>, <a class="Xr">dk(4)</a>,
+ <a class="Xr">boot(8)</a>, <a class="Xr">boothowto(9)</a></p>
+</section>
+</div>
+<table class="foot">
+ <tr>
+ <td class="foot-date">November 11, 2014</td>
+ <td class="foot-os">NetBSD 10.1</td>
+ </tr>
+</table>