diff options
Diffstat (limited to 'static/freebsd/man5/mount.conf.5 3.html')
| -rw-r--r-- | static/freebsd/man5/mount.conf.5 3.html | 185 |
1 files changed, 185 insertions, 0 deletions
diff --git a/static/freebsd/man5/mount.conf.5 3.html b/static/freebsd/man5/mount.conf.5 3.html new file mode 100644 index 00000000..f1004644 --- /dev/null +++ b/static/freebsd/man5/mount.conf.5 3.html @@ -0,0 +1,185 @@ +<table class="head"> + <tr> + <td class="head-ltitle">MOUNT.CONF(5)</td> + <td class="head-vol">File Formats Manual</td> + <td class="head-rtitle">MOUNT.CONF(5)</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">mount.conf</code> — <span class="Nd">root + file system mount configuration file</span></p> +</section> +<section class="Sh"> +<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1> +<p class="Pp"><span class="Pa">/.mount.conf</span></p> +</section> +<section class="Sh"> +<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1> +<p class="Pp">During the bootup process, the <span class="Ux">FreeBSD</span> + kernel will try to mount the root file system using the logic in the + <a class="permalink" href="#vfs_mountroot"><code class="Fn" id="vfs_mountroot">vfs_mountroot</code></a>() + function in <span class="Pa">src/sys/kern/vfs_mountroot.c</span>. The root + mount logic can be described as follows:</p> +<ol class="Bl-enum"> + <li id="vfs_mountroot_conf0">The kernel will synthesize in memory a config + file with default directives for mounting the root file system. The logic + for this is in + <a class="permalink" href="#vfs_mountroot_conf0"><code class="Fn">vfs_mountroot_conf0</code></a>().</li> + <li>The kernel will first mount <a class="Xr">devfs(4)</a> as the root file + system.</li> + <li>Next, the kernel will parse the in-memory config file created in step 1 + and try to mount the actual root file system. See + <a class="Sx" href="#FILE_FORMAT">FILE FORMAT</a> for the format of the + config file.</li> + <li>When the actual root file system is mounted, <a class="Xr">devfs(4)</a> + will be re-mounted on the <span class="Pa">/dev</span> directory.</li> + <li>If a <span class="Pa">/.mount.conf</span> file does not exist in the root + file system which was just mounted, the root mount logic stops here.</li> + <li>If a <span class="Pa">/.mount.conf</span> file exists in the root file + system which was just mounted, this file will be parsed, and the kernel + will use this new config file to try to re-mount the root file system. See + <a class="Sx" href="#FILE_FORMAT">FILE FORMAT</a> for the format of the + config file.</li> + <li>If the new root file system has a <span class="Pa">/.mount</span> + directory, the old root file system will be re-mounted on + <span class="Pa">/.mount</span>.</li> + <li>The root mount logic will go back to step 4.</li> +</ol> +<p class="Pp">The root mount logic is recursive, and step 8 will be repeated as + long as each new root file system which is mounted has a + <span class="Pa">/.mount.conf</span> file.</p> +</section> +<section class="Sh"> +<h1 class="Sh" id="FILE_FORMAT"><a class="permalink" href="#FILE_FORMAT">FILE + FORMAT</a></h1> +<p class="Pp">The kernel parses each line in <span class="Pa">.mount.conf</span> + and then tries to perform the action specified on that line as soon as it is + parsed.</p> +<dl class="Bl-tag"> + <dt id="_"><a class="permalink" href="#_"><code class="Ic">#</code></a></dt> + <dd>A line beginning with a # is a comment and is ignored.</dd> + <dt id="_FS_:_MOUNTPOINT_"><a class="permalink" href="#_FS_:_MOUNTPOINT_"><code class="Ic">{FS}:{MOUNTPOINT} + {OPTIONS}</code></a></dt> + <dd>The kernel will try to mount this in an operation equivalent to: + <div class="Bd Pp Bd-indent Li"> + <pre>mount -t {FS} -o {OPTIONS} {MOUNTPOINT} /</pre> + </div> + <p class="Pp">If this is successfully mounted, further lines in + <span class="Pa">.mount.conf</span> are ignored. If all lines in + <span class="Pa">.mount.conf</span> have been processed and no root file + system has been successfully mounted, then the action specified by + <code class="Ic">.onfail</code> is performed.</p> + </dd> + <dt id=".ask"><a class="permalink" href="#.ask"><code class="Ic">.ask</code></a></dt> + <dd>When the kernel processes this line, a + <code class="Li">mountroot></code> command-line prompt is displayed. At + this prompt, the operator can enter the root mount.</dd> + <dt id=".md"><a class="permalink" href="#.md"><code class="Ic">.md</code></a> + <var class="Ar">file</var></dt> + <dd>Create a memory backed <a class="Xr">md(4)</a> virtual disk, using + <var class="Ar">file</var> as the backing store.</dd> + <dt id=".onfail"><a class="permalink" href="#.onfail"><code class="Ic">.onfail</code></a> + <var class="Ar">[panic|reboot|retry|continue]</var></dt> + <dd>If after parsing all the lines in <span class="Pa">.mount.conf</span> the + kernel is unable to mount a root file system, the + <code class="Ic">.onfail</code> directive tells the kernel what action to + perform.</dd> + <dt id=".timeout"><a class="permalink" href="#.timeout"><code class="Ic">.timeout</code></a> + <var class="Ar">N</var></dt> + <dd>Before trying to mount a root file system, if the root mount device does + not exist, wait at most <var class="Ar">N</var> seconds for the device to + appear before trying to mount it. If <code class="Ic">.timeout</code> is + not specified, the default timeout is 3 seconds.</dd> +</dl> +</section> +<section class="Sh"> +<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1> +<p class="Pp">The following example <span class="Pa">.mount.conf</span> will + direct the kernel to try mounting the root file system first as an ISO + CD9660 file system on <span class="Pa">/dev/cd0</span>, then if that does + not work, as an ISO CD9660 file system on <span class="Pa">/dev/cd1</span>, + and then if that does not work, as a UFS file system on + <span class="Pa">/dev/ada0s1a</span>. If that does not work, a + <code class="Li">mountroot></code> command-line prompt will be displayed + where the operator can manually enter the root file system to mount. Finally + if that does not work, the kernel will panic.</p> +<div class="Bd Pp Bd-indent Li"> +<pre><code class="Li">.onfail panic</code> +<code class="Li">.timeout 3</code> +cd9660:/dev/cd0 ro +<code class="Li">.timeout 0</code> +cd9660:/dev/cd1 ro +<code class="Li">.timeout 3</code> +ufs:/dev/ada0s1a +<code class="Li">.ask</code></pre> +</div> +<p class="Pp">The following example <span class="Pa">.mount.conf</span> will + direct the kernel to create a <a class="Xr">md(4)</a> memory disk attached + to the file <span class="Pa">/data/OS-1.0.iso</span> and then mount the ISO + CD9660 file system on the md device which was just created. The last line is + a comment which is ignored.</p> +<div class="Bd Pp Bd-indent Li"> +<pre><code class="Li">.timeout 3</code> +<code class="Li">.md /data/OS-1.0.iso</code> +<code class="Li">cd9600:/dev/md# ro</code> +<code class="Li"># Can also use cd9660:/dev/md0 ro</code></pre> +</div> +<p class="Pp">The following example <span class="Pa">.mount.conf</span> will + direct the kernel to create a <a class="Xr">md(4)</a> memory disk attached + to the file <span class="Pa">/data/base.ufs.uzip</span> and then mount the + UFS file system on the md uzip device which was just created by the + <a class="Xr">geom_uzip(4)</a> driver.</p> +<div class="Bd Pp Bd-indent Li"> +<pre><code class="Li">.md /data/base.ufs.uzip</code> +<code class="Li">ufs:/dev/md#.uzip ro</code> +<code class="Li"># Can also use ufs:/dev/md0.uzip ro</code></pre> +</div> +<p class="Pp">The following example <span class="Pa">.mount.conf</span> will + direct the kernel to do a unionfs mount on a directory + <span class="Pa">/jail/freebsd-8-stable</span> which has a + <a class="Xr">chroot(2)</a> environment.</p> +<div class="Bd Pp Bd-indent Li"> +<pre><code class="Li">.timeout 3</code> +<code class="Li">unionfs:/jail/freebsd-8-stable</code></pre> +</div> +</section> +<section class="Sh"> +<h1 class="Sh" id="NOTES"><a class="permalink" href="#NOTES">NOTES</a></h1> +<p class="Pp">For each root file system which is mounted, a + <span class="Pa">/dev</span> directory + <a class="permalink" href="#must"><i class="Em" id="must">must</i></a> exist + so that the root mount logic can properly re-mount + <a class="Xr">devfs(4)</a>. If this directory does not exist, the system may + hang during the bootup process.</p> +</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">nmount(2)</a>, <a class="Xr">md(4)</a>, + <a class="Xr">boot.config(5)</a>, <a class="Xr">fstab(5)</a>, + <a class="Xr">boot(8)</a>, <a class="Xr">loader(8)</a>, + <a class="Xr">mount(8)</a></p> +</section> +<section class="Sh"> +<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1> +<p class="Pp">The <code class="Nm">mount.conf</code> file first appeared in + <span class="Ux">FreeBSD 9.0</span>.</p> +</section> +<section class="Sh"> +<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1> +<p class="Pp">The root mount logic in the <span class="Ux">FreeBSD</span> kernel + which parses <span class="Pa">/.mount.conf</span> was written by + <span class="An">Marcel Moolenaar</span> + <<a class="Mt" href="mailto:marcel@FreeBSD.org">marcel@FreeBSD.org</a>>. + This man page was written by <span class="An">Craig Rodrigues</span> + <<a class="Mt" href="mailto:rodrigc@FreeBSD.org">rodrigc@FreeBSD.org</a>>.</p> +</section> +</div> +<table class="foot"> + <tr> + <td class="foot-date">October 17, 2013</td> + <td class="foot-os">FreeBSD 15.0</td> + </tr> +</table> |
