kernfs.po 6.4 KB

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