2 % This is part of LFSbookja package.
4 % This is a CTIE change file for the original XML source of the LFSbook.
7 <?xml version="1.0" encoding="ISO-8859-1"?>
9 <?xml version="1.0" encoding="UTF-8"?>
13 <title>Preparing Virtual Kernel File Systems</title>
15 <title>仮想カーネルファイルシステムの準備</title>
19 <para>Various file systems exported by the kernel are used to communicate to
20 and from the kernel itself. These file systems are virtual in that no disk
21 space is used for them. The content of the file systems resides in
25 カーネルが取り扱うさまざまなファイルシステムは、カーネルとの間でやり取りが行われます。
26 これらのファイルシステムは仮想的なものであり、ディスクを消費するものではありません。
27 ファイルシステムの内容はメモリ上に保持されます。
32 <para>Begin by creating directories onto which the file systems will be
36 ファイルシステムをマウントするディレクトリを以下のようにして生成します。
41 <title>Creating Initial Device Nodes</title>
43 <title>初期デバイスノードの生成</title>
47 <para>When the kernel boots the system, it requires the presence of a few
48 device nodes, in particular the <filename
49 class="devicefile">console</filename> and <filename
50 class="devicefile">null</filename> devices. The device nodes must be
51 created on the hard disk so that they are available before the kernel
52 populates <systemitem class="filesystem">/dev</systemitem>), and
53 additionally when Linux is started with
54 <parameter>init=/bin/bash</parameter>. Create the devices by running the
55 following commands:</para>
58 カーネルがシステムを起動する際には、いくつかのデバイスノードの存在が必要です。
59 特に <filename class="devicefile">console</filename> と <filename class="devicefile">null</filename> です。
60 これらのデバイスノードはハードディスク上に生成されていなければなりません。
61 <systemitem class="filesystem">/dev</systemitem> が生成され、また Linux が起動パラメーター <parameter>init=/bin/bash</parameter> によって起動されれば利用可能となります。
62 そこで以下のコマンドによりデバイスノードを生成します。
67 <title>Mounting and Populating /dev</title>
69 <title>/dev のマウントと有効化</title>
73 <para>The recommended method of populating the <filename
74 class="directory">/dev</filename> directory with devices is to mount a
75 virtual filesystem (such as <systemitem
76 class="filesystem">tmpfs</systemitem>) on the <filename
77 class="directory">/dev</filename> directory, and allow the devices to be
78 created dynamically on that virtual filesystem as they are detected or
79 accessed. Device creation is generally done during the boot process
80 by Udev. Since this new system does not yet have Udev and has not yet
81 been booted, it is necessary to mount and populate <filename
82 class="directory">/dev</filename> manually. This is accomplished by bind
83 mounting the host system's <filename class="directory">/dev</filename>
84 directory. A bind mount is a special type of mount that allows you to
85 create a mirror of a directory or mount point to some other location. Use
86 the following command to achieve this:</para>
89 各デバイスを <filename class="directory">/dev</filename> に設定する方法としては、<filename
90 class="directory">/dev</filename> ディレクトリに対して <systemitem
91 class="filesystem">tmpfs</systemitem> のような仮想ファイルシステムをマウントすることが推奨されます。
92 こうすることで各デバイスが検出されアクセスされる際に、その仮想ファイルシステム上にて動的にデバイスを生成する形を取ることができます。
93 このデバイス生成処理は一般的にはシステム起動時に Udev によって行われます。
94 今構築中のシステムにはまだ Udev を導入していませんし、再起動も行っていませんので <filename
95 class="directory">/dev</filename> のマウントと有効化は手動で行ないます。
96 これはホストシステムの <filename class="directory">/dev</filename> ディレクトリに対して、バインドマウントを行うことで実現します。
97 バインドマウント (bind mount) は特殊なマウント方法の一つで、ディレクトリのミラーを生成したり、他のディレクトリへのマウントポイントを生成したりします。
103 <title>Mounting Virtual Kernel File Systems</title>
105 <title>仮想カーネルファイルシステムのマウント</title>
109 <para>Now mount the remaining virtual kernel filesystems:</para>
111 <para>残りの仮想カーネルファイルシステムを以下のようにしてマウントします。</para>
115 <title>The meaning of the mount options for devpts:</title>
117 <title>devpts に対するマウントオプションの意味</title>
121 <para>This ensures that all devpts-created device nodes are owned by
122 group ID 5. This is the ID we will use later on for the <systemitem
123 class="groupname">tty</systemitem> group. We use the group ID instead
124 of a name, since the host system might use a different ID for its
125 <systemitem class="groupname">tty</systemitem> group.</para>
128 このオプションは、devpts により生成されるデバイスノードを、グループID が 5 となるようにするものです。
129 この ID は、この後に <systemitem
130 class="groupname">tty</systemitem> グループにおいて利用します。
131 ここではグループ名ではなくグループ ID を用いるものとしています。
132 この理由は、ホストシステムが <systemitem
133 class="groupname">tty</systemitem> グループに対して異なる ID を利用していることがあるためです。
138 <para>This ensures that all devpts-created device nodes have mode 0620
139 (user readable and writable, group writable). Together with the
140 option above, this ensures that devpts will create device nodes that
141 meet the requirements of grantpt(), meaning the Glibc
142 <command>pt_chown</command> helper binary (which is not installed by
143 default) is not necessary.</para>
146 このオプションは、devpts により生成されるデバイスノードのモードを 0620 にします。
147 (所有ユーザーが読み書き可、グループが書き込み可)
148 前のオプションとともにこのオプションを指定することによって、devpts が生成するデバイスノードが grantpt() の要求を満たすようにします。
149 これはつまり、Glibc の ヘルパーコマンド <command>pt_chown</command> (デフォルトではインストールされない) が必要ないことを意味します。
154 <para>In some host systems, <filename>/dev/shm</filename> is a
155 symbolic link to <filename class="directory">/run/shm</filename>.
156 The /run tmpfs was mounted above so in this case only a
157 directory needs to be created.</para>
160 ホストシステムによっては <filename>/dev/shm</filename> が <filename
161 class="directory">/run/shm</filename> へのシンボリックリンクになっているものがあります。
162 上の作業にて /run tmpfs がマウントされましたが、これはこのディレクトリを生成する必要がある時のみです。