PERFORCE change 160465 for review
Rene Ladan
rene at FreeBSD.org
Fri Apr 10 14:58:07 PDT 2009
http://perforce.freebsd.org/chv.cgi?CH=160465
Change 160465 by rene at rene_self on 2009/04/10 21:57:58
[WIP] solid-state: transform to diskless to rc.d
Affected files ...
.. //depot/projects/docproj_nl/en_US.ISO8859-1/articles/solid-state/article.sgml#10 edit
Differences ...
==== //depot/projects/docproj_nl/en_US.ISO8859-1/articles/solid-state/article.sgml#10 (text+ko) ====
@@ -78,7 +78,7 @@
<para>Specific topics to be covered include the types and attributes of
solid state media suitable for disk use in FreeBSD, kernel options
that are of interest in such an environment, the
- <filename>rc.diskless</filename> mechanisms that automate the
+ <filename>rc.initdiskless</filename> mechanisms that automate the
initialization of such systems and the need for read-only filesystems,
and building filesystems from scratch. The article will conclude
with some general strategies for small and read-only FreeBSD
@@ -128,7 +128,7 @@
<para>A few kernel options are of specific interest to those creating
an embedded FreeBSD system.</para>
- <para>First, all embedded FreeBSD systems that use flash memory as system
+ <para>All embedded FreeBSD systems that use flash memory as system
disk will be interested in memory disks and memory filesystems. Because
of the limited number of writes that can be done to flash memory, the
disk and the filesystems on the disk will most likely be mounted
@@ -147,44 +147,36 @@
</sect1>
<sect1 id="ro-fs">
- <title><filename>rc.diskless</filename> and Read-Only Filesystems</title>
+ <title><filename>rc.initdiskless</filename> and Read-Only Filesystems</title>
<para>The post-boot initialization of an embedded FreeBSD system is
- controlled by <filename>/etc/rc.diskless2</filename>
- (<filename>/etc/rc.diskless1</filename> is for BOOTP diskless boot).
+ controlled by <filename>/etc/rc.initdiskless</filename>.
+<!--XXX (rene) obsolete, alternative needed?
This initialization script is invoked by placing a line in
- <filename>/etc/rc.conf</filename> as follows:</para>
-
- <programlisting>diskless_mount=/etc/rc.diskless2</programlisting>
-
- <para><filename>rc.diskless2</filename> mounts <filename>/var</filename>
+ <filename>/etc/rc.conf</filename> as follows:--></para>
+<!--
+ <programlisting>diskless_mount=/etc/rc.initdiskless</programlisting>
+-->
+ <para><filename>rc.initdiskless</filename> mounts <filename>/var</filename>
as a memory filesystem, makes a configurable list of directories in
<filename>/var</filename> with the &man.mkdir.1; command, changes modes
- on some of those directories, and extracts a list of device entries to
- copy to a writable (again, a memory filesystem)
- <filename>/dev</filename> partition. In the execution of
- <filename>/etc/rc.diskless2</filename>, one other
+ on some of those directories. In the execution of
+ <filename>/etc/rc.initdiskless</filename>, one other
<filename>rc.conf</filename> variable comes into play -
- <literal>varsize</literal>. The <filename>/etc/rc.diskless2</filename>
+ <literal>varsize</literal>. The <filename>/etc/rc.initdiskless</filename>
file creates a <filename>/var</filename> partition based on the value of
this variable in <filename>rc.conf</filename>:</para>
<programlisting>varsize=8192</programlisting>
- <para>Remember that this value is in sectors. The creation of the
- <filename>/dev</filename> partition by
- <filename>/etc/rc.diskless2</filename>, however, is governed by a
- hard-coded value of 4096 sectors. It is trivial to change this entry in
- the <filename>/etc/rc.diskless2</filename> file itself, although you
- should not need more space than that for
- <filename>/dev</filename>.</para>
+ <para>Remember that this value is in sectors.</para>
<para>It is important to remember that the
- <filename>/etc/rc.diskless2</filename> script assumes that you have
+ <filename>/etc/rc.initdiskless</filename> script assumes that you have
already removed your conventional <filename>/tmp</filename> partition
and replaced it with a symbolic link to <filename>/var/tmp</filename>.
Because <filename>tmp</filename> is one of the directories created in
- <filename>/var</filename> by the <filename>/etc/rc.diskless2</filename>
+ <filename>/var</filename> by the <filename>/etc/rc.initdiskless</filename>
script, and because <filename>/var</filename> is a memory filesystem
(which is mounted read-write), <filename>/tmp</filename> will now be a
directory that is read-write as well.</para>
@@ -213,10 +205,10 @@
<filename>/var/db/port.mkversion</filename> file does not exist. cron
will not run properly as a result of missing cron tabs in the
<filename>/var</filename> created by
- <filename>/etc/rc.diskless2</filename>, and syslog and dhcp will
+ <filename>/etc/rc.initdiskless</filename>, and syslog and dhcp will
encounter problems as well as a result of the read-only filesystem and
missing items in the <filename>/var</filename> that
- <filename>/etc/rc.diskless2</filename> has created. These are only
+ <filename>/etc/rc.initdiskless</filename> has created. These are only
temporary problems though, and are addressed, along with solutions to
the execution of other common software packages in
<xref linkend="strategies">.</para>
@@ -360,7 +352,7 @@
<para>In <xref linkend="ro-fs">, it was pointed out that the
<filename>/var</filename> filesystem constructed by
- <filename>/etc/rc.diskless2</filename> and the presence of a read-only
+ <filename>/etc/rc.initdiskless</filename> and the presence of a read-only
root filesystem causes problems with many common software packages used
with FreeBSD. In this article, suggestions for successfully running
cron, syslog, ports installations, and the Apache web server will be
@@ -369,7 +361,7 @@
<sect2>
<title>cron</title>
- <para>In <filename>/etc/rc.diskless2</filename> there is a variable
+ <para>In <filename>/etc/rc.initdiskless</filename> there is a variable
named <literal>var_dirs</literal>. This variable consists of a
space-delimited list of directories that will be created inside of
<filename>/var</filename> after it is mounted as a memory filesystem.
@@ -388,11 +380,11 @@
that need them, mount your <filename>/</filename> filesystem as
read-write and copy those cron tabs to somewhere safe, like
<filename>/etc/tabs</filename>, then add a line to the end of
- <filename>/etc/rc.diskless2</filename> that copies those crontabs into
+ <filename>/etc/rc.initdiskless</filename> that copies those crontabs into
<filename>/var/cron/tabs</filename> after that directory has been
created during system initialization. You may also need to add a line
that changes modes and permissions on the directories you create and
- the files you copy with <filename>/etc/rc.diskless2</filename>.</para>
+ the files you copy with <filename>/etc/rc.initdiskless</filename>.</para>
</sect2>
<sect2>
@@ -400,9 +392,9 @@
<para><filename>syslog.conf</filename> specifies the locations of
certain log files that exist in <filename>/var/log</filename>. These
- files are not created by <filename>/etc/rc.diskless2</filename> upon
+ files are not created by <filename>/etc/rc.initdiskless</filename> upon
system initialization. Therefore, somewhere in
- <filename>/etc/rc.diskless2</filename>, after the section that creates
+ <filename>/etc/rc.initdiskless</filename>, after the section that creates
the directories in <filename>/var</filename>, you will need to add
something like this:</para>
@@ -410,7 +402,7 @@
&prompt.root; <userinput>chmod 0644 /var/log/*</userinput></screen>
<para>You will also need to add the log directory to the list of
- directories that <filename>/etc/rc.diskless2</filename>
+ directories that <filename>/etc/rc.initdiskless</filename>
creates.</para>
</sect2>
@@ -441,7 +433,7 @@
<screen>&prompt.root; <userinput>mkdir /etc/pkg</userinput></screen>
- <para>Now, add a line to <filename>/etc/rc.diskless2</filename> that
+ <para>Now, add a line to <filename>/etc/rc.initdiskless</filename> that
links the <filename>/etc/pkg</filename> directory to
<filename>/var/db/pkg</filename>. An example:</para>
@@ -463,7 +455,7 @@
<filename><replaceable>apache_install</replaceable>/logs</filename>.
Since this directory doubtless exists on a read-only filesystem, this
will not work. It is necessary to add a new directory to the
- <filename>/etc/rc.diskless2</filename> list of directories to create
+ <filename>/etc/rc.initdiskless</filename> list of directories to create
in <filename>/var</filename>, to link
<filename><replaceable>apache_install</replaceable>/logs</filename> to
<filename>/var/log/apache</filename>. It is also necessary to set
@@ -471,10 +463,10 @@
<para>First, add the directory <literal>log/apache</literal> to the list
of directories to be created in
- <filename>/etc/rc.diskless2</filename>.</para>
+ <filename>/etc/rc.initdiskless</filename>.</para>
<para>Second, add these commands to
- <filename>/etc/rc.diskless2</filename> after the directory creation
+ <filename>/etc/rc.initdiskless</filename> after the directory creation
section:</para>
<screen>&prompt.root; <userinput>chmod 0774 /var/log/apache</userinput>
More information about the p4-projects
mailing list