浏览代码

[Bug 183] /etc/mtab --> /proc/mounts symlink added

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1475 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Mark Hymers 23 年之前
父节点
当前提交
5ef3797c41
共有 4 个文件被更改,包括 29 次插入0 次删除
  1. 3 0
      chapter01/changelog.xml
  2. 1 0
      chapter06/chapter06.xml
  3. 24 0
      chapter06/mtablink.xml
  4. 1 0
      index.xml

+ 3 - 0
chapter01/changelog.xml

@@ -23,6 +23,9 @@
 
 <itemizedlist>
 
+<listitem><para>January 23rd, 2002 [markh]: Chapter 6: Added the section
+Create /etc/mtab symlink.</para></listitem>
+
 <listitem><para>January 23rd, 2002 [gerard]: Removed the file -C command
 from the file installation. This package runs this command at the very end
 of the installation so we don't need to do this anymore.</para></listitem>

+ 1 - 0
chapter06/chapter06.xml

@@ -7,6 +7,7 @@
 &c6-bashprofile;
 &c6-chroot;
 &c6-changingowner;
+&c6-mtablink;
 &c6-glibc;
 &c6-makedev;
 &c6-manpages;

+ 24 - 0
chapter06/mtablink.xml

@@ -0,0 +1,24 @@
+<sect1 id="ch06-mtablink">
+<title>Creating the /etc/mtab symlink</title>
+<?dbhtml filename="mtablink.html" dir="chapter06"?>
+
+<para>The next thing to do is to create a symlink pointing from
+/etc/mtab to /proc/mounts.  This is done using the following
+command:</para>
+
+<para><screen><userinput>ln -s /proc/mounts /etc/mtab</userinput></screen></para>
+
+<para>Creating this symlink avoids problems which can occur if / is
+mounted read-only and the information in /etc/mtab is stale (i.e. out of
+date).  By creating the symlink to /proc/mounts, we ensure that
+/etc/mtab will always be up-to-date.</para>
+
+<para>Note that using this symlink requires that you have /proc
+filesystem support compiled into your kernel.  This is included by
+default and should not be removed unless you <emphasis>really</emphasis>
+know what you are doing as  many more things than just the /etc/mtab
+symlink depend on /proc being present.  In summary, make sure you have
+/proc filesystem support in your kernel.</para>
+
+</sect1>
+

+ 1 - 0
index.xml

@@ -197,6 +197,7 @@
 <!ENTITY c6-chrootcmd SYSTEM "chapter6/chrootcmd.xml">
 <!ENTITY c6-chroot SYSTEM "chapter6/chroot.xml">
 <!ENTITY c6-changingowner SYSTEM "chapter6/changingowner.xml">
+<!ENTITY c6-mtablink SYSTEM "chapter6/mtablink.xml">
 <!ENTITY c6-glibc SYSTEM "chapter6/glibc.xml">
 <!ENTITY c6-glibc-inst SYSTEM "chapter6/glibc-inst.xml">
 <!ENTITY c6-glibc-exp SYSTEM "chapter6/glibc-exp.xml">