[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Japanese translation of Debian FAQ



kernel.ja.sgml です。

--
関戸 幸一 <sekido@xxxxxxxxxxxxxx>

<!--
<chapt id="kernel">Debian and the kernel
-->
<chapt id="kernel">Debian とカーネル

<!--
<sect id="non-debian-kernel">Can I install and compile a kernel without
  some Debian-specific tweaking?
-->
<sect id="non-debian-kernel">何らかの Debian 特有の微調整をしなくてもカー
ネルをコンパイル・インストールできますか?

<!--
<p>Yes.  But you have to understand the Debian policy with respect to headers.
-->
<p>できます。ただしヘッダに関する Debian のポリシーを理解しておかなけれ
ばなりません。

<!--
<p>The Debian C libraries are built with the most recent <em>stable</em>
releases of the <strong>kernel</strong> headers.
-->
<p>
Debian の C ライブラリは、最も新しい<em>安定版</em>リリースの<strong>カー
ネル</strong>ヘッダで構築されています。

<!--
<p>For example, the Debian-1.2 release used version 5.4.13 of the headers.
This practice contrasts with the Linux kernel source packages distributed
at all Linux FTP archive sites, which uses even more recent versions of
the headers.  The kernel headers distributed with the kernel source are
located in <tt>/usr/include/linux/include/</tt>.
-->
<p>例えば Debian 1.2 リリースはバージョン 5.4.13 のヘッダを使っていまし
た。この実践は、すべての Linux FTP アーカイブサイトで配布されている
Linux カーネルのソースパッケージと対立します。これらはもっと新しいバージョ
ンのヘッダを使っているのです。カーネルソースと共に配布されているカーネル
ヘッダは <tt>/usr/include/linux/include/</tt> に位置しています。

<!--
<p>If you need to compile a program with kernel headers that are newer
than those provided by <package/libc6-dev/, then you must add
<tt>-I/usr/src/linux/include/</tt> to your command line when compiling.
This came up at one point, for example, with the packaging of the
automounter daemon (<package/amd/).  When new kernels changed some
internals dealing with NFS, <tt>amd</tt> needed to know about them.
This required the inclusion of the latest kernel headers.
-->
<p><package/libc6-dev/ で提供されているものより新しいカーネルヘッダでプ
ログラムをコンパイルしたい場合は、コンパイル時のコマンドラインに
<tt>-I/usr/src/linux/include/</tt> を加えなければなりません。このことは
例えばオートマウンタデーモン (<package/amd/) をパッケージ化する際に問題
になりました。新しいカーネルが NFS 関連で内部に変更があった場合、
<tt>amd</tt> はそのことを知る必要がありました。つまり最新のカーネルヘッ
ダを含める必要があったのです。

<!--
<sect id="customkernel">What tools does Debian provide to build custom
  kernels?
-->
<sect id="customkernel">カスタムカーネルを構築するために Debian にはどん
なツールがあるのですか?

<!--
<p>Users who wish to (or must) build a custom kernel are encouraged to
download the package <package/kernel-package/.  This package contains
the script to build the kernel package, and provides the capability to
create a Debian kernel-image package just by running the command
  <example>make-kpkg kernel_image</example>
in the top-level kernel source directory.
Help is available by executing the command
  <example>make-kpkg &#45;&#45;help</example>
and through the manual page <manref name="make-kpkg" section="8">.
-->
<p>カスタムカーネルを構築したい (あるいは、しなければならない) ユーザは
<package/kernel-package/ をダウンロードして下さい。このパッケージにはカー
ネルパッケージを構築するためのスクリプトが含まれており、カーネルのソース
のトップディレクトリでコマンド <example>make-kpkg kernel_image</example> 
を実行するだけで Debian の kernel-image パッケージを作成してくれます。
詳しい説明はコマンド <example>make-kpkg --help</example> を実行するか、
<manref name="make-kpkg" section="8"> のマニュアルページを見て下さい。

<!--
<p>Users must separately download the source code for the most recent
kernel (or the kernel of their choice) from their favorite Linux archive
site, unless a kernel-source-version package is available (where "version"
stands for the kernel version).
-->
<p>またこれとは別に、最新のカーネル (あるいはお好みのカーネル) のソース
コードをお気に入りの Linux アーカイブサイトからダウンロードしておいて下
さい。kernel-source-version (「version」はカーネルバージョンのこと) パッ
ケージがある場合は必要ありません。

<!--
<p>Detailed instructions for using the <package/kernel-package/ package
are given in the file <tt>/usr/doc/kernel-package/README</tt>. Briefly,
one should:
-->
<p><package/kernel-package/ パッケージを利用する際の詳しい手順はファイル
<tt>/usr/doc/kernel-package/README</tt> に記されています。簡単に述べると
次のようになります。

<!--
<list>
  <item>Unpack the kernel sources, and <tt>cd</tt> to the newly created
    directory.
  <item>Modify the kernel configuration using one of these commands:
    <list>
      <item><tt>make config</tt>  (for a tty one-line-at-a-time-interface).
      <item><tt>make menuconfig</tt>  (for an ncurses-based menu driven interface).
        Note that to use this option, the <package/libncurses5-dev/ package
        must be installed.
      <item><tt>make xconfig</tt>  (for an X11 interface).
        Using this option requires that relevant X and Tcl/Tk packages be
        installed.
    </list>
    Any of the above steps generates a new <tt>.config</tt> in the top-level
    kernel source directory.
  <item>Execute the command: <tt>make-kpkg -rev Custom.N kernel_image</tt>,
    where N is a revision number assigned by the user.
    The new Debian archive thus formed would have revision Custom.1, e.g.,
    <tt>kernel-image-2.2.14_Custom.1_i386.deb</tt>
    for the Linux kernel 2.2.14.
  <item>Install the package created.
    <list>
    <item><tt>Run dpkg &#45;&#45;install /usr/src/kernel-image-VVV_Custom.N.deb</tt>
      to install the kernel itself.  The installation script will:
      <list>
        <item>run the boot loader, LILO (if it is installed),
        <item>install the custom kernel in /boot/vmlinuz_VVV-Custom.N, and
          set up appropriate symbolic links to the most recent kernel version.
        <item>prompt the user to make a boot floppy.  This boot floppy will
          contain the raw kernel only.  See <ref id="custombootdisk">.
      </list>
    <item>To employ secondary boot loaders such as <package/grub/ or
      <tt/loadlin/, copy this image to other locations (e.g., to /boot/grub
      or to an <tt>MS-DOS</tt> partition).
  </list>
</list>
-->
<list>
  <item>カーネルのソースを展開し、新しく作成されたディレクトリに
  <tt>cd</tt> (移動) して下さい。
  <item>以下のコマンドのどれかを使ってカーネルの設定を修正して下さい。
    <list>
      <item><tt>make config</tt> (tty で一度に一行づつ設定していきます)。
      <item><tt>make menuconfig</tt> (ncurses ベースのメニュー形式インタ
        フェース)。この方法を使うには <package/libncurses5-dev/ パッケー
        ジがインストールされている必要があります。
      <item><tt>make xconfig</tt> (X11 インタフェース)。この方法を使うに
        は、X と Tcl/Tk の適切なパッケージ群がインストールされている必要
        があります。
    </list>
    どのやり方でも、カーネルのソースのトップディレクトリに新しい
    <tt>.config</tt> が作成されます。
  <item><tt>make-kpkg -rev Custom.N kernel_image</tt> というコマンドを実
  行して下さい。ここで N はユーザが割り当てるリビジョン番号です。このよ
  うにして作った新しい Debian アーカイブはリビジョン Custom.1 になります。
  例えば、Linux カーネル 2.2.14 に対して、
  <tt>kernel-image-2.2.14_Custom.1_i386.deb</tt> が作成されます。
  <item>作成したパッケージをインストールして下さい。
    <list>
    <item><tt>dpkg --install
    /usr/src/kernel-image_VVV_Custom.N.deb</tt> を実行してカーネルをイン
    ストールして下さい。インストールスクリプトは以下のことをします。
      <list>
        <item>(もし LILO がインストールされていれば) ブートローダ LILO
          を走らせる。
        <item>カスタムカーネルを /boot/vmlinuz_VVV-Custom.N にインストー
          ルして、最も新しいバージョンのカーネルに適切なシンボリックリン
          クを作成する。
        <item>ブートフロッピーを作るかどうかをユーザに尋ねる。このブート
        フロッピーは raw カーネルだけを含みます。<ref
        id="custombootdisk"> を見て下さい。
      </list>
    <item><package/grub/ や <tt/loadlin/ のような 2 次的なブートローダを
    使うには、このイメージを別の場所 (例えば /boot/grub や
    <tt>MS-DOS</tt> のパーティション) にコピーして下さい。
  </list>
</list>

<!--
<sect id="custombootdisk">How can I make a custom boot floppy?
-->
<sect id="custombootdisk">カスタムブートフロッピーを作るにはどうすればよ
いですか?

<!--
<p>This task is greatly aided by the Debian package <package/boot-floppies/,
normally found in the <tt>admin</tt> section of the Debian FTP archive.
Shell scripts in this package produce boot floppies in the <tt>SYSLINUX</tt>
format.  These are <tt>MS-DOS</tt> formatted floppies whose master boot
records have been altered so that they boot Linux directly (or whatever
other operating system has been defined in the syslinux.cfg file on the
floppy). Other scripts in this package produce emergency root disks and
can even reproduce the base disks.
-->
<p>この作業には、通常 Debian FTP アーカイブの <tt>admin</tt> セクション
にある Debian パッケージ <package/boot-floppies/ がとても役に立ちます。
このパッケージのシェルスクリプトは <tt>SYSLINUX</tt> 形式でブートフロッ
ピーを作成します。これはマスターブートレコードが変更された
<tt>MS-DOS</tt> 形式のフロッピーなので、Linux (あるいはフロッピー中のファ
イル syslinux.cfg で設定した別の OS) を直接ブートします。またこのパッケー
ジには、非常用のルートディスクを作成したり、ベースディスクを再作成したり
するスクリプトも含まれています。

<!--
<p>You will find more information about this in the
<tt>/usr/doc/boot-floppies/README</tt> file after installing the
<package/boot-floppies/ package.
-->
<p><package/boot-floppies/ パッケージをインストールしたあとなら
<tt>/usr/doc/boot-floppies/README</tt> ファイルでこれに関する詳しい情報
を得ることができます。

<!--
<sect id="modules">What special provisions does Debian provide to deal with
  modules?
-->
<sect id="modules">Debian にはモジュールを扱うための何か特別な決まりがあ
りますか?

<!--
<p>Debian's <package/modconf/ package provides a shell script
(<tt>/usr/sbin/modconf</tt>) which can be used to customize the
configuration of modules.  This script presents a menu-based interface,
prompting the user for particulars on the loadable device drivers
in his system.  The responses are used to customize the file
<tt>/etc/modules.conf</tt> (which lists aliases, and other arguments that
must be used in conjunction with various modules) through files in
<tt>/etc/modutils/</tt>, and <tt>/etc/modules</tt> (which lists the
modules that must be loaded at boot time).
-->
<p>Debian の <package/modconf/ パッケージには、モジュールの設定をカスタ
マイズするシェルスクリプト (<tt>/usr/sbin/modconf</tt>) が入っています。
このスクリプトはメニューベースのインタフェースを持ち、ユーザはシステム中
のロード可能なデバイスドライバの詳細な設定を行うことができます。これを使
うと、<tt>/etc/modutils/</tt> 以下のファイルと <tt>/etc/modules</tt> (ブー
ト時にロードするモジュールを記入します) とを通じて、ファイル 
<tt>/etc/modules.conf</tt> (エイリアスや様々なモジュールの組み合わせに必要な引数を記入します) をカスタマイズすることができます。

<!--
<p>Like the (new) Configure.help files that are now available to support
the construction of custom kernels, the modconf package comes with a
series of help files (in <tt>/usr/lib/modules_help/</tt>) which provide
detailed information on appropriate arguments for each of the modules.
-->
<p>(新しい) Configure.help ファイルがカスタムカーネルの構築をサポートし
てくれますし、modconf パッケージにも、個々のモジュールに関する適切な引数
の詳しい情報を教えてくれるヘルプファイルが
(<tt>/usr/lib/modules_help/</tt> に) 付属しています。

<!--
<sect id="removeoldkernel">Can I safely de-install an old kernel package,
  and if so, how?
-->
<sect id="removeoldkernel">古いカーネルを安全に消去することはできますか
? もしできるならどうすればいいのですか?

<!--
<p>Yes.  The <tt>kernel-image-NNN.prerm</tt> script checks to see whether
the kernel you are currently running is the same as the kernel you are trying
to de-install.  Therefore you can remove unwanted kernel image packages using
this command:
-->
<p>できます。<tt>kernel-image-NNN.prerm</tt> スクリプトは、現在動いてい
るカーネルが消去しようとしているカーネルと同じかどうかを調べてくれます。
したがって次のコマンドを使えば不要なカーネルイメージパッケージを消去する
ことができます。

<example>dpkg --purge --force-remove-essential kernel-image-NNN</example>

<!--
(replace "NNN" with your kernel version and revision number, of course)
-->
(もちろん「NNN」はあなたのバージョン・リビジョン番号に置き換えてください
)