The Linux Kernel HOWTO <author>Brian Ward, <tt>bri@cs.uchicago.edu</tt> <date>v1.0, 5 June 1999 <trans>嶋崎@梨大 と JF Project <tdate>13 July 1999 <abstract> <!-- This is a detailed guide to kernel configuration, compilation, upgrades, and troubleshooting for ix86-based systems. --> この文書は Intel x86 ベースのシステム向けのカーネルの設定・コンパイル・ アップグレード・トラブルシューティングに関する詳細な解説です. []内は訳注です. </abstract> <toc> <!-- <sect> Introduction <p> --> <sect> はじめに<p> <!-- Should you read this document? Well, see if you've got any of the following symptoms: --> あなたはこの文書を読む必要があるでしょうか? 以下のような状態にあるかどうか考えてみてください: <p> <itemize> <!-- <item> ``Arg! This wizzo-46.5.6 package says it needs kernel release 2.8.193 and I still only have release 1.0.9!'' --> <item>「なんてこった! この wizzo-46.5.6 パッケージにはカーネル 2.8.193 が必要だ.だけど俺はまだ 1.0.9 しか持ってないぜ!」 <!-- <item> There's a device driver in one of the newer kernels that you just gotta have --> <item>手に入れた新しいカーネルの 1 つにデバイスドライバーが存在している <!-- <item> You really have no idea at all how to compile a kernel --> <item>カーネルをコンパイルするにはどうしたらいいか,まったくわからない <!-- <item> ``Is this stuff in the README <it>really</it> the whole story?'' --> <item>「READMEに書いてあることだけ知ってればいいのか?」 <!-- <item> You came, you tried, it didn't work --> <item>来て見て試した.しかし動かない <!-- <item> You need something to give to people who insist on asking you to install their kernels for them --> <item>私にカーネルのインストールを手伝ってくれと言ってくる連中にあてが うものが欲しい </itemize> <!-- <sect1> Read this first! (I mean it)<p> --> <sect1>まずこれを読め!(そういうこと)<p> <!-- Some of the examples in this document assume that you have GNU <tt>tar</tt>, <tt>find</tt>, and <tt>xargs</tt>. These are quite standard; this should not cause problems. It is also assumed that you know your system's filesystem structure; if you don't, it is critical that you keep a written copy of the <tt>mount</tt> command's output during normal system operation (or a listing of <tt>/etc/fstab</tt>, if you can read it). This information is important, and does not change unless you repartition your disk, add a new one, reinstall your system, or something similar.<p> --> この文書の中におけるいくつかの例では,あなたが GNU <tt>tar</tt>, <tt>find</tt>, <tt>xargs</tt> を所有していることを前提にしています.こ れらは極めて標準的ですので,問題を起こすことはまずないでしょう.またあ なたが自分のシステムのファイルシステムの構造を把握していることも前提に しています.もし把握できていないのなら,通常のシステム動作の最中に <tt>mount</tt> コマンドが出力したメッセージを書き留めておくことが必須 です(あるいは,読むことができるのなら<tt>/etc/fstab</tt>のリストが必要 です).この情報は重要で,ディスクのパーティションを切り直したり,追加 したり,システムをインストールしなおしたり,その他もろもろをしない限り は変化しません.<p> <!-- The latest ``production'' kernel version at the time of this writing was 2.2.9, meaning that the references and examples correspond to that release. Even though I try to make this document as version-independent as possible, the kernel is constantly under development, so if you get a newer release, it will inevitably have some differences. Again, this should not cause major problems, but it may create some confusion.<p> --> 最新の「製品版」カーネルバージョンはこの文書を書いている時点で 2.2.9 ですので,この文書ではこれを参照したり例として挙げています.この文書は できるだけバージョンに依存しないようにしていますが,カーネルは常に開発 されています.ですから新しいリリースを手に入れたら,記述と異なる点がど うしてもあることでしょう.繰り返しになりますが,このことが大きな問題を 引き起こすことはありませんが,多少混乱することがあるかもしれません.<p> <!-- There are two versions of the linux kernel source, ``production'' and ``development.'' Production releases are the even-minor-numbered releases; 1.2.x was production, 2.0.x is production, as well as 2.2.x. These kernels are considered to be the most stable, bug-free versions available at the time of release. The development kernels (2.1.x, 2.3.x, etc) are meant as testing kernels, for people willing to test out new and possibly very buggy kernels. You have been warned.<p> --> Linux のカーネルソースのバージョンには「製品版」と「開発版」の 2 つが あります.製品版のリリースはマイナー番号[2つ目の数字]が偶数のリリー スです.すなわち 1.2.x は製品版,2.0.x も製品版,2.2.x も同様に製品版 です.これらのカーネルはリリース時においてもっとも安定,かつバグのない バージョンと考えられます.開発版カーネル(2.1.x, 2.3.x など)はテスト用 のカーネルであり,新しくてたぶん大変バグの多かろうカーネルをテストした い人々のためのものです.十分注意してください.<p> <!-- <sect1>A word on style<p> --> <sect1>記述スタイル<p> <!-- <tt>Text that looks like this</tt> is either something that appears on your screen, a filename, or something that can be directly typed in, such as a command, or options to a command (if you're looking at a plain-text file, it doesn't look any different). Commands and other input are frequently quoted (with ` '), which causes the following classic punctuation problem: if such an item appears at the end of a sentence in quotes, people often type a `.' along with the command, because the American quoting style says to put the period inside of the quotation marks. Even though common sense (and unfortunately, this assumes that the one with the ``common sense'' is used to the so-called American style of quotation) should tell one to strip off the punctuation first, many people simply do not remember, so I will place it outside the quotation marks in such cases. In other words, when indicating that you should type ``<tt>make config</tt>'' I would write `<tt>make config</tt>', not `<tt>make config</tt>.' <p> --> 「<tt>ABCabc</tt>」のように見えるテキストは,画面上に現れる文字列やファ イル名,キーボードから入力するコマンドやそのオプションなどを表して います(もしこの文章をプレーンテキスト形式で読んでいるのなら,他とは区 別がつきません).コマンドやその他の入力すべき文字列はよく ` 'で括りま す.でも,これは以下のような昔からよくある句読点の問題を引き起こします: もしコマンドなどがクォートで括られた文の最後にくると,人によってはコマ ンドに `.' をつけてしまいます.というのはアメリカ流の引用では引用符の 内側にピリオドを置くからです.常識では(残念ながら,ここでいう常識とい うのは,いわゆるアメリカ流の引用法を想定しています)句読点をまず外すは ずですが,たいていの人はすぐに忘れてしまいます.だから私はそのような場 合にはピリオドを引用符の外側に出します.言い換えれば,あなたが ``<tt>make config</tt>'' とタイプしなければならない場合は, `<tt>make config</tt>.'ではなく `<tt>make config</tt>' と書きます. [本和訳版では以上の記述は関係ありませんね.] <p> <!-- <sect>Important questions and their answers <p> --> <sect>重要な質問とそれに対する解答<p> <!-- <sect1>What does the kernel do, anyway? <p> --> <sect1>とりあえずカーネルは何をするの?<p> <!-- The Unix kernel acts as a mediator for your programs and your hardware. First, it does (or arranges for) the memory management for all of the running programs (processes), and makes sure that they all get a fair (or unfair, if you please) share of the processor's cycles. In addition, it provides a nice, fairly portable interface for programs to talk to your hardware. --> Unix のカーネルは,プログラムとハードウェアの仲介者として働きます. まず,すべての動作中のプログラム(プロセス)のメモリー管理(とそのための 調整)を行いますし,またそれらのプロセスが公平に(お好みとあらば不公平に) プロセッサのサイクルを共有できるようにします.さらに,プログラムがハード ウェアと対話するための素晴らしい,またかなり汎用性のあるインターフェース を提供します. <p> <!-- There is certainly more to the kernel's operation than this, but these basic functions are the most important to know. --> カーネルにはこれ以外にも機能がありますが,以上の基本的な機能だけは知ってお くべきでしょう. <p> <!-- <sect1>Why would I want to upgrade my kernel? <p> --> <sect1>カーネルをアップグレードするといいことがあるの?<p> <!-- Newer kernels generally offer the ability to talk to more types of hardware (that is, they have more device drivers), they can have better process management, they can run faster than the older versions, they could be more stable than the older versions, and they fix silly bugs in the older versions. Most people upgrade kernels because they want the device drivers and the bug fixes. --> 新しいカーネルを使うと,たいていはより多くのハードウェアが使えるように なります(すなわち,より多くのデバイスドライバがついてくる)し,プロセス管理 もよくなりますし,古いバージョンより速く動作しますし,古いバージョンよ り安定しているかもしれませんし,また古いバージョンのくだらないバグが修 正されています.ほとんどの人は,新しいデバイスドライバが欲しかったり, バグを修正したいのでカーネルをアップグレードするのです. <p> <!-- <sect1>What kind of hardware do the newer kernels support? <p> --> <sect1>新しいカーネルはどんなハードウェアをサポートしているの?<p> <!-- See the Hardware-HOWTO. Alternatively, you can look at the `<tt>config.in</tt>' file in the linux source, or just find out when you try `<tt>make config</tt>'. This shows you all hardware supported by the standard kernel distribution, but not everything that linux supports; many common device drivers (such as the PCMCIA drivers and some tape drivers) are loadable modules maintained and distributed separately. --> Hardware-HOWTO を見てください.その代わりに,Linux のソースに入ってい るファイル `<tt>config.in</tt>'を見てもいいし,`<tt>make config</tt>' するときにもわかります.これで標準のカーネル配付でサポートされるすべて のハードウェアを知ることができますが,これが Linux がサポートするハー ドウェアのすべてというわけではありません.多くの共通のデバイスドライバ (PCMCIA ドライバや一部のテープドライバなど)は標準カーネルとは別々に管 理・配付されるローダブルモジュールです. <p> <!-- <sect1>What version of gcc and libc do I need? <p> --> <sect1>gcc と libc のバージョンはいくつじゃないとだめなの?<p> <!-- Linus recommends a version of gcc in the <tt>README</tt> file included with the linux source. If you don't have this version, the documentation in the recommended version of gcc should tell you if you need to upgrade your libc. This is not a difficult procedure, but it is important to follow the instructions. --> Linus は Linux のソースに含まれている <tt>README</tt> ファイルに書かれ ているバージョンの gcc を推奨しています.もしこのバージョンを持ってい なかったら,推奨されているバージョンの gcc のドキュメントに,libc をアッ プグレードする必要があるかどうかが書かれています.アップグレード作業は そんなに難しくはありませんが,説明にしたがうことが大切です. <p> <!-- <sect1>What's a loadable module? <p> --> <sect1>ローダブルモジュールってなに?<p> <!-- These are pieces of kernel code which are not linked (included) directly in the kernel. One compiles them separately, and can insert and remove them into the running kernel at almost any time. Due to its flexibility, this is now the preferred way to code certain kernel features. Many popular device drivers, such as the PCMCIA drivers and the QIC-80/40 tape driver, are loadable modules. --> ローダブルモジュールとは,カーネルには直接リンクされない(カーネル本体には含 まれない)カーネルコードのかけらです.個別にコンパイルし,ほとんどいつでも動 作中のカーネルに組み込んだり取り外したりすることができます.柔軟性ゆえ,特定 のカーネル機能を実現するのに,好んで用いられています.よく使われている デバイスドライバの多く,例えば PCMCIA ドライバや QIC-80/40 テープドラ イバは,ローダブルモジュールです. <p> <!-- <sect1>How much disk space do I need? <p> --> <sect1>ディスクの空きスペースはどれくらいいるの?<p> <!-- It depends on your particular system configuration. First, the compressed linux source is nearly 14 megabytes large at version 2.2.9. Many sites keep this even after unpacking. Uncompressed and built with a moderate configuration, it takes up another 67 MB. --> あなたのシステム設定しだいです.まず,圧縮した Linuxの ソースはバージョ ン 2.2.9 で 14 メガバイト弱というところです.ほとんどのサイトでは展開 した状態のファイルも置いています. 展開してから適切な設定で構築を行うと,さらに 67 MB が必要になります. <p> <!-- <sect1>How long does it take? <p> --> <sect1>どれくらい時間が掛かるの?<p> <!-- With newer machines, the compilation takes dramatically less time than older ones; an AMD K6-2/300 with a fast disk can do a 2.2.x kernel in about four minutes. As for old Pentiums, 486s, and 386s, if you plan to compile one, be prepared to wait, possibly hours, days.. --> 新型のマシンでコンパイルすれば,古いマシンよりも劇的に早く終わります. AMD K6-2/300 に高速なディスクを付ければ,2.2.x のカーネルは約 4 分でコ ンパイルできます.古い Pentium, 486, 386 でカーネルをコンパイルしよう と思っていたら,時間単位,1 日単位で待つ覚悟をしてください…. <p> <!-- If this troubles you, and you happen to have a faster machine around to compile on, you can build on the fast machines (assuming you give it the right parameters, that your ulilities are up-to-date, and so on), and then transfer the kernel image to the slower machine. --> これが嫌であり,かつ近くにたまたま高速なマシンがあるならば,高速なマシ ンでコンパイルして(適切なパラメータを指定していることや,ユーティリティ が新しいこと等を想定しています),そのカーネルイメージを遅いマシンに転 送するという手もあります. <p> <!-- <sect>How to actually configure the kernel <p> --> <sect>カーネル設定の実際<p> <!-- <sect1>Getting the source <p> --> <sect1>ソースの入手<p> <!-- You can obtain the source via anonymous ftp from <tt>ftp.kernel.org</tt> in <tt>/pub/linux/kernel/vx.y</tt>, where <tt>x.y</tt> is the version (eg 2.2), and as mentioned before, the ones that end with an odd number are development releases and may be unstable. It is typically labelled <tt>linux-x.y.z.tar.gz</tt>, where <tt>x.y.z </tt> is the version number. The sites also typically carry ones with a suffix of <tt>.bz2</tt>, which have been compressed with bzip2 (these files will be smaller and take less time to transfer). --> <tt>ftp.kernel.org</tt> の <tt>/pub/linux/kernel/vx.y</tt> から anonymous(匿名) FTP でソースを入手することができます.ここで <tt>x.y</tt> は前に説明したようなバージョンであり,奇数で終わるものは 開発リリースなので不安定かもしれません. たいていは <tt>linux-x.y.z.tar.gz</tt> (<tt>x.y.z</tt> がバージョン)と いう名前が付けられています.普通はこのサイトには拡張子 <tt>.bz2</tt> が付いているファイルもあります.これは bzip2 で圧縮されているファイル です(このようなファイルはサイズが小さく,転送時間を節約することができ ます). <p> <!-- It's best to use <tt>ftp.xx.kernel.org</tt> where <tt>xx</tt> is your country code; examples being <tt>ftp.at.kernel.org</tt> for Austria, and <tt>ftp.us.kernel.org</tt> for the United States. --> できるだけ <tt>ftp.xx.kernel.org</tt> (<tt>xx</tt> は国コード)を使うと よいでしょう.例えばオーストリアでは <tt>ftp.at.kernel.org</tt>, アメリカでは <tt>ftp.us.kernel.org</tt> となります. <p> <!-- <sect1>Unpacking the source <p> --> <sect1>ソースの展開<p> <!-- Log in as or <tt>su</tt> to `<tt>root</tt>', and <tt>cd</tt> to <tt>/usr/src</tt>. If you installed kernel source when you first installed linux (as most do), there will already be a directory called `<tt>linux</tt>' there, which contains the entire old source tree. If you have the disk space and you want to play it safe, preserve that directory. A good idea is to figure out what version your system runs now and rename the directory accordingly. The command `<tt>uname -r</tt>' prints the current kernel version. Therefore, if `<tt>uname -r</tt>' said `<tt>1.0.9</tt>', you would rename (with `<tt>mv</tt>') `<tt>linux</tt>' to `<tt>linux-1.0.9</tt>'. If you feel mildly reckless, just wipe out the entire directory. In any case, make certain there is no `<tt>linux</tt>' directory in <tt>/usr/src</tt> before unpacking the full source code. --> <tt>root</tt> としてログインするか <tt>su</tt>して <tt>root</tt> にな り,<tt>/usr/src</tt>に <tt>cd</tt> します.最初 Linux をインストール した際にカーネルのソースをインストールしていれば(普通はそうでしょう), <tt>linux</tt> というディレクトリがあるはずです.そこには古いソースツ リー全体が含まれています.ディスクの容量が十分にあり,かつ安全策を取る ならこのディレクトリは残しておきましょう. 今現在のシステムのバージョンを調べて,このバージョンにあわせてディレクトリ 名を変えておくとよいでしょう.`<tt>uname -r</tt>' で現在のカーネル バージョンを表示できます.ですから,`<tt>uname -r</tt>' で `<tt>1.0.9</tt>' と表示されたら,`<tt>linux</tt>' を (`<tt>mv</tt>'で) `<tt>linux-1.2.8</tt>' というファイル名に変えます.まあ,ちょっと向こ う見ずのあなたは,ディレクトリごと消してしまいましょう.いずれにせよ, ソースコードを展開する前に <tt>/usr/src</tt> に `<tt>linux</tt>' とい うディレクトリが存在しないことを確認してください. <p> <!-- Now, in <tt>/usr/src</tt>, unpack the source with `<tt>tar zxpvf linux-x.y.z.tar.gz</tt>' (if you've just got a <tt>.tar</tt> file with no <tt>.gz</tt> at the end, `<tt>tar xpvf linux-x.y.z.tar</tt>' works.). The contents of the source will fly by. When finished, there will be a new `<tt>linux</tt>' directory in <tt>/usr/src</tt>. <tt>cd</tt> to <tt>linux</tt> and look over the <tt>README</tt> file. There will be a section with the label `<tt>INSTALLING the kernel</tt>'. Carry out the instructions when appropriate -- symbolic links that should be in place, removal of stale <tt>.o</tt> files, etc. <p> --> では,<tt>/usr/src</tt> で `<tt>tar zxpvf linux-x.y.z.tar.gz</tt>' と してソースを展開します(ファイル名の最後が単に <tt>.tar</tt> となってい て <tt>.gz</tt> がついていない場合は `<tt>tar xpvf linux-x.y.z.tar</tt>' で展開できます.展開中にはソースの中身が画面に表示されていきます.展開 が終了すると, <tt>/usr/src</tt> に新しい `<tt>linux</tt>' ディレクト リができています.<tt>linux</tt> に <tt>cd</tt> し,<tt>README</tt> ファ イルを読んでください.`<tt>INSTALLING the kernel</tt>'と いう題のついた章があります.説明に適宜したがって,必要なシンボリックリ ンクを張ったり,古い<tt>.o</tt>ファイルを消去するなどしてください. <p> <!-- If you have a <tt>.bz2</tt> file and the bzip2 program (read about it at <tt>http://www.muraroa.demon.co.uk/</tt>), do this: --> ファイルの拡張子が <tt>.bz2</tt> であり,bzip2 プログラム(詳しくは <tt>http://www.muraroa.demon.co.uk/</tt> を参照)をお持ちであれば以下の コマンドで展開してください: <p> <verb> bz2cat linux-x.y.z.tar.bz2 | tar xvf - </verb> <!-- <sect1>Configuring the kernel <p> --> <sect1>カーネルの設定<p> <!-- Note: Some of this is reiteration/clarification of a similar section in Linus' <tt>README</tt> file. --> 注: このうちいくつかは Linus の <tt>README</tt> ファイルの繰り返しだっ たり説明だったりします. <p> <!-- The command `<tt>make config</tt>' while in <tt>/usr/src/linux</tt> starts a configure script which asks you many questions. It requires bash, so verify that bash is <tt>/bin/bash</tt>, <tt>/bin/sh</tt>, or <tt>$BASH</tt>. --> <tt>/usr/src/linux</tt> ディレクトリで `<tt>make config</tt>' コマンド を実行すると,設定スクリプトが起動し,色々な質問をしてきます.このスク リプトは bash を必要とするので,bash が <tt>/bin/bash</tt>, <tt>/bin/sh</tt>, <tt>$BASH</tt> のいずれかにあることを確認して ください. <p> <!-- However, there are some much more pleasant alternatives to `<tt>make config</tt>' and you may very well find them easier and more comfortable to use. `<tt>make menuconfig</tt>' is probably the most widely-used. Whatever you choose, it's best to get familiar with the interface because you may find yourself back at it sooner than you think. For those ``running X,'' you can try `<tt>make xconfig</tt>' if you have Tk installed (`click-o-rama' - Nat). `<tt>make menuconfig</tt>' is for those who have (n)curses and would prefer a text-based menu. These interfaces have a rather clear advantage: If you goof up and make a wrong choice during configuration, it is simple to go back and fix it. --> しかし,`<tt>make config</tt>' よりもずっといいものがいくつかあります. それらの方がずっと簡単で使いやすいでしょう.`<tt>make menuconfig</tt>' がたぶん一番使われています. どれを使うか決める時には,そのインターフェースを使ってみるのが一番です. というのも,考えるよりも早く答えが出るからです. <!-- fujiwara: ↑はあやしい… --> 「X を使っている」人は,`<tt>make xconfig</tt>' を試すとよいでしょう. ただし Tk が必要です(`click-o-rama' - Nat). <!-- fujiwara: 「`click-o-rama' - Nat」って何? --> `<tt>make menuconfig</tt>' は,(n)curses を持っており,テキストベース のメニューが好きな人にお勧めです.これらのインタフェースにはかなりはっ きりとした利点があります: 設定の時にしくじって選択を誤った時に,簡単に 前に戻って直すことができます. <p> <!-- The configuration options will appear in hierarchies with `<tt>make menuconfig</tt>' and `<tt>make xconfig</tt>'. --> `<tt>make menuconfig</tt>' と `<tt>make xconfig</tt>' では,設定オプショ ンは階層的に表示されます. <p> <!-- You are ready to answer the questions, usually with `<tt>y</tt>' (yes) or `<tt>n</tt>' (no). Device drivers typically have an `<tt>m</tt>' option. This means ``module,'' meaning that the system will compile it, but not directly into the kernel, but as a loadable module. A more comical way to describe it is as ``maybe.'' Some of the more obvious and non-critical options are not described here; see the section ``Other configuration options'' for short descriptions of a few others. With `<tt>make menuconfig</tt>', the space bar toggles the selection. --> これで質問に答える準備ができました.普通は `<tt>y</tt>'(はい)あるいは `<tt>n</tt>'(いいえ)で答えていきます.デバイスドライバにはたいてい `<tt>m</tt>' オプションがあります.これは ``モジュール''を意味しており, カーネルのコンパイル時にコンパイルは行なわれますが,カーネルに直接組み 込まれるわけではなく,ロード可能なモジュールとしてコンパイルされるので す.この `<tt>m</tt>' をもっとふざけて説明しますと,これは ``maybe'' (多分)です.簡単だったりあまり重要でないオプションについては,ここでは 触れません.「他の設定オプション」の章にいくつかのオプションの簡単な説 明があります.`<tt>make menuconfig</tt>' を使っている場合は,スペース バーによって選択状態が変わります. <p> <!-- In 2.0.x and later, there is a `?' option, which provides a brief description of the configuration parameter. That information is likely to be the most up-to-date. Here are a listing of some of the important features, which hierarchy they are in, and brief description. --> 2.0.x 以降のカーネルでは,`?' オプションがあります.`?' キーを押すと, 設定パラメータの簡単な説明が表示されます.この情報はたぶん最新でしょう. 以下では重要な機能いくつかについて,その機能がある階層と簡単な解説を示 します. <p> <!-- <sect2>Kernel math emulation (Processor type and features)<p> --> <sect2>Kernel math emulation [カーネルの数値演算エミュレーション] (Processor type and features)<p> <!-- If you don't have a math coprocessor (you have a bare 386 or 486SX), you must say `<tt>y</tt>' to this. If you do have a coprocessor and you still say `<tt>y</tt>', don't worry too much -- the coprocessor is still used and the emulation ignored. For any halfway modern machine, the answer will be no, but don't worry if you say yes accidentally; if not needed, it is not used. --> 数値演算コプロセッサがない場合(素の 386 や 486SX の場合),この項目には `<tt>y</tt>' と答えなければいけません.コプロセッサがあるのに `<tt>y</tt>' と答えても気にする必要はありません -- ちゃんとコプ ロセッサが使用され,エミュレーションは行なわれません.割と新しいマシン だったら答えは `<tt>n</tt>' でしょうが,間違って `<tt>y</tt>' と答えて も気にすることはありません.必要無ければ,この機能は使われません. <p> <!-- <sect2>Enhanced (MFM/RLL) disk and IDE disk/cdrom support (Block Devices)<p> --> <sect2>Normal (MFM/RLL) disk and IDE disk/cdrom support [通常(MFM/RLL)のディスクと IDE ディスク/CDROM サポート] (Block Devices)<p> <!-- You probably need to support this; it means that the kernel will support standard PC hard disks, which most people have. This driver does not include SCSI drives; they come later in the configuration. --> この機能はサポートする必要があるでしょう.ほとんどの人が持っている,PC 標準のハードディスクをカーネルがサポートするということですから.このド ライバには SCSI ドライバは含まれていません.設定の後の方で出てきます. <p> <!-- You will then be asked about the ``old disk-only'' and ``new IDE'' drivers. You want to choose one of them; the main difference is that the old driver only supports two disks on a single interface, and the new one supports a secondary interface and IDE/ATAPI cdrom drives. The new driver is 4k larger than the old one and is also supposedly ``improved,'' meaning that aside from containing a different number of bugs, it might improve your disk performance, especially if you have newer (EIDE-type) hardware. --> 続いて ``old disk-only'' と ``new IDE'' のドライバについて聞かれます. このうちどちらかを選択してください.大きな違いは,古いドライバは 1 つ のインターフェース上の 2 つのディスクのみをサポートしますが,新しい方 はセカンダリインターフェースと IDE/ATAPI の CD-ROM をサポートします. 新しいドライバは古い方よりも 4 kB 大きいですが多分「改善」されています. すなわち,含まれているバグの数は別にして,特にハードウェアが新しい (EIDE タイプ)場合にはディスクの性能が向上します. <p> <!-- <sect2>Networking support (General Setup)<p> --> <sect2>Networking support [ネットワークのサポート](General Setup)<p> <!-- In principle, you would only say `<tt>y</tt>' if your machine is on a network such as the internet, or you want to use SLIP, PPP, term, etc to dial up for internet access. However, as many packages (such as the X window system) require networking support even if your machine does not live on a real network, you should say `<tt>y</tt>'. Later on, you will be asked if you want to support TCP/IP networking; again, say `<tt>y</tt>' here if you are not absolutely sure. --> インターネットのようなネットワークに接続されていたり,SLIP や PPP, term などを使ってインターネットへのダイアルアップ接続を行うのであれば `<tt>y</tt>' と答えます.しかし,多くのソフトウェアパッケージ(例えば X ウィンドウシステム[日本語変換システムも])は,たとえマシンがネットワー クに接続されていなくてもネットワークサポートを必要とします.ですから `<tt>y</tt>' と答えなければなりません.後で TCP/IP ネットワークが必要 かどうか質問されますが,よくわからなければここでも `<tt>y</tt>' と答え ておいてください. <p> <!-- <sect2>System V IPC (General Setup)<p> --> <sect2>System V IPC (General Setup)<p> <!-- One of the best definitions of IPC (Interprocess Communication) is in the Perl book's glossary. Not surprisingly, some Perl programmers employ it to let processes talk to each other, as well as many other packages (DOOM, most notably), so it is not a good idea to say <tt>n</tt> unless you know exactly what you are doing. --> IPC(Inter-Process Communication, プロセス間通信)のもっとも的確な定義の 一つは Perl book の用語一覧にあります.おどろくほどのことではないです が,Perlのプログラマーの中にはプロセス間で会話をさせるために IPC を 利用する人がいますし,他にもこれを利用しているパッケージがあります(もっ とも有名なのは DOOM でしょう[漢字コンソール KON もこれを利用していま す]).ですから,よくわからない場合はこれに `<tt>n</tt>' と答えてはい けません. <p> <!-- <sect2>Processor family (Processor type and features)<p> (in older kernels: Use -m486 flag for 486-specific optimizations)<p> --> <sect2>Processor family [CPU のタイプ](Processor type and features)<p> (古いカーネルでは: Use -m486 flag for 486-specific optimizations)<p> <!-- Traditionally, this compiled in certain optimizations for a particular processor; the kernels ran fine on other chips, but the kernel was perhaps a bit larger. In newer kernels, however, this is no longer true, so you should enter the processor for which you are compiling the kernel. A ``386'' kernel will work on all machines. --> 従来は,このオプションでは特定の CPU 用に最適化したコンパイルを行なっ ていました; カーネルは他の(最適化した以外の)CPU でも良好に動作しますが, カーネルは少々大きくなりました.しかし新しいカーネルでは,このことは必 ずしも当てはまりません.ですから,カーネルをコンパイルするマシンの CPU を必ず入力しなければなりません.``386'' 用カーネルならばすべてのマシン で動作するでしょう. <p> <!-- <sect2>SCSI support<p> --> <sect2>SCSI support [SCSI のサポート]<p> <!-- If you have SCSI devices, say `<tt>y</tt>'. You will be prompted for further information, such as support for CD-ROM, disks, and what kind of SCSI adapter you have. See the SCSI-HOWTO for greater detail. --> SCSI デバイスを持っていたら `<tt>y</tt>' と答えてください.CD-ROM やディ スクのサポート,およびどの SCSI アダプタを使用するか等がさらに質問され ます.詳細は SCSI-HOWTO を参照してください. <p> <!-- <sect2>Network device support<p> --> <sect2>Network device support [ネットワークデバイスのサポート]<p> <!-- If you have a network card, or you would like to use SLIP, PPP, or a parallel port adapter for connecting to the Internet, say `<tt>y</tt>'. The config script will prompt for which kind of card you have, and which protocol to use. --> ネットワークカードを持っていたら,あるいは SLIP,PPP やパラレルポート アダプタを使ってインターネットに接続するのなら `<tt>y</tt>' と答えてく ださい.使用するカードやプロトコルについての質問があります. <p> <!-- <sect2>Filesystems<p> --> <sect2>Filesystems [ファイルシステム]<p> <!-- The configure script then asks if you wish to support the following filesystems: --> 設定スクリプトは,以下のファイルシステムをサポートするかどうかを聞いて きます: <p> <!-- Standard (minix) - Newer distributions don't create minix filesystems, and many people don't use it, but it may still be a good idea to configure this one. Some ``rescue disk'' programs use it, and still more floppies may have a minix filesystem, since the minix filesystem is less painful to use on a floppy. --> Standard (minix) - 最近の Linux は minix ファイルシステムを作成しませ んし,ユーザも普通は使用しません.しかし,使用するように設定しておいた 方がよいでしょう.なぜなら「復旧ディスク」のプログラムにはこれを使うも のがありますし,多くのフロッピーが minix ファイルシステムを使っている からです.というのも,minix ファイルシステムはフロッピーでの使用に適し ているからです. <p> <!-- Second extended - This is the standard Linux filesystem. You almost definitely have one of these, and need to say `<tt>y</tt>'. --> Second extended - これは Linux 標準のファイルシステムです.ほぼ確実に このファイルシステムがあるはずなので,`<tt>y</tt>'と答えなければなりま せん. <p> <!-- msdos - If you want to use your MS-DOS hard disk partitions, or mount MS-DOS formatted floppy disks, say `<tt>y</tt>'. --> msdos - ハードディスク上の MS-DOS パーティションを使用したり,MS-DOS フォーマットのフロッピーディスクをマウントするなら `<tt>y</tt>' と答え てください. <p> <!-- There are various other foreign operating system filesystem types available. --> 他のオペレーティングシステムのファイルシステムもいくつか使用できます. <p> <!-- /proc - (idea from Bell Labs, I guess). One doesn't make a proc filesystem on a disk; this is a filesystem interface to the kernel and processes. Many process listers (such as `<tt>ps</tt>') use it. Try `<tt>cat /proc/meminfo</tt>' or `<tt>cat /proc/devices</tt>' sometime. Some shells (rc, in particular) use <tt>/proc/self/fd</tt> (known as <tt>/dev/fd</tt> on other systems) for I/O. You should almost certainly say `<tt>y</tt>' to this; many important linux tools depend on it. --> /proc - (多分ベル研のアイディアのパクリだと思います) ディスク上に proc というファイルシステムが作られるわけではありません.これはカーネルとプ ロセスのインターフェースとなるファイルシステムです.多くのプロセスリス ト表示プログラム(`<tt>ps</tt>' など)がこれを使用します. `<tt>cat /proc/meminfo</tt>' や `<tt>cat /proc/devices</tt>' などを後 で試してみてください.<tt>/proc/self/fd</tt>(他のシステムでは <tt>/dev/fd</tt>として知られる)を I/O に使用するシェルもあります(特に rc).ほとんどの場合 `<tt>y</tt>' と答えなければなりません.Linux の重 要なツールの多くがこのファイルシステムに依存しています. <p> <!-- NFS - If your machine lives on a network and you want to use filesystems which reside on other systems with NFS, say `<tt>y</tt>'. --> NFS - ネットワークに接続されていて,他のシステム上にあるファイルシステ ムを使用するなら `<tt>y</tt>' と答えてください. <p> <!-- ISO9660 - Found on most CD-ROMs. If you have a CD-ROM drive and you wish to use it under Linux, say `<tt>y</tt>'. --> ISO9660 - ほとんどの CD-ROM が使用しています.CD-ROM ドライブを持って いて,これを Linux でも使うつもりなら `<tt>y</tt>' と答えてください. <p> <!-- <sect3>But I don't know which filesystems I need! --> <sect3>でも私はどのファイルシステムを使ったらいいの?<p> <p> <!-- Ok, type `<tt>mount</tt>'. The output will look something like this: --> `<tt>mount</tt>'とタイプしてみましょう.出力はこんな感じです: <p> <tscreen><verb> blah# mount /dev/hda1 on / type ext2 (defaults) /dev/hda3 on /usr type ext2 (defaults) none on /proc type proc (defaults) /dev/fd0 on /mnt type msdos (defaults) </verb></tscreen> <!-- Look at each line; the word next to `<tt>type</tt>' is the filesystem type. In this example, my <tt>/</tt> and <tt>/usr</tt> filesystems are second extended, I'm using <tt>/proc</tt>, and there's a floppy disk mounted using the msdos (bleah) filesystem. --> それぞれの行を見てください;`<tt>type</tt>' の次の単語がファイルシステ ムの種類です.この例では <tt>/</tt> と <tt>/usr</tt> のファイルシステ ムが second extended です.私は <tt>/proc</tt> も使用しています. msdos ファイルシステムを利用してマウントしたフロッピーディスクもありま す. <!-- fujiwara: 'bleah' って何? --> <p> <!-- You can try `<tt>cat /proc/filesystems</tt>' if you have <tt>/proc</tt> currently enabled; it will list your current kernel's filesystems. --> 現在 <tt>/proc</tt> を利用できるなら,`<tt>cat /proc/filesystems</tt>' とタイプしてみてください.カーネルが現在使用可能なファイルシステムが表 示されます. <p> <!-- The configuration of rarely-used, non-critical filesystems can cause kernel bloat; see the section on modules for a way to avoid this and the ``Pitfalls'' section on why a bloated kernel is undesirable. --> あんまり使わない,それほど重要でないファイルシステムを使用できるように設 定すると,カーネルが不必要に大きくなってしまいます.対処法についてはモ ジュールに関する章を,また大きくなったカーネルが好まれない理由について は「落とし穴」の章を参照してください. <p> <!-- <sect2>Character devices <p> --> <sect2>Character devices [キャラクタデバイス]<p> <!-- Here, you enable the drivers for your printer (parallel printer, that is), busmouse, PS/2 mouse (many notebooks use the PS/2 mouse protocol for their built-in trackballs), some tape drives, and other such ``character'' devices. Say `<tt>y</tt>' when appropriate. --> ここではプリンタ(パラレルプリンタのことです),バスマウス,PS/2マウス (多くのノートパソコンは内蔵ポインティングデバイスで PS/2 プロトコルを 使用しています),いくつかのテープドライブ,その他のキャラクタデバイス の設定ができます.必要なものについて `<tt>y</tt>' と答えてください. <p> <!-- Note: <tt>gpm</tt> is a program which allows the use of the mouse outside of the X window system for cut and paste between virtual consoles. It's fairly nice if you have a serial mouse, because it coexists well with X, but you need to do special tricks for others. --> 注:<tt>gpm</tt> は X ウィンドウシステムでなく仮想コンソール間で,マウ スを用いたカット&ペーストを行うためのプログラムです.シリアルマウ スを使用しているなら,容易に X と共存できるので便利です.しかし他のマ ウスではちょっと面倒です. [<tt>gpm</tt> は <tt>-R</tt> オプションをつければ X と共存できます. また,真鍋さん multimouse はノートパソコンユーザーの方にお薦めです.] <!-- fujiwara: MultiMouse の入手先を書かないと. --> <p> <!-- <sect2>Sound<p> --> <sect2>Sound [サウンドカード]<p> <!-- If you feel a great desire to hear <tt>biff</tt> bark, say `<tt>y</tt>', and you can tell the configuration program all about your sound board. (A note on sound card configuration: when it asks you if you want to install the full version of the driver, you can say `<tt>n</tt>' and save some kernel memory by picking only the features which you deem necessary.) --> どうしても<tt>biff</tt>が吠えるのを聞きたい[<tt>biff</tt> コマンドの 名前の由来は,郵便屋さんが来ると吠える犬です]のなら `<tt>y</tt>' と答 えてください.あとで別の設定プログラムがサウンドボードに関する質問をし て設定します.(サウンドカードの設定に関する注:設定プログラムがドライ バをフルインストールするかどうかを聞いてきたら `<tt>n</tt>' と答え,必 要と思われる機能のみを選択できます.カーネルの使用するメモリを節約でき ます.) <p> <!-- If you are serious about sound card support, have a look at both the free drivers at <tt>http://www.linux.org.uk/OSS/</tt> and the commercial Open Sound System at <tt>http://www.opensound.com/</tt>. --> 本気でサウンドカードをサポートするなら, <tt>http://www.linux.org.uk/OSS/</tt> にあるフリーのドライバと, <tt>http://www.opensound.com/</tt> にある商用の Open Sound System を両 方調べるとよいでしょう. <p> <!-- <sect2>Other configuration options<p> --> <sect2>他の設定オプション<p> <!-- Not all of the configuration options are listed here because they change too often or fairly self-evident (for instance, 3Com 3C509 support to compile the device drive for this particular ethernet card). There exists a fairly comprehensive list of all the options (plus a way to place them into the <tt>Configure</tt> script) in an effort started and maintained by Axel Boldt (<tt>boldt@math.ucsb.edu</tt>) and it's the online help. It's also available as one big file at the <tt>Documentation/Configure.help</tt> in your Linux kernel source tree as of version 2.0. --> 設定オプションは頻繁に変化しますし,自明だったりしますので(例えば 3Com 3C509 イーサネットカードのためのデバイスドライバをコンパイルする等) すべてを紹介するわけではありません. Axel Boldt さん(<tt>axel@uni-paderborn.de</tt>)がまとめている,全オプ ションのわかりやすいリスト(設定スクリプトへの組込み方も)とそのオンライ ンヘルプがあります.Linux 2.0 では,これはカーネルのソースツリーに入っ ている <tt>Documentation/Configure.help</tt> という大きなファイルです. <p> <!-- <sect2>Kernel hacking <p> --> <sect2>Kernel hacking [カーネルハッキング]<p> <!-- >From Linus' README: --> >Linus の README から引用します: <!-- the ``kernel hacking'' configuration details usually result in a bigger or slower kernel (or both), and can even make the kernel less stable by configuring some routines to actively try to break bad code to find kernel problems (kmalloc()). Thus you should probably answer `n' to the questions for a ``production'' kernel. --> 「カーネルハッキング」を設定するとカーネルが大きくなったり遅くなったり (あるいはその両方)しますし,カーネルの問題(kmalloc())を見つけるため悪 いコードを積極的に中断しようとするルーチンが組み込まれますので,カーネ ルが不安定になったりします.ですから「製品版」のカーネルでは `<tt>n</tt>' と答えておくべきでしょう. <p> <!-- <sect1>Now what? (The Makefile) <p> --> <sect1>では何を?(Makefile)<p> <!-- After you finish configuration, a message tells you that your kernel has been configured, and to ``check the top-level <tt>Makefile</tt> for additional configuration,'' etc. --> <tt>make config</tt> が終ると,カーネルの設定が終ったというメッセージが表示 され,また「追加設定のためトップレベルの <tt>Makefile</tt> をチェック しろ」というようなメッセージが表示されます. <p> <!-- So, look at the <tt>Makefile</tt>. You probably will not need to change it, but it never hurts to look. You can also change its options with the `<tt>rdev</tt>' command once the new kernel is in place. If you're feel lost when you look at the file, then don't worry about it. --> では,<tt>Makefile</tt> を見てください.多分変更する必要はないでしょうが, 見て悪いはずもありません.新しいカーネルができたら,そのオプションを `<tt>rdev</tt>' コマンドで変更することもできます.このファイルを見たときに わけがわからないと思っても,心配する必要はありません. <p> <!-- <sect>Compiling the kernel <p> --> <sect>カーネルのコンパイル<p> <!-- <sect1>Cleaning and depending <p> --> <sect1>不要なファイルの削除と依存ファイルの確認<p> <!-- When the configure script ends, it also tells you to `<tt>make dep</tt>' and (possibly) `<tt>clean</tt>'. So, do the `<tt>make dep</tt>'. This insures that all of the dependencies, such the include files, are in place. It does not take long, unless your computer is fairly slow to begin with. For older versions of the kernel, when finished, you should do a `<tt>make clean</tt>'. This removes all of the object files and some other things that an old version leaves behind. In any case, <it>do not</it> forget this step before attempting to recompile a kernel. --> 設定スクリプトの実行が終了すると,`<tt>make dep</tt>' と(たぶん, `<tt>make clean</tt>' を実行するように表示されます.ですから `<tt>make dep</tt>'してください.これはインクルードファイルなどの依存 関係が全て正しいかどうかを確認します.マシンがよほど遅くないかぎり,こ れにはそんなに時間が掛かりません.これが終ったら,古いバージョンのカー ネルの場合には `<tt>make clean</tt>' を行います.これはすべてのオブジェ クトファイルと,以前のバージョンに関係する古いファイルを消去します.い ずれにせよ,このステップを<it>忘れないように</it>してください. <p> <!-- <sect1>Compile time <p> --> <sect1>コンパイル<p> <!-- After <tt>dep</tt>ending and <tt>clean</tt>ing, you may now `<tt>make bzImage</tt>' or `<tt>make bzdisk</tt>' (this is the part that takes a long time.). `<tt>make bzImage</tt>' will compile the kernel, and leave a file in <tt>arch/i386/boot</tt> called `<tt>bzImage</tt>' (among other things). This is the new compressed kernel. `<tt>make bzdisk</tt>' does the same thing, but also places the new <tt>bzImage</tt> on a floppy disk which you hopefully put in drive ``A:''. `<tt>bzdisk</tt>' is fairly handy for testing new kernels; if it bombs (or just doesn't work right), just remove the floppy and boot with your old kernel. It can also be a handy way to boot if you accidentally remove your kernel (or something equally as dreadful). You can also use it to install new systems when you just dump the contents of one disk onto the other (``all this and more! NOW how much would you pay?''). --> 依存関係のチェック(`<tt>make dep</tt>')と不要なファイルの削除 (`<tt>make clean</tt>')が終了すると,`<tt>make bzImage</tt>' もしくは `<tt>make bzdisk</tt>' を実行することができます(これは時間がかかるとこ ろです).`<tt>make bzImage</tt>'はカーネルをコンパイルし, `<tt>bzImage</tt>' と呼ばれるファイルを <tt>arch/i386/boot</tt> に置き ます(他のファイルもあります). これが圧縮された新しいカーネルです.`<tt>make bzdisk</tt>' は同じこと をしますが,``A:''ドライブに入れたフロッピーディスクに新しい <tt>bzImage</tt> を書き込みます.`<tt>bzdisk</tt>' は新しいカーネルの 動作チェックに便利です; もしフロッピーが爆発したり(あるいは単にうまく 動かない場合)には,フロッピーを取り外せば古いカーネルでブートします. また,カーネルを誤って消してしまったときなど(あるいはそれに類する危機 的状態)にもこのフロッピーは便利です.さらには,ディスクの中身を別のディ スクに移したときにも,新しいシステムをインストールするのに使用できます (さあこんなにお得でお客さん,いくらなら買います!?[うまく訳せません]). <p> <!-- All even halfway reasonably recent kernels are compressed, hence the `<tt>bz</tt>' in front of the names. A compressed kernel automatically decompresses itself when executed. --> 割と最近のカーネルはすべて圧縮されてますので,名前の先頭に `<tt>bz</tt>' が付いています.圧縮されたカーネルは,実行時に自動的に展 開されます. <p> <!-- In older kernels, you don't have the option to build a <tt>bzImage</tt>; it was simply a <tt>zImage</tt>. That option is at the moment still available, however, given the code size of newer kernels, it is now more or less mandatory to build a <tt>bzImage</tt> because the older methods can't handle a kernel that's just too large. --> 古いカーネルには <tt>bzImage</tt> を作るオプションがありません.これは 単に <tt>zImage</tt> となります.このオプションもまだ利用可能ですが, 新しいカーネルのコードのサイズを考えると,<tt>bzImage</tt> の構築はほ とんど必須でしょう.なぜなら,古い方法では大きすぎるカーネルは扱えない からです. <p> <!-- <sect1>Other ``make''ables <p> --> <sect1>他の``make''できるもの<p> <!-- `<tt>make mrproper</tt>' will do a more extensive `<tt>clean</tt>'ing. It is sometimes necessary; you may wish to do it at every patch. `<tt>make mrproper</tt>' will also delete your configuration file, so you might want to make a backup of it (<tt>.config</tt>) if you see it as valuable. --> `<tt>make mrproper</tt>' はさらに徹底的なファイル削除((`<tt>make clean</tt>')) を行います.この作業が必要なこともあるので,パッチを当てるごとに実行す るとよいでしょう.`<tt>make mrproper</tt>'は設定ファイルも消去してしま うでしょう.ですから,設定ファイル(<tt>.config</tt>)が必要でしたら,そ のバックアップを作っておいてください. <p> <!-- `<tt>make oldconfig</tt>' will attempt to configure the kernel from an old configuration file; it will run through the `<tt>make config</tt>' process for you. If you haven't ever compiled a kernel before or don't have an old config file, then you probably shouldn't do this, as you will most likely want to change the default configuration. --> `<tt>make oldconfig</tt>' は古い設定ファイルにしたがってカーネルを構築しよ うとします; <tt>make config</tt>' のプロセスは飛ばします.もし,今まで一度 もカーネルをコンパイルしてなかったり,古い設定ファイルがないなら,これを 実行してはいけません.デフォルトの設定を変更したいことがほとんどでしょうか ら. <p> <!-- See the section on modules for a description of `<tt>make modules</tt>'. --> `<tt>make modules</tt>' の説明については,モジュールに関する節を参照して ください. <p> <!-- <sect1>Installing the kernel <p> --> <sect1>カーネルのインストール<p> <!-- After you have a new kernel that seems to work the way you want it to, it's time to install it. Most people use LILO (Linux Loader) for this. `<tt>make bzlilo</tt>' will install the kernel, run LILO on it, and get you all ready to boot, BUT ONLY if lilo is configured in the following way on your system: kernel is <tt>/vmlinuz</tt>, lilo is in <tt>/sbin</tt>, and your lilo config (<tt>/etc/lilo.conf</tt>) agrees with this. --> 設定通りの動作をするようなカーネルができたら,インストールしましょう. ほとんどの人は LILO(Linux Loader) を使用します[訳者は,LILO でなく Loadlin をお勧めします.LILO はうまくいかないと,徹底的にうまくいかな いような気がします].`<tt>make bzlilo</tt>' でカーネルをインストールし, そこで LILO を実行すれば,ブートの準備がすべてできます.<em>しかし </em>これは LILO が以下のように設定されている場合<em>だけ</em>です: カーネルが <tt>/vmlinuz</tt> で,liloが <tt>/sbin</tt> にあり,LILO の 設定ファイル(<tt>/etc/lilo.conf</tt>)がこれに合致している場合です. <p> <!-- Otherwise, you need to use LILO directly. It's a fairly easy package to install and work with, but it has a tendency to confuse people with the configuration file. Look at the config file (either <tt>/etc/lilo/config</tt> for older versions or <tt>/etc/lilo.conf</tt> for new versions), and see what the current setup is. The config file looks like this: --> そうでなければ,LILO を直接使用せねばなりません.LILO はインストールや取扱 いの容易なパッケージですが,設定ファイルで戸惑う人が多いようです. 設定ファイルを見てください(古いバージョンでは <tt>/etc/lilo/config</tt>,新しいものでは <tt>/etc/lilo.conf</tt> です). そして現在の設定がどうなっているか見てください.このような感じになって いると思います. <p> <verb> image = /vmlinuz label = Linux root = /dev/hda1 ... </verb> <!-- The `<tt>image =</tt>' is set to the currently installed kernel. Most people use <tt>/vmlinuz</tt>. `<tt>label</tt>' is used by lilo to determine which kernel or operating system to boot, and `<tt>root</tt>' is the <tt>/</tt> of that particular operating system. Make a backup copy of your old kernel and copy the <tt>bzImage</tt> which you just made into place (you would say `<tt>cp bzImage /vmlinuz</tt>' if you use `<tt>/vmlinuz</tt>'). Then, rerun lilo -- on newer systems, you can just run `<tt>lilo</tt>', but on older stuff, you might have to do an <tt>/etc/lilo/install</tt> or even an <tt>/etc/lilo/lilo -C /etc/lilo/config</tt>. --> `<tt>image =</tt>' には現在インストールされているカーネルが設定されて います.ほとんどの人は <tt>/vmlinuz</tt> を使用します. `<tt>label</tt>' は LILO がどのカーネルあるいは OS をブートするかを判 断するために使われ,`<tt>root</tt>' は立ち上げる OS の <tt>/</tt> です. 古いカーネルのバックアップを作成し,新しい <tt>bzImage</tt> をコピーし ます(`<tt>/vmlinuz</tt>' を使用するなら `<tt>cp bzImage /vmlinuz</tt>' とします).それから,新しいシステム上で再度 LILO を実行します( `<tt>lilo</tt>' を実行するだけです).しかし LILO が古い場合には, <tt>/etc/lilo/install</tt> あるいは <tt>/etc/lilo/lilo -C /etc/lilo/config</tt> を実行する必要があるかもしれません. <p> <!-- If you would like to know more about LILO's configuration, or you don't have LILO, get the newest version from your favorite ftp site and follow the instructions. --> LILO の設定についてもっと知りたい,あるいは LILO を持っていないのなら, お好きな ftp サイトから最新のバージョンを入手し,説明にしたがってイン ストールしてください. <p> <!-- To boot one of your old kernels off the hard disk (another way to save yourself in case you screw up the new kernel), copy the lines below (and including) `<tt>image = xxx</tt>' in the LILO config file to the bottom of the file, and change the `<tt>image = xxx</tt>' to `<tt>image = yyy</tt>', where `<tt>yyy</tt>' is the full pathname of the file you saved your backup kernel to. Then, change the `<tt>label = zzz</tt>' to `<tt>label = linux-backup</tt>' and rerun <tt>lilo</tt>. You may need to put a line in the config file saying `<tt>delay=x</tt>', where x is an amount in tenths of a second, which tells LILO to wait that much time before booting, so that you can interrupt it (with the shift key, for example), and type in the label of the backup boot image (in case unpleasant things happen). --> ハードディスクから古いカーネルの 1 つをブートするには(新しいカーネルが どうにもならなくなったときの対処法の一つです),LILO の設定ファイルの `<tt>image = xxx</tt>' とそれ以降の行をファイルの一番最後にコピーし, `<tt>image = xxx</tt>' を `<tt>image = yyy</tt>' に変更します.ここで, `<tt>yyy</tt>' にはバックアップしておいたカーネルのファイルのフルパス を指定します.それから `<tt>label = zzz</tt>' を `<tt>label = linux-backup</tt>' に変更し <tt>lilo</tt> を再実行します. 設定ファイルに `<tt>delay = x</tt>' という行を付け加える必要があるかも しれません.x は 1/10 秒単位で待ち時間を指定します.LILOは待ち時間の間 はブートを開始しませんので,その間に(シフトキーを押すなどして)ブートを 中断することができます.新しいカーネルに問題があるときは,ここで古い カーネルのラベルを入力することでそれを起動できます. <p> <!-- <sect>Patching the kernel <p> --> <sect>カーネルへのパッチあて<p> <!-- <sect1>Applying a patch <p> --> <sect1> パッチをあてる<p> <!-- Incremental upgrades of the kernel are distributed as patches. For example, if you have version 1.1.45, and you notice that there's a `<tt>patch46.gz</tt>' out there for it, it means you can upgrade to version 1.1.46 through application of the patch. You might want to make a backup of the source tree first (`<tt>make clean</tt>' and then `<tt>cd /usr/src; tar zcvf old-tree.tar.gz linux</tt>' will make a compressed tar archive for you.). --> カーネルを順番にアップグレードしていくための差分が,パッチとして配布さ れています.例えば,今バージョン 1.1.45 を使用していて,どこかに `<tt>patch46.gz</tt>' があることに気づきました.これはそのパッチをあて ることで,バージョン 1.1.46 にアップグレードできることを意味します.ま ずソースツリーをバックアップしたほうがよいかもしれません (`<tt>make clean</tt>' して, `<tt>cd /usr/src; tar zcvf old-tree linux</tt>' すれば圧縮された tar ファイルが作成できます). <p> <!-- So, continuing with the example above, let's suppose that you have `<tt>patch46.gz</tt>' in <tt>/usr/src</tt>. <tt>cd</tt> to <tt>/usr/src</tt> and do a `<tt>zcat patch46.gz | patch -p0</tt>' (or `<tt>patch -p0 < patch46</tt>' if the patch isn't compressed). You'll see things whizz by (or flutter by, if your system is that slow) telling you that it is trying to apply hunks, and whether it succeeds or not. Usually, this action goes by too quickly for you to read, and you're not too sure whether it worked or not, so you might want to use the <tt>-s</tt> flag to <tt>patch</tt>, which tells <tt>patch</tt> to only report error messages (you don't get as much of the ``hey, my computer is actually doing something for a change!'' feeling, but you may prefer this..). To look for parts which might not have gone smoothly, cd to <tt>/usr/src/linux</tt> and look for files with a <tt>.rej</tt> extension. Some versions of <tt>patch</tt> (older versions which may have been compiled with on an inferior filesystem) leave the rejects with a <tt>#</tt> extension. You can use `<tt>find</tt>' to look for you; --> 例を続けます.<tt>/usr/src</tt> に `<tt>patch46.gz</tt>' があるとします. <tt>/usr/src</tt> に <tt>cd</tt> して `<tt>zcat patch46.gz | patch -p0</tt>' を実行してください(パッチが圧縮されていない場合は `<tt>patch -p0 < patch46</tt>' を実行してください).画面がすごい勢 いで(遅いシステムの場合はぱらぱらと)流れて行き,個々のパッチ当てに成功 したかどうかが表示されます.通常この表示は読むには速すぎるので,うまく 行ったのかどうかわかりません.そんなときは <tt>-s</tt> フラグをつける といいでしょう.こうすると <tt>patch</tt> コマンドはエラー以外のメッセー ジは表示しなくなります(「おれのコンピュータは何か書き換えているぜ!」っ て実感はないですが,こっちの方がお好みかもしれません).うまく行かなかっ た部分を見つけるには <tt>/usr/src/linux</tt> へ <tt>cd</tt> し, <tt>.rej</tt> という拡張子のついたファイルを探してください.特定のバー ジョンの <tt>patch</tt> コマンド(恐らく低機能なファイルシステム上でコ ンパイルされた古いバージョンの <tt>patch</tt>)は拡張子 <tt>#</tt> をパッチ当てできなかったファイルにつけます.<tt>.rej</tt> を探すには `<tt>find</tt>' コマンドが使えます. <verb> find . -name '*.rej' -print </verb> <!-- prints all files who live in the current directory or any subdirectories with a <tt>.rej</tt> extension to the standard output. --> とすると,カレントおよびその下のサブディレクトリに存在する,拡張子 <tt>.rej</tt> を持つファイルが全て標準出力に表示されます. <p> <!-- If everything went right, do a `<tt>make clean</tt>', `<tt>config</tt>', and `<tt>dep</tt>' as described in sections 3 and 4. --> すべてうまく行ったら,3 章と 4 章で説明したように `<tt>make clean</tt>', `<tt>make config</tt>', `<tt>make dep</tt>' を行います. <p> <!-- There are quite a few options to the <tt>patch</tt> command. As mentioned above, <tt>patch -s</tt> will suppress all messages except the errors. If you keep your kernel source in some other place than <tt>/usr/src/linux</tt>, <tt>patch -p1</tt> (in that directory) will patch things cleanly. Other <tt>patch</tt> options are well-documented in the manual page. --> <tt>patch</tt> コマンドにはかなり多くのオプションがあります.上述の通 り,<tt>-s</tt> はエラー以外のメッセージを出さなくなります.カーネルソー スを <tt>/usr/src/linux</tt> 以外に置いているなら(そのディレクトリで) <tt>patch -p1</tt> とすることでうまくパッチを当てられます.他のオプショ ンについては,man コマンドで詳しい説明を読むことができます. <p> <!-- <sect1>If something goes wrong <p> --> <sect1>何か変だ<p> <!-- (Note: this section refers mostly to quite old kernels)<p> --> (注意: この節は主に大昔のカーネルについてです)<p> <!-- The most frequent problem that used to arise was when a patch modified a file called `<tt>config.in</tt>' and it didn't look quite right, because you changed the options to suit your machine. This has been taken care of, but one still might encounter it with an older release. To fix it, look at the <tt>config.in.rej</tt> file, and see what remains of the original patch. The changes will typically be marked with `<tt>+</tt>' and `<tt>-</tt>' at the beginning of the line. Look at the lines surrounding it, and remember if they were set to `<tt>y</tt>' or `<tt>n</tt>'. Now, edit <tt>config.in</tt>, and change `<tt>y</tt>' to `<tt>n</tt>' and `<tt>n</tt>' to `<tt>y</tt>' when appropriate. Do a --> 以前,<tt>patch</tt> が `<tt>config.in</tt>' というファイルを書き換え てしまい,これが正しくないという問題がよく起こりました.これは,あなた がご自分の環境に合わせてオプションを変更していたためです.この問題は [新しいリリースでは]修正してありますが,古いリリースでは起こることが あるかもしれません.修正するには,<tt>config.in.rej</tt> ファイルを読 んで,どこが元のパッチのままになっているか見ます.変更された部分は行の はじめに `<tt>+</tt>' と `<tt>-</tt>' で印がつけてあります.印で囲まれ た部分を見て,それらに `<tt>y</tt>' と答えたか `<tt>n</tt>' と答えたか 思い出してください.それから <tt>config.in</tt> を編集し,必要なら `<tt>y</tt>' を '<tt>n</tt>' へ,'<tt>n</tt>' を '<tt>y</tt>' に変更し てください. <verb> patch -p0 < config.in.rej </verb> <!-- and if it reports that it succeeded (no fails), then you can continue on with a configuration and compilation. The <tt>config.in.rej</tt> file will remain, but you can get delete it. --> として成功したら(パッチ当てに失敗しなかったら),カーネルの設定とコンパ イルを続けてください.<tt>config.in.rej</tt> ファイルはそのまま残りま すが,消去してしまって構いません. <p> <!-- If you encounter further problems, you might have installed a patch out of order. If patch says `<tt>previously applied patch detected: Assume -R?</tt>', you are probably trying to apply a patch which is below your current version number; if you answer `<tt>y</tt>', it will attempt to degrade your source, and will most likely fail; thus, you will need to get a whole new source tree (which might not have been such a bad idea in the first place). --> まだ何か問題があるのなら,壊れたパッチを当ててしまったのかもしれません. <tt>patch</tt> が `<tt>previously applied patch detected: Assume -R?</tt>' と言ってきたら,現在より古いバージョンのパッチを当てようとしているので しょう.この問いに '<tt>y</tt>' と答えると <tt>patch</tt> はソースのバー ジョンを下げようと試みますが,恐らく失敗します.その結果,カーネルソー ス全体を改めて持ってこなくてはならなくなります(まず,これは悪い手では ありませんでした). <p> <!-- To back out (unapply) a patch, use `<tt>patch -R</tt>' on the original patch. --> パッチを当てたものを元に戻すには,元のパッチで `<tt>patch -R</tt>' します. <p> <!-- The best thing to do when patches really turn out wrong is to start over again with a clean, out-of-the-box source tree (for example, from one of the <tt>linux-x.y.z.tar.gz</tt> files), and start again. --> パッチ当てに失敗してしまったときの最良の手段は,新たにまっさらのソース ツリー(例えば <tt>linux-x.y.z.tar.gz</tt> ファイル)を持ってきて最初か らやりなおすことです. <p> <!-- <sect1>Getting rid of the .orig files <p> --> <sect1>.origファイルの消去<p> <!-- After just a few patches, the <tt>.orig</tt> files will start to pile up. For example, one 1.1.51 tree I had was once last cleaned out at 1.1.48. Removing the .orig files saved over a half a meg. --> いくつかパッチを当てると,<tt>.orig</tt> ファイルがたまってきます.例 えば,私が 1.1.48 で最後に <tt>.orig</tt> を消去した 1.1.51 のソースツリー では,<tt>.orig</tt> を消すことで 500 kBのディスクスペースが空きました. <verb> find . -name '*.orig' -exec rm -f {} ';' </verb> <!-- will take care of it for you. Versions of <tt>patch</tt> which use <tt>#</tt> for rejects use a tilde instead of <tt>.orig</tt>. --> とすれば <tt>.orig</tt> を全て始末できます.パッチ当てに失敗したファイ ルに <tt>.rej</tt> ではなく <tt>#</tt> を使用するバージョンの <tt>patch</tt> では,<tt>.orig</tt> のかわりにチルド(<tt>tilde</tt>)を 使用してください. <p> <!-- There are better ways to get rid of the <tt>.orig</tt> files, which depend on GNU <tt>xargs</tt>: --> <tt>.orig</tt> ファイルを消去するためのより良い方法もありますが,これ は GNU <tt>xargs</tt> のバージョンによります: <verb> find . -name '*.orig' | xargs rm </verb> <!-- or the ``quite secure but a little more verbose'' method: --> あるいは「極めて確実だが,もう少しおしゃべりな」方法として: <verb> find . -name '*.orig' -print0 | xargs --null rm -- </verb> があります. <p> <!-- <sect1>Other patches <p> --> <sect1>他のパッチ<p> <!-- There are other patches (I'll call them ``nonstandard'') than the ones Linus distributes. If you apply these, Linus' patches may not work correctly and you'll have to either back them out, fix the source or the patch, install a new source tree, or a combination of the above. This can become very frustrating, so if you do not want to modify the source (with the possibility of a very bad outcome), back out the nonstandard patches before applying Linus', or just install a new tree. Then, you can see if the nonstandard patches still work. If they don't, you are either stuck with an old kernel, playing with the patch or source to get it to work, or waiting (possibly begging) for a new version of the patch to come out. --> Linus が配布している以外にもパッチがあります(私はこれを「非標準」と呼 ぶことにします).このようなパッチを当てると Linus のパッチが当たらなく て非標準のパッチを取り除くはめになったり,ソースやパッチを修正しなけれ ばいけなかったり,新しいソースをインストールしなおしたり,あるいはこれ らを組み合せて対応しなくてはならなくなるかもしれません.これは大変スト レスのたまることですから,(悪い結果になりそうな)ソースの変更を望まない なら Linus のパッチを当てる前に非標準パッチを戻すか,さもなくば新しい ソースをインストールしなおしましょう.それから非標準のパッチがまだうま く当たるかどうか確認します.うまく行かなければ,古いカーネルを使い続け るか,うまく行くようにソースやパッチと戯れるか,新しいバージョンのパッ チが出てくるのを待って(もしかすると泣きついたりして)ください. <p> <!-- How common are the patches not in the standard distribution? You will probably hear of them. I used to use the noblink patch for my virtual consoles because I hate blinking cursors (This patch is (or at least was) frequently updated for new kernel releases.). With most newer device drivers being developed as loadable modules, though, the frequecy of ``nonstandard'' patches is decreasing significantly. --> 標準の配布に含まれていないパッチはどれくらい一般的なんでしょうか? 標 準でないパッチのうわさを聞くこともあるでしょう.私はカーソルが点滅する ことをどうしても許せないので,仮想コンソールでカーソルが点滅しないパッ チを当てていました(このパッチは(少なくとも以前は)新しいカーネルのリリー スに合わせて頻繁にアップデートされていました).しかし,ローダブルモジュール として開発されているほとんどの新しいドライバについては,``非標準'' の パッチが出現する頻度はとても低くなってきています. <p> <!-- <sect>Additional packages<p> --> <sect>追加パッケージ<p> <!-- Your linux kernel has many features which are not explained in the kernel source itself; these features are typically utilized through external packages. Some of the most common are listed here.<p> --> Linux のカーネルには,カーネルソース単独では明らかにならない機能がたく さんあります.これらの機能は普通,カーネル外のパッケージを用いて使用す ることができます.ここでは一般的なものを紹介します.<p> <!-- <sect1>kbd<p> --> <sect1>kbd<p> <!-- The linux console probably has more features than it deserves. Among these are the ability to switch fonts, remap your keyboard, switch video modes (in newer kernels), etc. The kbd package has programs which allow the user to do all of this, plus many fonts and keyboard maps for almost any keyboard, and is available from the same sites that carry the kernel source.<p> --> Linux のコンソールは優れた機能を持っています.フォントの変更,キーボードの配 列変更,(新しいカーネルでの)ビデオモードの変更などです.kbd パッケージ はこれらすべてのことができ,多くのフォントとほとんどすべてのキーボード に対応したキーボードマップも付属しています.このパッケージは,カーネル ソースの置いてあるのと同じサイトから入手できます.<p> <!-- <sect1>util-linux<p> --> <sect1>util-linux<p> <!-- Rik Faith (<tt>faith@cs.unc.edu</tt>) put together a large collection of linux utilities which are, by odd coincidence, called util-linux. These are now maintained by Andries Brouwer (<tt>util-linux@math.uio.no</tt>). Available via anonymous ftp from sunsite.unc.edu in <tt>/pub/Linux/system/misc</tt>, it contains programs such as <tt>setterm</tt>, <tt>rdev</tt>, and <tt>ctrlaltdel</tt>, which are relevant to the kernel. As Rik says, <it>do not install without thinking;</it> you do not need to install everything in the package, and it could very well cause serious problems if you do. <p> --> Rik Faith さん(<tt>faith@cs.unc.edu</tt>)は,奇妙な一致ですが, util-linux という Linux 用のユーティリティをたくさん集めたものをまとめ ていました.現在は Nicolai Langfeldt さんが管理しています (<tt>util-linux@math.uio.no</tt>). このパッケージは metalab.unc.edu[およびそのミラーサイト]の <tt>/pub/Linux/system/misc</tt> から匿名 ftp で入手でき, <tt>setterm</tt>, <tt>rdev</tt>, <tt>ctrlaltdel</tt> 等のカーネルに関 連したプログラムを含んでいます.Rik さんによると「<it>なにも考えないで インストールしてはいけません</it>;パッケージのすべてをインストールす る必要はありません.そんなことすると重大な問題を引き起こすかもしれませ ん」ということです. <p> <!-- <sect1>hdparm<p> --> <sect1>hdparm<p> <!-- As with many packages, this was once a kernel patch and support programs. The patches made it into the official kernel, and the programs to optimize and play with your hard disk are distributed separately. --> 多くのパッケージにおいて,この hdparm はかつてはカーネルパッチとパッチ と対になるプログラムでした.このパッチは公式のカーネルに取りこまれ,ハー ドディスクを最適化したりハードディスクと戯れるためのプログラムは別個に 配布されるようになりました. <p> <!-- <sect1>gpm<p> --> <sect1>gpm<p> <!-- gpm stands for general purpose mouse. This program allows you to cut and paste text between virtual consoles and do other things with a large variety of mouse types. --> gpm は「general purpose mouse(汎用マウス)」を略したものです.このプロ グラムは仮想コンソール間でのカットアンドペーストを可能にしたり,非常に 多くの種類のマウスに関してさまざまな機能を提供します. <p> <!-- <sect>Some pitfalls <p> --> <sect>いくつかの落とし穴<p> <!-- <sect1>make clean <p> --> <sect1>make clean<p> <!-- If your new kernel does really weird things after a routine kernel upgrade, chances are you forgot to <tt>make clean</tt> before compiling the new kernel. Symptoms can be anything from your system outright crashing, strange I/O problems, to crummy performance. Make sure you do a <tt>make dep</tt>, too. --> 通常のアップグレードの後,新しく構築したカーネルが奇妙な動作をするとき は,新しいカーネルをコンパイルをする前に「<tt>make clean</tt>」を実行 するのを忘れた可能性があります.症状はいろいろで,システムが完全にクラッ シュしてしまったり,入出力がおかしくなったり,速度が遅くなったりするか もしれません.「<tt>make dep</tt>」も忘れずに実行してください. <p> <!-- <sect1>Huge or slow kernels <p> --> <sect1>巨大あるいは遅いカーネル<p> <!-- If your kernel is sucking up a lot of memory, is too large, and/or just takes forever to compile even when you've got your new Quadbazillium-III/4400 working on it, you've probably got lots of unneeded stuff (device drivers, filesystems, etc) configured. If you don't use it, don't configure it, because it does take up memory. The most obvious symptom of kernel bloat is extreme swapping in and out of memory to disk; if your disk is making a lot of noise and it's not one of those old Fujitsu Eagles that sound like like a jet landing when turned off, look over your kernel configuration. --> カーネルが多量のメモリを使いこんだり,あまりに巨大だったり,あるいはせっかく 新しい Quadbazillium-III/4400 を投入してやったというのにコンパイルがい つまでたっても終わらないという場合は,いらないものまでカーネルに組みこ んでしまっているかもしれません(デバイスやファイルシステムなどです).い らないものは組みこまないようにしましょう.メモリを浪費することになるか らです.カーネルの巨大化によって現われる,もっとも目立つ症状は,メモリ とディスクの間でスワップが頻繁に起こるというものです.ディスクがあまり にもうるさく,停止時にジェット機の着陸時のような音がする古い富士通製の Eagles というハードディスクも使っていない場合には,カーネルの設定を調 べてみましょう. <p> <!-- You can find out how much memory the kernel is using by taking the total amount of memory in your machine and subtracting from it the amount of ``total mem'' in <tt>/proc/meminfo</tt> or the output of the command `<tt>free</tt>'. --> カーネルがどれくらいメモリを消費してるかは,<tt>/proc/meminfo</tt> あ るいは `<tt>free</tt>' コマンドの ``<tt>total mem</tt>'' からマシンに 搭載しているメモリ量を差し引くことでわかります. <p> <!-- <sect1>The parallel port doesn't work/my printer doesn't work<p> --> <sect1>パラレルポートが動かない/プリンタが動かない<p> <!-- Configuration options for PCs are: First, under the category `General Setup', select `Parallel port support' and `PC-style hardware'. Then under `Character devices', select `Parallel printer support'. --> PC 用の設定オプションは以下の場所にあります.まずは「General Setup」の `Parallel port support' と `PC-style hardware' を選んでください.それ から `Character devices' の `Parallel printer support' を選択してくだ さい. <p> <!-- Then there are the names. Linux 2.2 names the printer devices differently than previous releases. The upshot of this is that if you had an <tt>lp1</tt> under your old kernel, it's probably an <tt>lp0</tt> under your new one. Use `<tt>dmesg</tt>' or look through the logs in <tt>/var/log</tt> to find out. --> すると名前表示されます.Linux 2.2 では,プリンタのデバイス名は前のリリー スと異なっています.その結果,古いカーネルで使っていた <tt>lp1</tt> は 新しいカーネルでは <tt>lp0</tt> となります.これを調べるには `<tt>dmesg</tt>' コマンドを使うか,<tt>/var/log</tt> のログを見てくだ さい. <p> <!-- <sect1>Kernel doesn't compile <p> --> <sect1>カーネルをコンパイルできない<p> <!-- If it does not compile, then it is likely that a patch failed, or your source is somehow corrupt. Your version of gcc also might not be correct, or could also be corrupt (for example, the include files might be in error). Make sure that the symbolic links which Linus describes in the <tt>README</tt> are set up correctly. In general, if a standard kernel does not compile, something is seriously wrong with the system, and reinstallation of certain tools is probably necessary. --> コンパイルできない場合,パッチ当てに失敗していたり,カーネルソースがど こか壊れているのかもしれません.gcc のバージョンが違っていたり,gcc そ のものが壊れているのかもしれません(例えばインクルードファイルがおかし いなど).Linus さんが <tt>README</tt> で説明しているシンボリックリンク が正しく設定されていることを確認してください.一般的に言って,標準のカー ネルをコンパイルできない場合はシステムに重大な問題があり,特定のツール を再インストールする必要があるかもしれません. <p> <!-- In some cases, gcc can crash due to hardware problems. The error message will be something like ``xxx exited with signal 15'' and it will generally look very mysterious. I probably would not mention this, except that it happened to me once - I had some bad cache memory, and the compiler would occasionally barf at random. Try reinstalling gcc first if you experience problems. You should only get suspicious if your kernel compiles fine with external cache turned off, a reduced amount of RAM, etc. --> 場合によっては,ハードウェアの問題で gcc がクラッシュすることがありま す.エラーメッセージは ``xxx exited with signal 15'' というような感じ になり,一般に大変ミステリアスに見えます.このことについてはあまり触れ ませんが,一度わたしも遭遇したことがあります - 原因はキャッシュメモリ の不良で,コンパイラが時々ゲロを吐く[core dump する]ことがありました. この問題に遭遇したら,まず gcc を再インストールしてみてください.外部 キャッシュをオフにしたり,RAM の容量を減らしてみたらカーネルコンパイル がうまく行く場合は,この辺を疑ってみるべきでしょう. <p> <!-- It tends to disturb people when it's suggested that their hardware has problems. Well, I'm not making this up. There is an FAQ for it -- it's at <tt>http://www.bitwizard.nl/sig11/</tt>. --> ハードウェアに問題があるかもしれないと言うと,多くの人はいい気持がしな いようです.でも,私は話をでっちあげているわけじゃありません.専用の FAQ もあります -- <tt>http://www.bitwizard.nl/sig11/</tt> を見てくださ い. <p> <!-- <sect1>New version of the kernel doesn't seem to boot<p> --> <sect1>新しいバージョンのカーネルでブートしていないようだ<p> <!-- You did not run LILO, or it is not configured correctly. One thing that ``got'' me once was a problem in the config file; it said `<tt>boot = /dev/hda1</tt>' instead of `<tt>boot = /dev/hda</tt>' (This can be really annoying at first, but once you have a working config file, you shouldn't need to change it.). --> LILO を実行していないか,LILO の設定が正しくありません.以前私が遭遇し たのは設定ファイルの問題でした.`<tt>boot = /dev/hda</tt>' ではなく `<tt>boot = /dev/hda1</tt>' と書いていました(これは慣れるまでは本当に 紛らわしいですが,一旦動作する設定ファイルを作ったら後は変更する必要は ありません). <p> <!-- <sect1> You forgot to run LILO, or system doesn't boot at all<p> --> <sect1>LILO を実行し忘れた,あるいはまったくブートできない<p> <!-- Ooops! The best thing you can do here is to boot off of a floppy disk or CDROM and prepare another bootable floppy (such as `<tt>make zdisk</tt>' would do). You need to know where your root (<tt>/</tt>) filesystem is and what type it is (e.g. second extended, minix). In the example below, you also need to know what filesystem your <tt>/usr/src/linux</tt> source tree is on, its type, and where it is normally mounted.<p> --> あらら.ここでの最善の策はフロッピーディスクや CD-ROM から起動し,別の ブート可能なフロッピーを作ることです(`<tt>make zdisk</tt>' などとしま す).ルートファイルシステム(<tt>/</tt>)の場所とそのファイルシステムの 種類(ext2 や minix など)を知っている必要があります.以下の例では <tt>/usr/src/linux</tt> というソースツリーが置かれているファイルシステ ムとその種類,そしてこれが通常はどこにマウントされているかも知っていな ければなりません.<p> <!-- In the following example, <tt>/</tt> is <tt>/dev/hda1</tt>, and the filesystem which holds <tt>/usr/src/linux</tt> is <tt>/dev/hda3</tt>, normally mounted at <tt>/usr</tt>. Both are second extended filesystems. The working kernel image in <tt>/usr/src/linux/arch/i386/boot</tt> is called <tt>bzImage</tt>.<p> --> 以下の例では,<tt>/</tt> は <tt>/dev/hda1</tt> にあり,また <tt>/usr/src/linux</tt> が存在するファイルシステムは <tt>/dev/hda3</tt> であり,通常は <tt>/usr</tt> にマウントされています. どちらも ext2 ファイルシステムです. <tt>/usr/src/linux/arch/i386/boot</tt> に存在する,動作するカーネルイ メージは <tt>bzImage</tt> と呼ばれます.<p> <!-- The idea is that if there is a functioning <tt>bzImage</tt>, it is possible to use that for the new floppy. Another alternative, which may or may not work better (it depends on the particular method in which you messed up your system) is discussed after the example.<p> --> この復旧法の考え方は,もしちゃんと動作する <tt>zImage</tt> が存在する なら,それを新しいフロッピーで使用できるというものです.これよりうまく いくかどうかは定かではありませんが(これはどのようにしてシステムを破壊 したかによります),別の方法について例の後に説明します.<p> <!-- First, boot from a boot/root disk combo or rescue disk, and mount the filesystem which contains the working kernel image:<p> --> まずは起動/ルートディスクの組み合せか,あるいは復旧ディスクから起動を 行い,動作するカーネルがあるファイルシステムをマウントします:<p> <verb> mkdir /mnt mount -t ext2 /dev/hda3 /mnt </verb> <!-- If <tt>mkdir</tt> tells you that the directory already exists, just ignore it. Now, <tt>cd</tt> to the place where the working kernel image was. Note that --> <tt>mkdir</tt> したときにディレクトリはすでに存在するといわれても,無 視してください.続いて動作するカーネルイメージがあったディレクトリへ <tt>cd</tt> します.以下のことに注意してください: <verb> /mnt + /usr/src/linux/arch/i386/boot - /usr = /mnt/src/linux/arch/i386/boot </verb> <!-- Place a formatted disk in drive ``A:'' (not your boot or root disk!), dump the image to the disk, and configure it for your root filesystem:<p> --> フォーマットしたディスクをドライブ ``A:'' に入れ(断じて起動ディスクや ルートディスクじゃありません!),カーネルイメージをフロッピーへダンプ し,そのイメージが使うルートファイルシステムを設定します:<p> <verb> cd /mnt/src/linux/arch/i386/boot dd if=bzImage of=/dev/fd0 rdev /dev/fd0 /dev/hda1 </verb> <!-- <tt>cd</tt> to <tt>/</tt> and unmount the normal <tt>/usr</tt> filesystem:<p> --> <tt>/</tt> に <tt>cd</tt> し,通常は <tt>/usr</tt> となるファイルシス テムをアンマウントします:<p> <verb> cd / umount /mnt </verb> <!-- You should now be able to reboot your system as normal from this floppy. Don't forget to run lilo (or whatever it was that you did wrong) after the reboot!<p> --> これで,作成したフロッピーからシステムを通常通りにリブートできるはずで す.リブート後,lilo の実行(あるいは失敗の原因の除去)を忘れずに行って ください!<p> <!-- As mentioned above, there is another common alternative. If you happened to have a working kernel image in <tt>/</tt> (<tt>/vmlinuz</tt> for example), you can use that for a boot disk. Supposing all of the above conditions, and that my kernel image is <tt>/vmlinuz</tt>, just make these alterations to the example above: change <tt>/dev/hda3</tt> to <tt>/dev/hda1</tt> (the <tt>/</tt> filesystem), <tt>/mnt/src/linux</tt> to <tt>/mnt</tt>, and <tt>if=bzImage</tt> to <tt>if=vmlinuz</tt>. The note explaining how to derive <tt>/mnt/src/linux</tt> may be ignored. --> 上述の通り,一般的な対処法がもう一つあります.動作するカーネルがたまた ま <tt>/</tt> にある場合(例えば<tt>/vmlinuz</tt>),それをブートディス クとして使うことができます.先に述べた条件をすべて満たしていて,かつカー ネルイメージが <tt>/vmlinuz</tt> である場合,上の例をすべてこれに合う ように変更するだけです:<tt>/dev/hda3</tt> を <tt>/dev/hda1</tt>(<tt>/</tt>ファイルシステムです)へ, <tt>/mnt/src/linux</tt> を <tt>/mnt</tt>へ,<tt>if=bzImage</tt>を <tt>if=vmlinuz</tt> へ変更します.どうして <tt>/mnt/src/linux</tt> が 出てくるのか,という点については気にしないでください. <p> <!-- Using LILO with big drives (more than 1024 cylinders) can cause problems. See the LILO mini-HOWTO or documentation for help on that. --> LILO を大きなドライブ(1024 以上のシリンダを持つもの)で使用すると,問題 が生じることがあります.この問題に関する情報については LILO mini-HOWTO などを参照してください. <p> <!-- <sect1>It says `warning: bdflush not running' <p> --> <sect1>`warning: bdflush not running' という警告が出る<p> <!-- This can be a severe problem. Starting with a kernel release after 1.0 (around 20 Apr 1994), a program called `<tt>update</tt>' which periodically flushes out the filesystem buffers, was upgraded/replaced. Get the sources to `<tt>bdflush</tt>' (you should find it where you got your kernel source), and install it (you probably want to run your system under the old kernel while doing this). It installs itself as `<tt>update</tt>' and after a reboot, the new kernel should no longer complain. --> これは重大な問題かもしれません.リリース 1.0 以降のカーネル(94 年の 4 月 20 日前後)から,ファイルシステムのバッファを定期的にフラッシュする `<tt>update</tt>' というプログラムの修正・置き換えが行われました. `<tt>bdflush</tt>' のソースを入手し(カーネルソースを取ってきたところで 見つかるはずです),インストールします(インストールはおそらく古いカーネ ルの下で実行するほうがよいでしょう).これはインストールの際に自動的に `<tt>update</tt>' としてインストールされ,リブートの後は,新しいカーネ ルが文句を言うことはなくなるはずです. <p> <!-- <sect1>I can't get my IDE/ATAPI CD-ROM drive to work<p> --> <sect1>IDE/ATAPI CD-ROM ドライブが動かない<p> <!-- Strangely enough, lots of people cannot get their ATAPI drives working, probably because there are a number of things that can go wrong. --> 何とも不思議なことに,ATAPI ドライブがうまく動かないという人がたくさん います.たぶんこれは,間違いが起こるポイントがたくさんあるからでしょう. <p> <!-- If your CD-ROM drive is the only device on a particular IDE interface, it must be jumpered as ``master'' or ``single.'' Supposedly, this is the most common error. --> IDE インタフェースに繋がっているドライブが問題の CD-ROM だけの場合,ジャ ンパの設定を「master」または「single」にしなければなりません.たぶん, これが一番ありがちな間違いです. <p> <!-- Creative Labs (for one) has put IDE interfaces on their sound cards now. However, this leads to the interesting problem that while some people only have one interface to being with, many have two IDE interfaces built-in to their motherboards (at IRQ15, usually), so a common practice is to make the soundblaster interface a third IDE port (IRQ11, or so I'm told). --> (例えば)Creative Labs はサウンドカードに IDE インタフェースを載せてい ます.しかし,これは奥の深い問題を起こします.すなわち,IDE インタフェース が 1 つしか無いマザーボードもありますが,多くのマザーボードには IDE インタフェースが 2 つあります(普通は IRQ 15).したがって,普通は SoundBlaster のインタフェースを 3 番目の IDE ポート(私は IRQ 11 くらい と聞きました)にすることになります. <p> <!-- This causes problems with linux in that versions 1.2.x don't support a third IDE interface (there is support in starting somewhere in the 1.3.x series but that's development, remember, and it doesn't auto-probe). To get around this, you have a few choices.<p> --> ところがこれは Linux では問題を起こします.つまり,バージョン 1.2.x は 3 つ目の IDE インタフェースをサポートしていないのです(1.3.x 系列のどこ かでサポートされるようになりましたが,このカーネルは開発版ですし,自動 検出も行われないのを忘れないでください).これを回避する方法はいくつか あります.<p> <p> <!-- If you have a second IDE port already, chances are that you are not using it or it doesn't already have two devices on it. Take the ATAPI drive off the sound card and put it on the second interface. You can then disable the sound card's interface, which saves an IRQ anyway. --> 2 番目の IDE ポートが既にあり,これが使われていないか,あるいはまだデ バイスが 2 つ繋がっていないことがあります.この場合にはサウンドカード から ATAPI ドライブを取り外し,2 番目のインタフェースに接続してくださ い.そうすればサウンドカードのインタフェースを無効にすることもできます. これでとりあえず IRQ も節約できます. <p> <!-- If you don't have a second interface, jumper the sound card's interface (not the sound card's sound part) as IRQ15, the second interface. It should work. --> 2 番目のインタフェースがなければ,サウンドカードのインタフェースをジャ ンパで設定して,IRQ15 (2 番目のインタフェース)にしてください.これで動 作するはずです. <p> <!-- <sect1>It says weird things about obsolete routing requests <p> --> <sect1>廃れてしまった経路要求に対しておかしな警告が出る<p> <!-- Get new versions of the <tt>route</tt> program and any other programs which do route manipulation. <tt>/usr/include/linux/route.h</tt> (which is actually a file in <tt>/usr/src/linux</tt>) has changed. --> <tt>route</tt> プログラムや,その他のプログラムで経路を操作するものを 全て新しいバージョンにしてください. <tt>/usr/include/linux/route.h</tt>(実際には <tt>/usr/src/linux</tt> にあるファイルです)が変更されているからです. <p> <!-- <sect1>Firewalling not working in 1.2.0<p> --> <sect1>1.2.0 でファイアウォールが動作しない<p> <!-- Upgrade to at least version 1.2.1. --> 少なくともバージョン 1.2.1 までアップデートしてください. <p> <!-- <sect1>``Not a compressed kernel Image file''<p> --> <sect1>``Not a compressed kernel Image file(カーネルイメージファイルが圧縮されていない)''<p> <!-- Don't use the <tt>vmlinux</tt> file created in <tt>/usr/src/linux</tt> as your boot image; <tt>[..]/arch/i386/boot/bzImage</tt> is the right one. --> <tt>/usr/src/linux</tt> にできるファイル <tt>vmlinux</tt> をブートイメー ジとして使用してはいけません;<tt>[..]/arch/i386/boot/bzImage</tt>を使っ てください. <p> <!-- <sect1>Problems with console terminal after upgrade to 1.3.x<p> --> <sect1>1.3.x にアップデートした後コンソール端末に問題が出る<p> <!-- Change the word <tt>dumb</tt> to <tt>linux</tt> in the console termcap entry in <tt>/etc/termcap</tt>. You may also have to make a terminfo entry. --> <tt>/etc/termcap</tt> 内の,コンソール用 termcap エントリを <tt>dumb</tt> から <tt>linux</tt> に変更してください.terminfo のエン トリを作成する必要もあるかもしれません. <p> <!-- <sect1> Can't seem to compile things after kernel upgrade<p> --> <sect1>カーネルアップグレードの後コンパイルできなくなったようだ<p> <!-- The linux kernel source includes a number of include files (the things that end with <tt>.h</tt>) which are referenced by the standard ones in <tt>/usr/include</tt>. They are typically referenced like this (where <tt>xyzzy.h</tt> would be something in <tt>/usr/include/linux</tt>): --> Linux のカーネルソースにはたくさんのインクルードファイル(名前が <tt>.h</tt> で終わるファイル)が入っています.これは, <tt>/usr/include</tt> にある標準のインクルードファイルとして参照されま す.これらのファイルは以下のように参照されます(ここで <tt>xyzzy.h</tt> は <tt>/usr/include/linux</tt> に存在するもののどれかです): <verb> #include <linux/xyzzy.h> </verb> <!-- Normally, there is a link called <tt>linux</tt> in <tt>/usr/include</tt> to the <tt>include/linux</tt> directory of your kernel source (<tt>/usr/src/linux/include/linux</tt> in the typical system). If this link is not there, or points to the wrong place, most things will not compile at all. If you decided that the kernel source was taking too much room on the disk and deleted it, this will obviously be a problem. Another way it might go wrong is with file permissions; if your <tt>root</tt> has a umask which doesn't allow other users to see its files by default, and you extracted the kernel source without the <tt>p</tt> (preserve filemodes) option, those users also won't be able to use the C compiler. Although you could use the <tt>chmod</tt> command to fix this, it is probably easier to re-extract the include files. You can do this the same way you did the whole source at the beginning, only with an additional argument:<p> --> 通常,<tt>/usr/include</tt>ディレクトリには <tt>linux</tt> というリン クがあり,これはカーネルソースの <tt>include/linux</tt> ディレクトリ (普通のシステムでは <tt>/usr/src/linux/include/linux</tt>)を指していま す.このリンクが張られていなかったり,あるいはおかしなところへ張られて いると,ほとんどのプログラムをコンパイルできなくなってしまいます.カー ネルソースがあまりにディスクスペースを消費するからとこれを消去してしま うと,このリンクが消滅してしまい明らかに問題になります.ファイルのパー ミッション(ファイルへのアクセス許可)でもうまくいかない原因になります; あなたのシステムの <tt>root</tt> が,デフォルトで他のユーザーにインク ルードファイルを見せないように umask を設定していたり,かつカーネルを 展開するときに <tt>p</tt> オプション(ファイルモードを変更しない)をつけ ないと,他のユーザーはやはり C コンパイラを使用できなくなります. <tt>chmod</tt> コマンドでパーミッションを変更することもできますが,イ ンクルードファイルを展開し直すほうが楽でしょう.最初にソース全体を展開 したときのコマンドに引数を追加するだけです. <verb> blah# tar zxvpf linux.x.y.z.tar.gz linux/include </verb> <!-- Note: ``<tt>make config</tt>'' will recreate the <tt>/usr/src/linux</tt> link if it isn't there. --> 注意: ``<tt>make config</tt>'' は <tt>/usr/src/linux</tt> にリンクが存 在しなければ,リンクを張り直します. <p> <!-- <sect1>Increasing limits<p> --> <sect1>上限値を大きくする<p> <!-- The following few <it>example</it> commands may be helpful to those wondering how to increase certain soft limits imposed by the kernel: --> 少ししかありませんが以下の<it>コマンド例</it>は,カーネルが設定した ソフトリミットを増やす方法を知りたい人の参考になるでしょう: <verb> echo 4096 > /proc/sys/kernel/file-max echo 12288 > /proc/sys/kernel/inode-max echo 300 400 500 > /proc/sys/vm/freepages </verb> <p> <!-- <sect>Note for upgrade to version 2.0.x, 2.2.x<p> --> <sect>バージョン 2.0.x, 2.2.x へのアップグレードのために<p> <!-- Kernel versions 2.0.x and 2.2.x introduced quite a bit of changes for kernel installation. The file <tt>Documentation/Changes</tt> in the 2.0.x source tree contains information that you should know when upgrading to either of these versions. You will most likely need to upgrade several key packages, such as gcc, libc, and SysVInit, and perhaps alter some system files, so expect this. Don't panic, though. --> カーネルバージョン 2.0.x と 2.2.x ではカーネルのインストールはかなり変 わりました.それぞれのソースツリーに同梱のファイル <tt>Documentation/Changes</tt> には,アップグレードの際に知っておくべ き情報が書かれています [JF に翻訳(<url url="http://www.linux.or.jp/JF/JFdocs/Documentation/Changes">があります)]. 大抵は重要なパッケージをいくつかアップグレードする必要があることでしょ う.これは例えば gcc, libc, SysVInit などで,さらにシステムファイルも いくつか変更する必要があるでしょう.パニックになる必要はないですが. <p> <!-- <sect>Modules<p> --> <sect>Modules(モジュール)<p> <!-- Loadable kernel modules can save memory and ease configuration. The scope of modules has grown to include filesystems, ethernet card drivers, tape drivers, printer drivers, and more. --> ローダブルカーネルモジュールを使うとメモリを節約できますし,設定も容易 です.モジュールのサポートする範囲は,ファイルシステム・ イーサネットカードドライバ・テープドライバ・プリンタドライバ等まで広がっ てきました. <p> <!-- <sect1>Installing the module utilities<p> --> <sect1>モジュール用ユーティリティのインストール<p> <!-- The module utilities are available from wherever you got your kernel source as <tt>modutils-x.y.z.tar.gz</tt>; choose the highest patchlevel <tt>x.y.z</tt> that is equal to or below that of your current kernel. Unpack it with `<tt>tar zxvf modutils-x.y.z.tar.gz</tt>', <tt>cd</tt> to the directory it creates (<tt>modutils-x.y.z</tt>), look over the <tt>README</tt>, and carry out its installation instructions (which is usually something simple, such as <tt>make install</tt>). You should now have the programs <tt>insmod</tt>, <tt>rmmod</tt>, <tt>ksyms</tt>, <tt>lsmod</tt>, <tt>genksyms</tt>, <tt>modprobe</tt>, and <tt>depmod</tt> in <tt>/sbin</tt>. If you wish, test out the utilities with the ``hw'' example driver in <tt>insmod</tt>; look over the <tt>INSTALL</tt> file in that subdirectory for details. --> モジュール用ユーティリティはカーネルソースと同じところに <tt>modules-x.y.z.tar.gz</tt> という形で置いてあります;現在使用してい るカーネルのパッチレベル以下で,パッチレベル(<tt>x.y.z</tt>)がもっとも 高いものを取ってきてください. `<tt>tar zxvf modules-x.y.z.tar.gz</tt>' で展開し,ソース 展開がされたディレクトリ(<tt>modules-x.y.z</tt>)へ <tt>cd</tt> し, <tt>README</tt> ファイルを読み,説明にしたがってインストールを実行しま す(通常はそんなに難しくなくて,<tt>make install</tt> のようなことをす るだけです).これで,<tt>/sbin</tt> に <tt>insmod</tt>, <tt>rmmod</tt>, <tt>ksyms</tt>, <tt>lsmod</tt>, <tt>gensyms</tt>, <tt>modprobe</tt>, <tt>depmod</tt> というプログラムができます.お望み ならサブディレクトリ <tt>insmod</tt> にある ``<tt>hw</tt>'' という サンプルのドライバを使ってユーティリティのテストを行ってください; 詳しくはそのサブディレクトリにある <tt>INSTALL</tt> ファイルを読んでく ださい. <p> <!-- <tt>insmod</tt> inserts a module into the running kernel. Modules usually have a <tt>.o</tt> extension; the example driver mentioned above is called <tt>drv_hello.o</tt>, so to insert this, one would say `<tt>insmod drv_hello.o</tt>'. To see the modules that the kernel is currently using, use <tt>lsmod</tt>. The output looks like this: --> <tt>insmod</tt> は現在実行中のカーネルにモジュールを追加します. モジュールには通常 <tt>.o</tt> という拡張子がついています;上述の サンプルのドライバは <tt>drv_hello.o</tt> という名前ですので,これを追 加するには `<tt>insmod drv_hello.o</tt>' としてください.カーネルが現 在使用中のモジュールを確認するには <tt>lsmod</tt>を使用します.出力は 以下のようになります: <verb> blah# lsmod Module: #pages: Used by: drv_hello 1 </verb> <!-- `<tt>drv_hello</tt>' is the name of the module, it uses one page (4k) of memory, and no other kernel modules depend on it at the moment. To remove this module, use `<tt>rmmod drv_hello</tt>'. Note that <tt>rmmod</tt> wants a <it>module name,</it> not a filename; you get this from <tt>lsmod</tt>'s listing. The other module utilities' purposes are documented in their manual pages. --> `<tt>drv_hello</tt>' はモジュールの名前で,これはメモリを 1 ページ (4kB)使用しています.現時点ではこのモジュールに依存している他のカーネ ルモジュールはありません.このモジュールを取り外すには, `<tt>rmmod drv_hello</tt>' とします.<tt>rmmod</tt> はファイル名ではな く,<it>モジュール名</it>を要求することに注意してください;モジュール名 は <tt>lsmod</tt> の出力するリストに書いてあります.他の モジュールユーティリティの目的は,それぞれのオンラインマニュアルに書か れています. <p> <!-- <sect1>Modules distributed with the kernel<p> --> <sect1>カーネルとともに配布されるモジュール<p> <!-- As of version 2.0.30, most of everything is available as a loadable modules. To use them, first make sure that you don't configure them into the regular kernel; that is, don't say <tt>y</tt> to it during `<tt>make config</tt>'. Compile a new kernel and reboot with it. Then, <tt>cd</tt> to <tt>/usr/src/linux</tt> again, and do a `<tt>make modules</tt>'. This compiles all of the modules which you did not specify in the kernel configuration, and places links to them in <tt>/usr/src/linux/modules</tt>. You can use them straight from that directory or execute `<tt>make modules_install</tt>', which installs them in <tt>/lib/modules/x.y.z</tt>, where <tt>x.y.z</tt> is the kernel release. --> バージョン 2.0.30 の時点では,ほとんどすべてのドライバはモジュールとし て利用できます.これらのモジュールを使用するには,まずこれらのモジュー ルの機能をカーネルに組み込んでいないことを確認してください;つまり, `<tt>make config</tt>' する際には,<tt>y</tt> と答えてはいけません. 新しいカーネルをコンパイルしそれでブートします.それから再度 <tt>/usr/src/linux</tt> へ <tt>cd</tt> し,`<tt>make modules</tt>' を 実行します.するとカーネル設定で組み込まれなかった機能を持つモジュール がすべてコンパイルされ,<tt>/usr/src/linux/modules</tt> に存在する モジュールへリンクが張られます.そのディレクトリから直接実行することも できますし,`<tt>make modules_install</tt>' を実行すれば,できたモジュー ルを <tt>/lib/modules/x.y.z</tt> へインストールすることもできます. ここで <tt>x.y.z</tt> はカーネルのバージョンです. <p> <!-- This can be especially handy with filesystems. You may not use the minix or msdos filesystems frequently. For example, if I encountered an msdos (shudder) floppy, I would <tt>insmod /usr/src/linux/modules/msdos.o</tt>, and then <tt>rmmod msdos</tt> when finished. This procedure saves about 50k of RAM in the kernel during normal operation. A small note is in order for the minix filesystem: you should <it>always</it> configure it directly into the kernel for use in ``rescue'' disks. --> モジュールは特にファイルシステムについて有用です.minix や msdos ファイルシステムはあまり頻繁に使わないでしょう.例えば私が msdos のフ ロッピーに遭遇した場合(ああ嫌だ), <tt>insmod /usr/src/linux/modules/msdos.o</tt> し,用が済んだら <tt>rmmod msdos</tt>します.これで,msdos ファイルシステムを使わないと きには 50kB の RAM を節約することができます.minix ファイルシステムに ついては少々注意すべきことがあります:復旧ディスクで使えるように, minix ファイルシステムは<it>常に</it>カーネルに組み込んでおくべきです. <p> <!-- <sect>Tips and tricks <p> --> <sect>ちょっとしたアイディア<p> <!-- <sect1>Redirecting output of the make or patch commands <p> --> <sect1>make あるいは patch コマンドの出力をリダイレクトする<p> <!-- If you would like logs of what those `<tt>make</tt>' or `<tt>patch</tt>' commands did, you can redirect output to a file. First, find out what shell you're running: `<tt>grep root /etc/passwd</tt>' and look for something like `<tt>/bin/csh</tt>'. --> `<tt>make</tt>' や `<tt>patch</tt>' コマンドの出力結果のログが欲しけれ ば,出力をファイルへリダイレクトすることができます.まず,自分が使って いるシェルの種類を確認します.`<tt>grep root /etc/passwd</tt>' を実行 し,`<tt>/bin/csh</tt>' のような記述を探します. <p> <!-- If you use sh or bash, --> sh や bash を使用しているなら, <verb> (command) 2>&1 | tee (output file) </verb> <!-- will place a copy of <tt>(command)</tt>'s output in the file `<tt>(output file)</tt>'. --> により <tt>(command)</tt> の出力が <tt>(output file)</tt> へコピーされます. <p> <!-- For csh or tcsh, use --> csh や tcsh の場合は <verb> (command) |& tee (output file) </verb> となります. <p> <!-- For rc (Note: you probably do not use rc) it's --> rc(恐らく使ってないでしょうけど)の場合は <verb> (command) >[2=1] | tee (output file) </verb> です. <p> <!-- <sect1>Conditional kernel install <p> --> <sect1>暫定的なカーネルのインストール<p> <!-- Other than using floppy disks, there are several methods of testing out a new kernel without touching the old one. Unlike many other Unix flavors, LILO has the ability to boot a kernel from anywhere on the disk (if you have a large (500 MB or above) disk, please read over the LILO documentation on how this may cause problems). So, if you add something similar to --> フロッピーディスクを使う以外にも,古いカーネルを変更することなく新しい カーネルをテストするための方法がいくつかあります.他の多くの UNIX 系の システムとは異なり,LILOはディスクのどこからでもカーネルをブートするこ とができます(もし(500 MB 以上の)大きなハードディスクを持っている場合は, これによりどのような障害が出るか,LILOの解説書を読んでください).そう するには,以下のような記述をLILOの設定ファイルの最後に追加します. <verb> image = /usr/src/linux/arch/i386/boot/bzImage label = new_kernel </verb> <!-- to the end of your LILO configuration file, you can choose to run a newly compiled kernel without touching your old <tt>/vmlinuz</tt> (after running <tt>lilo</tt>, of course). The easiest way to tell LILO to boot a new kernel is to press the shift key at bootup time (when it says <tt>LILO</tt> on the screen, and nothing else), which gives you a prompt. At this point, you can enter `<tt>new_kernel</tt>' to boot the new kernel. --> これにより,古い <tt>/vmlinuz</tt> に触れることなく,新たにコンパイル したカーネルを選んで起動できるようになります(もちろん <tt>lilo</tt> の 実行後です).LILO に新しいカーネルのブートを指示するためのもっとも楽な 方法は,ブート時(<tt>LILO</tt> とだけ画面に表示され,ほかには何も表示 されていないときです)にシフトキーを押すことで,プロンプトが表示されます. ここで,`<tt>new_kernel</tt>' と入力することで新しいカーネルをブートで きます. <p> <!-- If you wish to keep several different kernel source trees on your system at the same time (this can take up a <it>lot</it> of disk space; be careful), the most common way is to name them <tt>/usr/src/linux-x.y.z</tt>, where <tt>x.y.z</tt> is the kernel version. You can then ``select'' a source tree with a symbolic link; for example, `<tt>ln -sf linux-1.2.2 /usr/src/linux</tt>' would make the 1.2.2 tree current. Before creating a symbolic link like this, make certain that the last argument to <tt>ln</tt> is not a real directory (old symbolic links are fine); the result will not be what you expect. --> 同時にいくつも異なるカーネルソースツリーをシステム上に持ちたい場合には (<it>多量の</it>ディスクスペースを必要としますので注意してください), 各ツリーに <tt>/usr/src/linux-x.y.z</tt> と名前をつけるのが一般的な方 法でしょう.ここで <tt>x.y.z</tt> はカーネルのバージョンです.シンボリッ クリンクを使用してソースツリーを選択することができます;例えば `<tt>ln -sf linux-1.2.2 /usr/src/linux</tt>' とすることで 1.2.2 のツリー が選択できます.このようにシンボリックリンクを作成する前に, <tt>ln</tt> の最後の引数が実在するディレクトリでないこと(すでに存在す るシンボリックファイルなら構いません)を確認してください;さもないと期 待通りの結果が得られません. <p> <!-- <sect1>Kernel updates <p> --> <sect1>カーネルのアップデート<p> <!-- Russell Nelson (<tt>nelson@crynwr.com</tt>) summarizes the changes in new kernel releases. These are short, and you might like to look at them before an upgrade. They are available with anonymous ftp from <tt>ftp.emlist.com</tt> in <tt>pub/kchanges</tt> or through the URL --> Russell Nelson さん(<tt>nelson@crynwr.com</tt>)は新しいカーネルリリー スの際に変更点のまとめを出しています.まとめは短いので,アップグレード の前に一読しておくとよいでしょう.<tt>ftp.emlist.com</tt> の <tt>pub/kchanges</tt> からの匿名 ftp あるいは以下の URL から入手できま す. <verb> http://www.crynwr.com/kchanges </verb> <p> <!-- <sect>Other relevant HOWTOs that might be useful<p> --> <sect>他の有用な関連する HOWTO<p> <itemize> <!-- <item> Sound-HOWTO: sound cards and utilities --> <item> Sound-HOWTO: サウンドカードとユーティリティ <!-- <item> SCSI-HOWTO: all about SCSI controllers and devices --> <item> SCSI-HOWTO: SCSI コントローラとデバイスに関連するすべて <!-- <item> NET-2-HOWTO: networking --> <item> NET-2-HOWTO: ネットワーク <!-- <item> PPP-HOWTO: PPP networking in particular --> <item> PPP-HOWTO: ネットワークのうち特に PPP について <!-- <item> PCMCIA-HOWTO: about the drivers for your notebook --> <item> PCMCIA-HOWTO: ノートマシン用のドライバについて <!-- <item> ELF-HOWTO: ELF: what it is, converting.. --> <item> ELF-HOWTO: ELF とはなにか,ELF への移行について <!-- <item> Hardware-HOWTO: overview of supported hardware --> <item> Hardware-HOWTO: サポートされているハードウェアの概況 <!-- <item> Module mini-HOWTO: more on kernel modules --> <item> Module mini-HOWTO: カーネルモジュールについて <!-- <item> Kerneld mini-HOWTO: about kerneld --> <item> Kerneld mini-HOWTO: kerneld について <!-- <item> BogoMips mini-HOWTO: in case you were wondering --> BogoMips mini-HOWTO: BogoMips が何か分からなければ </itemize> <!-- <sect>Misc<p> --> <sect>その他もろもろ<p> <!-- <sect1>Author <p> --> <sect1>著者<p> <!-- The author and maintainer of the Linux Kernel-HOWTO is Brian Ward (<tt>bri@cs.uchicago.edu</tt>). Please send me any comments, additions, corrections (Corrections are, in particular, the most important to me.). --> Linux Kernel-HOWTO の制作/管理は Brian Ward(<tt>bri@cs.uchicago.edu</tt>) が行なっています.コメント,追加,訂正(特に訂正していただけると大変あ りがたいです)を私にぜひ送ってください.[日本語版に関することは JF プロジェクト(<tt>JF@linux.or.jp</tt>)へお願いします] <p> <!-- You can take a look at my `home page' at one of these URLs: --> 私のホームページは以下の URL のいずれかで見ることができます. <verb> http://www.math.psu.edu/bri/ http://blah.math.tu-graz.ac.at/~bri/ </verb> <p> <!-- Even though I try to be attentive as possible with mail, please remember that I get a <it>lot</it> of it every day, so it may take a little time to get back to you. Especially when emailing me with a question, please try extra hard to be clear and detailed in your message. If you're writing about non-working hardware (or something like that), I need to know what your hardware configureation is. If you report an error, don't just say ``I tried this but it gave an error;'' I need to know what the error was. I would also like to know what versions of the kernel, gcc, and libc you're using. If you just tell me you're using this-or-that distribution, it won't tell me much at all. I don't care if you ask simple questions; remember, if you don't ask, you may never get an answer! I'd like to thank everyone who has given me feedback. --> できるだけメールの返事は出すようにしています,私は毎日 <it>たくさん</it>のメールを受け取るので,返事が届くのにしばらく時間が かかるかもしれません.特に私に質問のメールを出す場合には,できるだけわ かりやすく,詳細に書くよう努力してください.動作しないハードウェアにつ いての質問(あるいはそれに類するもの)の場合,あなたのハードウェアの構成 を知ることが必要です.エラーの報告なら,「やってみたけど,エラーが出ま した」だけでは困ります.どんなエラーだったのかを知る必要があるのです. お使いのカーネル,gcc, libc のバージョンもお知らせください.どんなディ ストリビューションを使っているかだけではあまり意味がありません. 質問はどんなに簡単なものでも構いません.質問しないかぎり答えは得られな いということを忘れないように!私にフィードバックしてくださった方々に感 謝します. <p> <!-- If your question does not relate to the kernel, or is in some language that I don't understand, I may not answer. --> <p> カーネルに関係ない質問や,私の知らない国の言葉で書かれたメールにはお返 事できません. <!-- If you mailed me and did not get an answer within a resonable amount of time (three weeks or more), then chances are that I accidentally deleted your message or something (sorry). Please try again. --> もし,メールを私に出したけれど,妥協できる時間内(まあ 3 週間くらいでしょ うか)に返事が来ない場合は,たぶんあなたのメールを何かの拍子に消してし まったのかもしれません(ごめんなさい).もう一度出してみてください. <p> <!-- I get a lot of mail about thing which are actually hardware problems or issues. That's OK, but please try to keep in mind that I'm not familiar with all of the hardware in the world. I use AMD processors, Adaptec and Sybios SCSI controllers, and IBM SCSI disks. --> 実際にはハードウェアの問題に関するメールもたくさん受け取ります.それも構い ません.でも,私は全世界に存在するすべてのハードウェアについて精通して いるわけではないことは心に留めておいてください; わたしが使っているのは AMD の CPU, Adapitec と Sybios の SCSI コントローラ,IBM の SCSI ディ スクです. <p> <!-- Version -0.1 was written on October 3, 1994. This document is available in SGML, PostScript, TeX, roff, and plain-text formats. --> バージョン -0.1は 1994 年 10 月 3 日に作成されました;この文書には SGML, PostScript, TeX, roff, プレーンテキスト形式のものがあります. <p> <!-- <sect1>To do<p> --> <sect1>今後の方針<p> <!-- The ``Tips and tricks'' section is a little small. I hope to expand on it with suggestions from others.<p> So is ``Additional packages.''<p> More debugging/crash recovery info needed.<p> --> 「ちょっとしたアイディア」の章はまだ少ないです.他の人の提案を入れて拡 充するつもりです.<p> 「追加パッケージ」も同じです.<p> デバッグやクラッシュからの修復に関するもっと詳しい情報が必要です.<p> <!-- <sect1>Contributions <p> --> <sect1>貢献者<p> <!-- A small part of Linus' README (kernel hacking options) is inclusive. (Thanks, Linus!) --> Linus さんの README の一部を引用(カーネルハッキングオプション).(Linus さん,ありがとう!) <p> <!-- <tt>uc@brian.lunetix.de</tt> (Ulrich Callmeier): patch -s and xargs.<p> --> <tt>uc@brian.lunetix.de</tt> (Ulrich Callmeier さん): patch -s と xargs<p> <!-- <tt>quinlan@yggdrasil.com</tt> (Daniel Quinlan): corrections and additions in many sections.<p> --> <tt>quinlan@yggdrasil.com</tt> (Daniel Quinlan さん): 多くのセクションの訂正および追加<p> <!-- <tt>nat@nat@nataa.fr.eu.org</tt> (Nat Makarevitch): mrproper, tar -p, many other things<p> --> <tt>nat@nataa.frmug.fr.net</tt> (Nat Makarevitch さん): mrproper, tar -p<p> <!-- <tt>boldt@math.ucsb.edu</tt> (Axel Boldt): collected descriptions of kernel configuration options on the net; then provided me with the list<p> --> <tt>boldt@math.ucsb.edu</tt> (Axel Boldt さん): ネット上でカーネル設定 オプションに関する説明を集め,リストを提供してくださいました<p> <!-- <tt>lembark@wrkhors.psyber.com</tt> (Steve Lembark): multiple boot suggestion<p> --> <tt>lembark@wrkhors.psyber.com</tt> (Steve Lembark さん): 複数カーネル のブートに関する提案<p> <!-- <tt>kbriggs@earwax.pd.uwa.edu.au</tt> (Keith Briggs): some corrections and suggestions<p> --> <tt>kbriggs@earwax.pd.uwa.edu.au</tt> (Keith Briggs さん): いくつかの訂正と提案<p> <!-- <tt>rmcguire@freenet.columbus.oh.us</tt> (Ryan McGuire): makeables additions<p> --> <tt>rmcguire@freenet.columbus.oh.us</tt> (Ryan McGuire さん): make 可能なものの 追加<p> <!-- <tt>dumas@excalibur.ibp.fr</tt> (Eric Dumas): French translation<p> --> <tt>dumas@excalibur.ibp.fr</tt> (Eric Dumas さん): フランス語訳<p> <!-- <tt>simazaki@ab11.yamanashi.ac.jp</tt> (Yasutada Shimazaki): Japanese translation<p> --> <tt>yamatori@ab11.yamanashi.ac.jp</tt> (嶋崎保任さん): 日本語訳<p> <!-- <tt>jjamor@lml.ls.fi.upm.es</tt> (Juan Jose Amor Iglesias): Spanish translation<p> --> <tt>jjamor@lml.ls.fi.upm.es</tt> (Juan Jose Amor Iglesias さん): スペイン語訳<p> <!-- <tt>mva@sbbs.se</tt> (Martin Wahlen): Swedish translation<p> --> <tt>mva@sbbs.se</tt> (Martin Wahlen さん): スウェーデン語訳<p> <!-- <tt>jzp1218@stud.u-szeged.hu</tt> (Zoltan Vamosi): Hungarian translation<p> --> <tt>jzp1218@stud.u-szeged.hu</tt> (Zoltan Vamosi さん): ハンガリー語訳<p> <!-- <tt>bart@mat.uni.torun.pl</tt> (Bartosz Maruszewski): Polish translation<p> --> <tt>bart@mat.uni.torun.pl</tt> (Bartosz Maruszewski さん): ポーランド語訳<p> <!-- <tt>donahue@tiber.nist.gov</tt> (Michael J Donahue): typos, winner of the ``sliced bread competition''<p> --> <tt>donahue@tiber.nist.gov</tt> (Michael J Donahue さん): ミスタイプの訂正, ``sliced bread competition''の覇者[薄切りパンの覇者? 意味がわかりません]<p> <!-- <tt>rms@gnu.ai.mit.edu</tt> (Richard Stallman): ``free'' documentation concept/distribution notice<p> --> <tt>rms@gnu.ai.mit.edu</tt> (Richard Stallman さん): 「フリー」な文書のコンセプト/配布条件<p> <!-- <tt>dak@Pool.Informatik.RWTH-Aachen.DE</tt> (David Kastrup): NFS thing<p> --> <tt>dak@Pool.Informatik.RWTH-Aachen.DE</tt> (David Kastrup さん): NFS に関する事柄<p> <!-- <tt>esr@snark.thyrsus.com</tt> (Eric Raymond): various tidbits<p> --> <tt>esr@snark.thyrsus.com</tt> (Eric Raymond さん): 色々な豆知識<p> <!-- The people who have sent me mail with questions and problems have also been quite helpful. --> 疑問点や問題点に関して私にメールを送ってくださった方々も大変助けになり ました. <p> <!-- <sect1>Copyright notice, License, and all that stuff<p> --> <sect1>著作権表示,使用許諾,およびその他の事柄<p> Copyright © Brian Ward, 1994-1999.<p> 著作権表示およびこの許諾表示を添付するかぎりこのマニュアルを自由に配布して かまいません.<p> この文書と同一の許諾条件に基づいて配布するなら,この条件を添付してこのマニ ュアルを変更したものを配布してかまいません.翻訳もこの「変更したもの」の範 疇に入ります. <p> 保証: なし<p> 推奨:商業的な再配布はどんどんやってください;その際,配布者は再配布す る前に著者に連絡することを強く希望します.これは配布される文書を常に最 新版にしておきたいがためです(作成してたものを一部お送りいただければ幸 いです).翻訳者も事前に著者に連絡することを勧めます.印刷されたものの 方が読みやすいでしょう.リサイクルをしてくださいね.<p> [この章に関してのみ原文を添付します]<p> Copyright © Brian Ward, 1994-1999.<p> Permission is granted to make and distribute copies of this manual provided the copyright notice and this permission notice are preserved on all copies.<p> Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the derived work is distributed under the terms of a permission notice identical to this one. Translations fall under the catagory of ``modified versions.'' <p> Warranty: None.<p> Recommendations: Commercial redistribution is allowed and encouraged; however, it is strongly recommended that the redistributor contact the author before the redistribution, in the interest of keeping things up-to-date (you could send me a copy of the thing you're making while you're at it). Translators are also advised to contact the author before translating. The printed version looks nicer. Recycle.<p> <sect1>日本語訳について<p> 日本語訳は嶋崎@梨大(<tt>yamatori@ab11.yamanashi.ac.jp</tt>)と Linux Japanese FAQ Project が行いました. 翻訳に関するご意見は JF プロジェクト <JF@linux.or.jp> 宛に連絡してください. 改訂履歴を以下に示します. <descrip> <tag>v0.75, 16 August 1996</tag> 翻訳: 嶋崎@梨大 (<htmlurl url="mailto:yamatori@ab11.yamanashi.ac.jp" name="yamatori@ab11.yamanashi.ac.jp">) <tag>v1.0, 13 July 1999</tag> 更新: 藤原 輝嘉 (<htmlurl url="mailto:fujiwara@linux.or.jp" name="fujiwara@linux.or.jp">) </descrip> </article>