1
0

kernfs.po 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. msgid ""
  2. msgstr ""
  3. "Project-Id-Version: PACKAGE VERSION\n"
  4. "POT-Creation-Date: 2020-06-17 12:44+0800\n"
  5. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  6. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  7. "Language-Team: LANGUAGE <LL@li.org>\n"
  8. "Language: zh_CN\n"
  9. "MIME-Version: 1.0\n"
  10. "Content-Type: text/plain; charset=UTF-8\n"
  11. "Content-Transfer-Encoding: 8bit\n"
  12. "X-Generator: Translate Toolkit 2.2.5\n"
  13. #. type: Content of: <sect1><title>
  14. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:11
  15. msgid "Preparing Virtual Kernel File Systems"
  16. msgstr "准备虚拟内核文件系统"
  17. #. type: Content of: <sect1><indexterm><primary>
  18. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:14
  19. msgid "/dev/*"
  20. msgstr "/dev/*"
  21. #. type: Content of: <sect1><para>
  22. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:17
  23. msgid ""
  24. "Various file systems exported by the kernel are used to communicate to and "
  25. "from the kernel itself. These file systems are virtual in that no disk space "
  26. "is used for them. The content of the file systems resides in memory."
  27. msgstr ""
  28. "内核对外提供了一些文件系统,以便自己和用户空间进行通信。它们是虚拟文件系统,"
  29. "并不占用磁盘空间,其内容保留在内存中。"
  30. #. type: Content of: <sect1><para>
  31. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:22
  32. msgid ""
  33. "Begin by creating directories onto which the file systems will be mounted:"
  34. msgstr "首先创建这些文件系统的挂载点:"
  35. #. type: Content of: <sect1><screen>
  36. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:25
  37. #, no-wrap
  38. msgid "<userinput>mkdir -pv $LFS/{dev,proc,sys,run}</userinput>"
  39. msgstr "<userinput>mkdir -pv $LFS/{dev,proc,sys,run}</userinput>"
  40. #. type: Content of: <sect1><sect2><title>
  41. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:28
  42. msgid "Creating Initial Device Nodes"
  43. msgstr "创建初始设备节点"
  44. #. type: Content of: <sect1><sect2><para>
  45. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:30
  46. msgid ""
  47. "When the kernel boots the system, it requires the presence of a few device "
  48. "nodes, in particular the <filename class=\"devicefile\">console</filename> "
  49. "and <filename class=\"devicefile\">null</filename> devices. The device nodes "
  50. "must be created on the hard disk so that they are available before the "
  51. "kernel populates <systemitem class=\"filesystem\">/dev</systemitem>), and "
  52. "additionally when Linux is started with <parameter>init=/bin/bash</"
  53. "parameter>. Create the devices by running the following commands:"
  54. msgstr ""
  55. "在内核引导系统时,它需要一些设备节点,特别是 <filename class=\"devicefile"
  56. "\">console</filename> 和 <filename class=\"devicefile\">null</filename> 两个"
  57. "设备。它们需要创建在硬盘上,这样在内核填充 "
  58. "<systemitem class=\"filesystem\">/dev</systemitem> 前,"
  59. "或者 Linux 使用 <parameter>init=/bin/bash</parameter> 内核选项启动时,"
  60. "也能使用它们。运行以下命令创建它们:"
  61. #. type: Content of: <sect1><sect2><screen>
  62. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:40
  63. #, no-wrap
  64. msgid ""
  65. "<userinput>mknod -m 600 $LFS/dev/console c 5 1\n"
  66. "mknod -m 666 $LFS/dev/null c 1 3</userinput>"
  67. msgstr ""
  68. "<userinput>mknod -m 600 $LFS/dev/console c 5 1\n"
  69. "mknod -m 666 $LFS/dev/null c 1 3</userinput>"
  70. #. type: Content of: <sect1><sect2><title>
  71. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:46
  72. msgid "Mounting and Populating /dev"
  73. msgstr "挂载和填充 /dev"
  74. #. type: Content of: <sect1><sect2><para>
  75. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:48
  76. msgid ""
  77. "The recommended method of populating the <filename class=\"directory\">/dev</"
  78. "filename> directory with devices is to mount a virtual filesystem (such as "
  79. "<systemitem class=\"filesystem\">tmpfs</systemitem>) on the <filename class="
  80. "\"directory\">/dev</filename> directory, and allow the devices to be created "
  81. "dynamically on that virtual filesystem as they are detected or accessed. "
  82. "Device creation is generally done during the boot process by Udev. Since "
  83. "this new system does not yet have Udev and has not yet been booted, it is "
  84. "necessary to mount and populate <filename class=\"directory\">/dev</"
  85. "filename> manually. This is accomplished by bind mounting the host system's "
  86. "<filename class=\"directory\">/dev</filename> directory. A bind mount is a "
  87. "special type of mount that allows you to create a mirror of a directory or "
  88. "mount point to some other location. Use the following command to achieve "
  89. "this:"
  90. msgstr ""
  91. "用设备文件填充 <filename class=\"directory\">/dev</filename> 目录的推荐方法是"
  92. "挂载一个虚拟文件系统 (例如 <systemitem class=\"filesystem\">tmpfs</"
  93. "systemitem>) 到 <filename class=\"directory\">/dev</filename>,然后在设备被"
  94. "发现或访问时动态地创建设备文件。这个工作通常由 Udev 在系统引导时完成。然而,"
  95. "我们的新系统还没有 Udev,也没有被引导过,因此必须手工挂载和填充 <filename "
  96. "class=\"directory\">/dev</filename>。这可以通过绑定挂载宿主系统的 <filename "
  97. "class=\"directory\">/dev</filename> 目录就实现。绑定挂载是一种特殊挂载类型,"
  98. "它允许在另外的位置创建某个目录或挂载点的映像。运行以下命令进行绑定挂载:"
  99. #. type: Content of: <sect1><sect2><screen>
  100. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:63
  101. #, no-wrap
  102. msgid "<userinput>mount -v --bind /dev $LFS/dev</userinput>"
  103. msgstr "<userinput>mount -v --bind /dev $LFS/dev</userinput>"
  104. #. type: Content of: <sect1><sect2><title>
  105. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:68
  106. msgid "Mounting Virtual Kernel File Systems"
  107. msgstr "挂载虚拟内核文件系统"
  108. #. type: Content of: <sect1><sect2><para>
  109. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:70
  110. msgid "Now mount the remaining virtual kernel filesystems:"
  111. msgstr "现在挂载其余的虚拟内核文件系统:"
  112. #. type: Content of: <sect1><sect2><screen>
  113. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:72
  114. #, no-wrap
  115. msgid ""
  116. "<userinput>mount -v --bind /dev/pts $LFS/dev/pts\n"
  117. "mount -vt proc proc $LFS/proc\n"
  118. "mount -vt sysfs sysfs $LFS/sys\n"
  119. "mount -vt tmpfs tmpfs $LFS/run</userinput>"
  120. msgstr ""
  121. "<userinput>mount -v --bind /dev/pts $LFS/dev/pts\n"
  122. "mount -vt proc proc $LFS/proc\n"
  123. "mount -vt sysfs sysfs $LFS/sys\n"
  124. "mount -vt tmpfs tmpfs $LFS/run</userinput>"
  125. #. type: Content of: <sect1><sect2><para>
  126. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:105
  127. msgid ""
  128. "In some host systems, <filename>/dev/shm</filename> is a symbolic link to "
  129. "<filename class=\"directory\">/run/shm</filename>. The /run tmpfs was "
  130. "mounted above so in this case only a directory needs to be created."
  131. msgstr ""
  132. "在某些宿主系统上,<filename>/dev/shm</filename> 是一个指向 <filename class="
  133. "\"directory\">/run/shm</filename> 的符号链接。我们已经在 /run 下挂载了 "
  134. "tmpfs 文件系统,因此在这里只需要创建一个目录。"
  135. #. type: Content of: <sect1><sect2><screen>
  136. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/kernfs.xml:110
  137. #, no-wrap
  138. msgid ""
  139. "<userinput>if [ -h $LFS/dev/shm ]; then\n"
  140. " mkdir -pv $LFS/$(readlink $LFS/dev/shm)\n"
  141. "fi</userinput>"
  142. msgstr ""
  143. "<userinput>if [ -h $LFS/dev/shm ]; then\n"
  144. " mkdir -pv $LFS/$(readlink $LFS/dev/shm)\n"
  145. "fi</userinput>"