八津尾です。
章が飛びますが 7 章 initramfs の日本語訳です。
査読のをお願いします。
なお、titanpad にも貼りつけました。
突っこみがあれば直接編集したいただくと助かります。
(もちろんメールでの指摘でもかまいません)
<!-- 7.DebianKernelHandbook_initramfs -->
<chapt id="initramfs">
<!-- <heading>Managing the initial ramfs (initramfs) archive</heading> -->
<heading>起動用RAMイメージ (initramfs) アーカイブの管理</heading>
<!--
<p>
The booting in Debian is a two-stage process, involving
the initial RAM filesystem (initramfs for short, sometimes it
is also referred to as initrd, which stands for initial RAM
disk). First, the bootloader loads the kernel and initramfs
into memory, and passes the execution control to the
kernel. After basic initialization the kernel extracts the
initramfs archive and mounts it as a temporary root
filesystem. initramfs contains kernel modules and userspace
programs required to initialize the physical or logical
device(s) containing the real root filesystem. The
<tt>init</tt> script on the initramfs loads modules and
performs other neccessary initialization steps. At the end of
this stage <tt>run-init</tt> deletes the initramfs from
memory, mounts the real root filesystem and passes control to
the <tt>/sbin/init</tt> program on it.
</p>
-->
<p>
Debian の起動は、初期 RAM ファイルシステム (initramfs または 初期 RAM
ディスク の意で、initrd と呼ばれることもあります。)を含めて 2 段階の
プロセスを踏みます。まず、ブートローダがカーネルと initramfs をメモリ
に読み込み、実行制御をカーネルに渡します。基本的な初期化が終了すると、
カーネルが initramfs アーカイブを展開し、一時的なルートファイルシステ
ムとしてマウントします。initramfs にはカーネルモジュールと、物理デバイ
ス、または論理デバイスの初期化を必要とするユーザ空間プログラムが含まれ
ています。本物のルートファイルシステムもここに含まれます。
initramfs の <tt>init</tt> スクリプトがモジュールをロードし、その他の
初期化処理を行います。このステージの最後に、<tt>run-init</tt> が
initramfs をメモリから消去し、本物のルートファイルシステムをロードします。
そして本物のルートファイルシステム上の <tt>/sbin/init</tt> プログラムに
制御を渡します。
</p>
<!--
<p>
Two major goals are achieved with such setup: the kernel size
is kept under control by allowing most of the drivers to be
compiled as modules (in a initramfs-less setup the drivers
neccessary for the boot-time initialization of the root device
must be compiled into it) and allow the setups which require
initialization which cannot be done in-kernel, but is performed
by userspace utilities.
</p>
-->
<p>
この仕組みを採用することによって、 2 つの大きな目的を達成しています。
まず、ドライバをモジュールとしてコンパイルすることでカーネルのサイズを抑え
ること。 (initramfs がない場合、ルートデバイスを起動し初期化するために必要
なドライバは、あらかじめカーネルに組込まれていなければなりません。) そして、
カーネルで行うことができないユーザ空間のユーティリティで実行される初期化が
必要な設定の実行を可能にすることです。
</p>
<sect id="initramfs-gen-tools">
<!-- <heading>Initramfs generation tools</heading> -->
<heading>initramfs 生成ツール</heading>
<!--
<p>
Since initramfs usually needs to be customized for the particular
hardware/device configuration and kernel version, they are not
included as a part of any package, but are generated on the
fly at kernel installation time. Currently there are two tools
in Debian capable of generating an initramfs:
<tt>update-initramfs</tt> provided by <tt>initramfs-tools</tt>
(default) and <tt>dracut-update-initramfs</tt> provided by the
<tt>dracut</tt> package (experimental).
</p>
-->
<p>
通常 initramfs は特定のハードウェア/デバイス構成とカーネルのバージョン毎に
カスタマイズする必要があるので、パッケージの一部としては提供されず、カーネ
ルのインストール時にその場で生成されます。今のところ Debian で initramfs を
生成できるツールは 2 つあります。<tt>initramfs-tools</tt> によって提供される
<tt>update-initramfs</tt> (標準) と <tt>dracut</tt> パッケージによって提供
される <tt>dracut-update-initramfs</tt> (実験的) です。
</p>
</sect>
<sect id="initramfs-regen">
<!--<heading>Regenerating the initramfs</heading>-->
<heading>initramfs の再生成</heading>
<!--
<p>
If changes are desired after the corresponding
<tt>linux-image</tt> has been installed, the initramfs needs to
be regenerated. This is achieved by the command
<example> # dpkg-reconfigure linux-image-3.2.0-2-686-pae </example>
where <tt>linux-image-3.2.0-2-686-pae</tt> is the name of the
kernel package for which the initramfs regeneration is requested.
</p>
-->
<p>
適切な <tt>linux-image</tt> をインストールした後に、その変更をしたい場合は
initramfs を再生成しなければなりません。initramfs は次のコマンドによってア
ーカイブ化されます。
<example> # dpkg-reconfigure linux-image-3.2.0-2-686-pae </example>
<tt>linux-image-3.2.0-2-686-pae</tt> は initramfs の生成を必要としているカ
ーネルパッケージの名前です。
</sect>
<sect id="initramfs-exam">
<!--<heading>Examining the initramfs contents</heading>-->
<heading>initramfs の中身を検査する</heading>
<!--
<p>
Occasionally it is useful to examine the contents of initramfs
to diagnose a problem or for educational purposes. They are
compressed <tt>cpio</tt> archives, which may be extracted
using the command
<example> $ zcat /boot/initrd.img-3.2.0-2-686-pae | cpio -i </example>
It will unpack the contents of the initramfs into the current directory.
</p>
-->
<p>
学習のためや、問題を分析するために initramfs の中身を調べることが時として役
に立ちます。initramfs は <tt>cpio</tt> アーカイブとして圧縮されており、展開
には
<example> $ zcat /boot/initrd.img-3.2.0-2-686-pae | cpio -i </example>
コマンドを使用します。このコマンドでカレントディレクトリに initramfs の中身
が展開されます。
</p>
<!--
<p>
It is also possible to list the contents of an initramfs
using the <tt>cpio -t</tt> option or the command
<example> $ lsinitramfs /boot/initrd.img-3.2.0-2-686-pae </example>
</p>
-->
<p>
initramfs の中身の一覧を取得するために、<tt>cpio -t</tt>オプションか、
<example> $ lsinitramfs /boot/initrd.img-3.2.0-2-686-pae </example>
コマンドを利用することもできます。
</p>
</sect>
</chapt>
Attachment:
signature.asc
Description: Digital signature