NFS-Root-Client Mini-Howto <author>Ofer Maor, <tt/oferm@hcs.co.il/ <date>V4.1, 02 February 1999 <trans>早川 仁, <tt/cz8cb01@linux.or.jp/ <tdate>V4.1j, 1999年10月 3日 <abstract> <!-- The purpose of this Mini-Howto is to explain how to create client root directories on a server that is using NFS Root mounted clients. You can find the latest version of this Howto (HTML or Text) at URL: <url url="http://www.hcs.co.il/oferm/NFS-Root-Client/"> --> この Mini-Howto では、クライアントのルートディレクトリを NFS サーバー上で作成して、Root をマウントする方法について説明しています。 この howto(HTML もしくは Text版)の最新版は、<url url="http://www.hcs.co.il/oferm/NFS-Root-Client/"> から入手できます。 </abstract> <!-- 読みづらいんで、あまりに大きいパラグラフは私の独断と偏見により、分割しています :-) --> <toc> <sect>Copyright <p> (訳注:読者の利便を考え日本語訳をしますが、原文の Copyright が優先します) (c) 1996 Ofer Maor (oferm@hcs.co.il) <p> Unless otherwise stated, Linux HOWTO documents are copyrighted by their respective authors. Linux HOWTO documents may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies. Commercial redistribution is allowed and encouraged; however, the author would like to be notified of any such distributions. <p> 特に断らない限り、Linux HOWTO ドキュメントはそれぞれの著者の著作物です。Linux HOWTO ドキュメントは、全てのコピーにおいて copyright が保持されている限り、どのような物理的あるいは電子的なメディアによっても、全部あるいはその一部を複製し、配布することができます。商用の再配布についても許可や奨励をされていますが、そのようないかなる配布に関しても、著者は通知されることを望んでいます。 <p> All translations, derivative works, or aggregate works incorporating any Linux HOWTO documents must be covered under this copyright notice. That is, you may not produce a derivative work from a HOWTO and impose additional restrictions on its distribution. Exceptions to these rules may be granted under certain conditions; please contact the Linux HOWTO coordinator at the address given below. <p> 全ての翻訳、派生的な著作物、あるいはいずれかの Linux HOWTO 文書の内容を取り入れて集合的な著作物はこの copyright の下で保護される必要があります。つまり、いずれかの HOWTO をもとにした著作物を作ってもその配布に制限を追加してはいけません。ある条件の下では、これらの規則に対する例外が認められる場合があります。下記のアドレスの Linux HOWTO のコーディネーターに連絡を取ってください。 <p> In short, we wish to promote dissemination of this information through as many channels as possible. However, we do wish to retain copyright on the HOWTO documents, and would like to be notified of any plans to redistribute the HOWTOs. <p> 要するに、私たちは可能な限り多くの経路を通じてこの情報の普及を促進することを望んでいます。しかし、私たちは HOWTO の文書の著作権を保持することも強く望んでいますし、 またそれら HOWTO の文書を再配布するどんな計画も私たちに知らせていただければ幸甚に思います。 <p> If you have questions, please contact Ofer Maor (<url url="mailto:oferm@hcs.co.il">), the author of this mini-HOWTO, or Greg Hankins, the Linux HOWTO coordinator, at <url url="mailto:gregh@sunsite.unc.edu"> via email, or at +1 404 853 9989. <p> もしご質問があれば e-mail で、この mini-HOWTO の著者である Ofer Maor (<url url="mailto:oferm@hcs.co.il">)、あるいは Linux HOWTO のコーディネーターの Greg Hankins <url url="mailto:gregh@sunsite.unc.edu"> までどうぞ。 <p> If you have anything to add to this Mini-Howto, Please mail the author (Ofer Maor, <url url="mailto:oferm@hcs.co.il">), with the information. Any new relevant information would be appreciated. <p> この Mini-Howto に追加したいことがあれば、著者(Ofer Maor, <url url="mailto:oferm@hcs.co.il">)までメールしてください。どのような関連情報であっても感謝します。 <sect1> <!-- Thanks --> 謝辞 <p> <!-- I would like to express my thanks to the author of the NFS-Root Howto, Andreas Kostyrca (<url url="mailto:andreas@medman.ag.or.at">). His Mini-Howto helped me with the first steps in creating a NFS Root Mounted client. My Mini-Howto does not, in any way, try to replace his work, but to enhance it using my experiences in this process. --> NFS-Root Howto の著者である Andreas Kostyrca (<url url="mailto:andreas@medman.ag.or.at">) に感謝します。彼の Mini-Howto は NFS Root マウントのクライアントの作成のための第一歩として役に立ちました。私の Mini-Howto は彼の作業を無駄にしようとするものではなく、よりよいものにするために私の経験を生かそうとするものです。 <p> <!-- I would also like to thank Mark Kushinsky (<url url="mailto:mark026@ibm.net">) for polishing the english and spelling of this Howto, thus making it much more readable. --> また Mark Kushinsky (<url url="mailto:mark026@ibm.net">) には私の英語と、この Howto のスペルを洗練して、より読みやすくしてくれた事に感謝します。 <sect> <!-- Preface --> 序文 <p> <!-- This Mini-Howto was written in order to help people who want to use NFS Root mounting to create their client's directories. Please note that there are many ways to accomplish this, depending on your needs and intent. If the clients are individual, and each client has its own users and administrator, it will be necessary to make significant parts of the client dirs not shared with other clients. On the other hand if the client is intended for multiple users, and are all administrated by the same person (for instance, a computer class), make as many files as possible shareable in order to make administration more manageable. This Howto will focus on the second issue. --> この Mini-Howto はクライアントのディレクトリを作成するために NFS Root マウントをしたい方を手助けするために書かれました。あなたのニーズ、あるいは意図により実現するための方法はたくさんあるということを忘れないでください。 もしもクライアントマシンが複数あり、個々のクライアントにそれぞれユーザーと管理者がいる場合に必要なことは、クライアント毎のディレクトリを作成して他のクライアントと共有しないことであり、これは非常に重要です。 逆にクライアントが複数のユーザー用で、管理者業務を同じ人間が行う場合(たとえばコンピューター教室など)、できるだけ多くのファイルを共通にして管理しやすくすることが必要となるでしょう。この Howto では後者の、ファイルを共通して使用する方法について述べていきます。 <sect1> <!-- General Overview --> 概略<label id="2.1"> <p> <!-- When building a client's root directory, and trying to limit ourselves to the minimum client size, we mainly focus on which files can we share, or mount from the server. In this Howto I will recommend the configuration of a client based on my experience. But before we begin please note: --> クライアントのルートディレクトリを作成する場合にクライアントのサイズを小さくするために、どのファイルを共有できるか、またはサーバーからマウントすることができるかということについて、主に焦点を当てます。またこの Howto では私の経験から得たクライアントの設定をお勧めしていきます。 <p> <itemize> <!-- <item>This Mini-Howto does not explain how to do the actual NFS Root mounting. Reffer to the NFS-Root Mini-Howto if you need more information about that issue. --> <item>この Mini-Howto では NFS ルートマウントを行う方法そのものについては説明しません。必要な場合は NFS-Root Mini-Howto を参照してください。(訳注: 翻訳版は JF プロジェクトの Web サイト <url url="http://jf.linux.or.jp"> にあります) <!-- <item>I based most of my client's configuration on mounts and symbolic links. A lot of those symbolic links can be replaced by hardlinks. One should choose according to his personal preference. Putting a hardlink over a mount and a symbolic link has its advantages, but might cause confusion. A file will not be erased until all its hardlinks are removed. Thus, In order to prevent a case in which you upgrade a certain file, and the hardlinks still refer to the older version, you will have to be very careful and keep track of every link you put. --> <item>私のクライアントの大部分の設定はマウントとシンボリックリンクをベースにしています。シンボリックリンクの多くはハードリンクと置き換えることができます。個人の好みにより、好きな方を選べばよいでしょう。マウントしたディレクトリでハードリンクを使う場合とシンボリックリンクを使う場合にはそれぞれの利点がありますが、混乱するかもしれませんね。ハードリンクは全てのリンクが消されるまでリンク元のファイルは削除されません。つまりあるファイルを置き換えたりする場合でも、ハードリンクは依然として以前のファイルを指していますから、作成したリンクを見失わないよう特に気を付ける必要があるでしょう。 <!-- <item>While mounting the information from the server, two concepts can be used. The first (most common) concept, is to mount the whole server root directory under a local directory, and then just change the path or link the relevant directories there. I personally dislike mounting root partitions of a server on clients. Thus, this Howto suggests a way to mount the relevant directories of the server to the relevant places on the system. --> <item>ディレクトリなどをサーバーからマウントする場合に二つの方法があります。一つ目の(非常に一般的な)方法はサーバーのルートディレクトリ全体をローカルのディレクトリにマウントして、単にパスを変更したり、そこに関連するディレクトリをリンクすることです。個人的にはサーバーのルートパーティションをクライアントすることは嫌いなので、この Howto ではサーバーの関連ディレクトリをシステムの適切な場所にマウントする事をお勧めします。 <!-- <item>This Howto is based on my experience building client directories on a Slackware 3.1 based distribution. Things may be different (especially on the rc.* files), for other users, however the concepts should still remain the same. --> <item>この Howto は私が Slackware 3.1 ベースのディストリビューション上でクライアントのディレクトリを構築した経験を元にしています。他のディストリビューションでは(特に rc.* ファイルが)違うところがあるかも知れませんが、基本的な概念は同じです。 </itemize> <sect> <!-- Creating the client's root directory --> クライアントのルートディレクトリの作成 <sect1> <!-- Creating the directory tree --> ディレクトリツリーの作成 <p> <!-- First of all, you need to create the directory structure itself. I created all the clients under /clients/hostname and I will use it for my examples listed below. This, however, can be changed to anything else. The first stage, then, is to create the relevant directories in the root directory. You should create the following directories: --> はじめにディレクトリ構造自体を作成する必要があります。私は全てのクライアントを /clients/ホスト名 の下に作成しました。下記ではこれを例として使用しますが、他の場所にすることももちろん可能です。まずルートディレクトリに、次のような関連するディレクトリを作成します。(訳注:各クライアントで共通するファイル/ディレクトリは、/clients の下に置きます。例えば /clients/etc には全クライアントで共通の、etc 配下のファイルを格納します) <verb> bin, dev, etc, home, lib, mnt, proc, sbin, server, tmp, usr, var </verb> <!-- and any other directories you might want to have on your system. --> それ以外に必要だと思うディレクトリを作成します。 <!-- The local, proc, and dev directories will be used separately on each machine while the rest of the directories will be either party or completely shared with the rest of the clients. --> local, proc, dev ディレクトリは各マシン上で別々に使われますが、その他のディレクトリは部分的に、あるいは完全に他のクライアントと共有されます。 <sect1> <!-- Creating the minimal file system needed for boot --> ブートに必要な最小限のファイルシステムを作成 <sect2> <!-- Creating the dev dir. --> dev ディレクトリの作成 <p> <!-- Although the dev dir can be shared, it is better to create a separate one for each client. You can create your client's dev directory with the appropriate MAKEDEV scripts, however in most cases it is simpler just to copy it from the server: --> dev ディレクトリを共有することは可能ですが、クライアント毎に別々にしておいた方がよいでしょう。クライアントの dev ディレクトリは適切な MAKEDEV スクリプトで作成することができますが、多くの場合は単にサーバーからコピーするだけです。 <!-- <verb> cp -a /dev /clients/hostname </verb> --> <verb> cp -a /dev /clients/ホスト名 </verb> <!-- You should keep in mind that /dev/mouse, /dev/cdrom and /dev/modem are symbolic links to actually devices, and therefore you should be sure that they are linked correctly to fit the client's hardware. --> /dev/mouse, /dev/cdrom, /dev/modem は実際のデバイスへのシンボリックリンクだということを覚えておいた方が良いでしょう。ですからクライアントのハードウェアにあったデバイスに正しくリンクされていることを確認すべきです。 <sect2> <!-- Copying the necessary binaries. --> 必要なバイナリーファイルをコピー <p> <!-- Although we mount everything from the server, there is a minimum that we need to copy to each client. First of all, we need "init", our system will not be able to run anything before init'ing (as the author found out in the hard way ;-). So first, you should copy /sbin/init to your client's sbin dir and then so that rc.S will run, you should copy /bin/sh to the client's bin directory. Also, in order to mount everything you need to copy /sbin/mount to the client's sbin directory. This is the minimum, assuming the first line in your rc.S is mount -av. However, I recommend copying a few more files: update, ls, rm, cp and umount, so that you will have the basic tools in case the client has problems mounting. If you choose to leave your swap on line before mount, you should also copy the swapon binary. --> すべてをサーバーからマウントするわけですが、各クライアントに最小限コピーしなければならない物があります。かならず必要なものは "init" です。init の実行をせずに他のプロセスを実行することはできません(著者はこの事実に気が付くのに苦労しました ;-)。ですからはじめに、/sbin/init をクライアントの sbin ディレクトリにコピーし、rc.S を走らせられるようにします。 (訳注:rc.S は slackware や Plamo Linux の場合です。Redhat 系の dist では init は /etc/inittab に記述されているように、/etc/rc.d/rc.sysinit を実行します) また、/bin/sh をクライアントの bin ディレクトリにコピーしたほうがよいでしょう。次にマウントを実行できるようにするために、/sbin/mount をクライアントの sbin ディレクトリにコピーします。これが rc.S に書かれている mount -av を実行するために必要な最小限のものですが、もう少しファイルをコピーしておいた方が良いでしょう。update, ls, rm, cp, umount があればマウントの際に問題が発生した場合、基本的な作業が行えるでしょう。マウントの前に swap を有効にするのであれば、swapon ファイルも必要になります。 <!-- Since most of these binaries are by default dynamically linked, you will also need to copy a fair part of /lib: --> 上記のバイナリーファイルの多くはデフォルトでダイナミックリンクされていますから、/lib のいくつかのファイルをコピーする必要があるでしょう。 <!-- <verb> cp -a /lib/ld* /lib/libc.* /lib/libcursses.* /client/hostname/lib </verb> --> <verb> cp -a /lib/ld* /lib/libc.* /lib/libcursses.* /client/ホスト名/lib </verb> <!-- Hardlinking the binaries themselves, instead of copying them, should be considered. Please read my comments on this in part 2.1 of this Howto. --> バイナリーファイルをコピーする代わりにハードリンクすることは考慮に値します。この Howto の <ref id="2.1" name="概略"> にある私の意見を参照してください。 <!-- Please notice, all of the information above assumes that the kernel has been given the network parameters while booting up. If you plan to use rarp or bootp, you will probably need the relevant binaries for these as well. --> 上記の全ての記述は、起動時にカーネルに対してネットワークパラメータが渡されていると仮定していることに注意してください。rarp や bootp を使おうとしているのであれば、関連するバイナリーファイルがおそらく同じように必要になるでしょう。 <!-- Generally, you will need the minimum of files that will enable you to configure the network and run rc.S up to the point where it mounts the rest of the file system. Make sure you looked into your /etc/init and rc.S files, making sure there are no "surprises" in any of them, which will require other files to be accessed, before the first mount will take place. If you do, however, find such files, you can either copy them as well, or remove the relevant parts from your init and your rc.S files. --> 普通はネットワークを設定し、rc.S を実行して残りのファイルシステムをマウントするための最小限のファイルが必要になります。/etc/inittab や rc.S ファイルを調べてみて、マウント作業が始まる前にその他にファイルが必要となるような "予想もしていない"ことが起きないように確認しておいてください。もしも他に必要なファイルを見つけた場合、同じようにコピーをしておくか、もしくは inittab や rc.S からそのファイルに関連する箇所を削りましょう。 <!-- /etc/init ってのは、/etc/inittab の間違いでしょう。--> <sect2> <!-- The var directory --> var ディレクトリ <p> <!-- The var directory, in most cases, should be separate for each client. However, a lot of the data can be shared. Create under the server directory a directory called var. We will mount the server's var directory there. To create the local var directory, simply type: --> 多くの場合 var ディレクトリは各クライアント毎に用意したほうがよいですが、ディレクトリ中の多くのファイルは共有することができます。サーバーのディレクトリに、var というディレクトリを作成してください。サーバー自身の var ディレクトリをそこにマウントします。var ディレクトリを作るには次のように入力するだけです。 <!-- <verb> cp -a /var /clients/hostname/ </verb> --> <verb> cp -a /var /clients/ホスト名/ </verb> <!-- Now, you have a choice as to what you want to separate, and what you want to share. Any directory/file that you want to share, simply remove it from the client's var dir, and symlink it to the /server/var/ directory. However please note that you should either symlink it to /server/var or to ../server/var but NOT to /clients/hostname/server/var as this will not work when the root changes. --> さて。別々に用意するか、共有するかのどちらにしたいでしょうか。ディレクトリ/ファイルを共有したいのであれば、単にクライアントの var ディレクトリから取り除いて /server/var/ ディレクトリへのシンボリックリンクを作成するだけですが、注意してほしいのは作成するシンボリックリンクは /server/var か ../server/var であって /clients/ホスト名/server/var ではありません。これは root が変更されたときに動作しなくなります。 <!-- Generally, I would recommend separating /var/run, /var/lock, /var/spool, and /var/log. --> 私は /var/run, /var/lock, /var/spool, /var/log はクライアント毎に別々にすることをお勧めします。 <sect2> <!-- The rest of the directories --> 残りのディレクトリ <p> <itemize> <!-- <item>etc is explained thoroughly in the next section. <item>mnt and proc are for local purposes. <item>usr and home are merely mount points. <item>tmp is up to you. You can create a different tmp directory for each client, or create some /clients/tmp directories, and mount it for each client under /tmp. I would recommend that you provide each client with a separate tmp directory. --> <item>etc は次のセクションで詳細に説明します。 <item>mnt と proc は local で使うための物です。(訳注:ですから中身は空で構いません) <item>usr と home は単なるマウントポイントです。 <item>tmp はあなた自身の用途によります。クライアント毎に tmp ディレクトリを作ることも、/clients/tmp ディレクトリを作って各クライアントの /tmp をそこにマウントすることもできます。私がお勧めするのはクライアント毎に tmp ディレクトリの用意をすることです。 </itemize> <sect1> <!-- Building the etc directory and configuring the clients --> etc ディレクトリの作成とクライアントの設定 <p> <!-- Please Note - this section refers to building the etc directory which is mostly shared among the clients. If your diskless clients have separate system administrators, it's best to set up for each client a separate etc directory. --> このセクションでは、各クライアントで多くを共有する etc ディレクトリの構築について述べています。作成するディスクレスクライアントそれぞれに管理者がいる場合は etc ディレクトリを共有せずに、クライアント毎に別々に用意した方が良いでしょう。 <sect2> <!-- Building a clients wide etc directory --> 各クライアントで共有する etc ディレクトリの作成 <p> <!-- Although we separate the etc directories of the clients, we still want to share a large portion of the files there. Generally, I think sharing the etc files with the server's /etc is a bad idea, and therefore I recommend creating a /clients/etc directory, which will hold the information needed for the clients. To start with, simply copy the contents of the server's etc to the /clients/etc directory. --> 各クライアント毎に etc ディレクトリを用意するわけですが、全てを別々に用意するのではなく各クライアントで共通する多くの部分は共有したい事でしょう。通常は etc ファイルとしてサーバーの /etc を共有することはよくないと思いますから、/clietns/etc ディレクトリを作成してクライアント間で共有できるファイルをそこに置いておくことをお勧めします。まず始めに、サーバーの /etc の中身を /clients/etc ディレクトリに単純にコピーします。 <!-- You should add to this directory all of the non-machine-specific configuration files, for instance motd, issue, etc. and not the client specific ones.(i.e. inittab or fstab) --> このディレクトリに、端末に依存しない設定ファイル(例えば motd, issue など)全てを格納します。クライアント環境に依存しないファイル(inittab や fstab)もです。 <p> <!-- The most important changes will be in your rc.d directory. First, you should change rc.inet1 to be suitable for your local setup. I pass all my network parameters to the kernel through the LILO/Loadlin, therefore I remove almost everything from rc.inet1 file. The only thing I leave there is the ifconfig and route of the localhost. If you use rarp or bootp, you will have to build it accordingly. --> 最重要の変更点は rc.d ディレクトリ内のファイルです。はじめに rc.inet1 をローカルの設定に応じて変更する必要があるでしょう。私はネットワークの設定全てを LILO/Loadlin を使用してカーネルに渡しますので、rc.inet1 の中はほとんど全て削除しました。削除していない項目は ifconfig と localhost の route 設定だけです。rarp や bootp を使う場合、同様にしかるべき設定をする必要があるでしょう。 <p> <!-- Secondly, you should edit your rc.S. First, remove all the parts that are responsible for the fsck check as fsck will occur when the server boots up. Then, you should find the line that mounts your fstab. This should look something like: --> 次に rc.S を編集する必要があります。サーバー起動時に行う fsck のチェックに関係する全ての部分を取り除き、次に fstab をマウントする行を探します。次のような行のはずです。 <verb> mount -avt nonfs </verb> <!-- The -t nonfs is there since normal clients first run rc.S and only later on use rc.inet1 to configure the Ethernet. As this will cause no NFS partitions to be mounted this line should be deleted. Therefore, change it to mount -av. If you need to run rarp/bootp to configure your network, do it in rc.S (or call the appropriate script from rc.S), before the mount, and make sure your physical bin and sbin directories have the necessary files available. --> -t nonfs により、(普通の)クライアントは始めに rc.S を実行し、その後に rc.inet1 で Ethernet の設定を行います。NFS パーティションをマウントするわけではないので、この行は消した方が良いでしょう。つまり mount -av にします。ネットワークの設定に rarp/bootp を走らせる必要があるときはマウントの前に rc.S を実行して(または rc.S から適切なスクリプトを呼び出して)、マウントされた後の bin と sbin ディレクトリに必要なファイルがあることを確認してください。 (訳注:mount -av のオプションの v は verbose(詳細表示)を行い、a は /etc/fstab に指定されているファイルシステムを (指定されたタイプで) すべてマウントします) <p> <!-- After the mount -av is performed, you will have a working file system. Build a general fstab, so that you can later copy it to each client. Your fstab should look something like this: --> mount -av が実行されると(訳注:fstab の全ファイルシステムをマウントするため)、ファイルシステムを使えるようになります。fstab を編集し、各クライアントへコピーする雛形を作成します。作成する fstab はこのようになるでしょう。 <verb> server:/clients/hostname / nfs default 1 1 server:/bin /bin nfs default 1 1 server:/usr /usr nfs default 1 1 server:/sbin /sbin nfs default 1 1 server:/home /home nfs default 1 1 server:/lib /lib nfs default 1 1 server:/clients/etc /server/etc nfs default 1 1 server:/clients/var /server/var nfs default 1 1 none /proc proc default 1 1 </verb> <!-- Please notice, that the keyword <it>deafult</it> might not work on all versions of mount. You might change it to <it>rw</it> or <it>ro</it> or remove all of the <it>default 1 1</it> part. --> <it>default</it> キーワードはすべての mount コマンドで動作しないかもしれないため、<it>default 1 1</it> の部分を全て取り除くか、または <it>rw</it> や <it>ro</it> に変更したほうが良いかもしれません。 <p> <!-- Also, make sure your server's /etc/exports looks like this: --> サーバーの /etc/exports がこのようになっているのを確認してください。 <verb> /clients/hostname hostname.domainname(rw,no_root_squash) /clients/etc hostname.domainname(ro,no_root_squash) /clients/var hostname.domainname(ro,no_root_squash) /usr hostname.domainname(ro,no_root_squash) /sbin hostname.domainname(ro,no_root_squash) /bin hostname.domainname(ro,no_root_squash) /lib hostname.domainname(ro,no_root_squash) /home hostname.domainname(rw,no_root_squash) </verb> <!-- Other than the first line, which should be separate for each host, the rest of the lines can be replaced with a hostmask to fit all your hosts (like pc*.domain - keep in mind though, that * will substitue only strings without a dot in them). I suggest that you make most of the directories read only, but this is up to you. The no_root_squash will make sure root users on the clients have actual root permissions on the nfsd as well. Check out man exports(5). If you want users to be able to run passwd from the clients also, make sure the /etc has rw and not ro permissions. However, this is not advisable. --> 各ホスト(クライアント)毎に別々に用意される1番目の行 /clients/hostname ディレクトリを除いて、残りの行は hostmask によって全てのホスト(pc*.domain のような形です。ただし注意して欲しいのは、* が表現するのは文字列だけで、. は含まれないということです)に合うように置き換えることができます。 <!-- (cz) ちょっと訳というか意味が不明。著者にメールかな? --> 私自身は出来るだけディレクトリを read only にするようにお勧めしますが、そうするかどうかはお任せします。no_root_squash は、root ユーザーが nfsd で動作しているクライアント上であっても root 権限を同じように持つことができることを指定します。man exports(5) も参照してください。ユーザーに passwd をクライアント上でも実行できるようにしたい場合、/etc が ro 権限ではなく rw であることを確認してください。rw 権限を与えることは賢明ではないでしょうが。 <p> <!-- Please note another thing concerning the rc.S file. In Slackware, by default, it creates a new /etc/issue and /etc/motd every time it runs. This function MUST be disabled if these files are mounted ro from the server, and I would recommend that they should be disabled in any case. --> 次に関係あるのは rc.S ファイルです。Slackware ではデフォルトで /etc/issue と /etc/motd を起動時に新しく作成します。これらのファイルがサーバーから ro 権限でマウントされる場合には、無効に<bf>しなければなりません</bf>。私が推奨するのは、どのような場合であっても無効にすることです。 <p> <!-- Lastly, if you want to have the same userbase on the server as on the clients, you should choose between 1), using NIS (Yellow Pages - check the yp-howto), and then each client will have a separate /etc/passwd and /etc/group as it receives it from the NIS server. 2) In most cases, a simple symbolic link will suffice. Therefore, you will need to either hardlink /clients/etc/passwd to /etc/passwd, or if you prefer a symlink, link /etc/passwd to /clients/etc/passwd (and not the other way around, since the clients do not mount the server's etc directory). Do the same for /etc/group. --> 最後に、サーバー上でもクライアント上と同じユーザー情報を使用したいのであれば、次の2つを使うとよいでしょう。 1) NIS (イエローページです。yp-howto を参照してください)を使用して、各クライアントで使用する /etc/passwd と /etc/group は NIS サーバーから取得します。2) 多くの場合、単なるシンボリックリンクで充分です。すなわち /clients/etc/passwd を /etc/passwd にハードリンクするか、(シンボリックリンクが好みなら)/etc/passwd を /clients/etc/passwd へリンクします(逆にしないでください。クライアントはサーバーの etc ディレクトリをマウントしませんから)。/etc/group も同様です。 <sect2> <!-- Creating a client's etc directory --> クライアント毎の etc ディレクトリの作成 <p> <!-- Generally, most of the files in the client's etc should be symlinked to the /server/etc directory. However, some files are different for each machine, and some just have to be there when the kernel loads. The minimum you need from the etc dir is as follows: --> 通常は、クライアントの etc のほとんどのファイルは /server/etc ディレクトリへのシンボリックリンクですが、クライアント毎に別々のファイルもあり、またカーネルが読み込まれる時に必要なファイルもあります。etc ディレクトリに必要な最小限のものは次のファイルです。 <verb> resolv.conf hosts inittab rc.d/rc.S fstab </verb> <!-- Since these 5 files can be identical on all clients, you can simply hardlink them or copy them again. However, with the rc.S and fstab file it is advised to keep a separate copy for each client. You will also need a separate etc/HOSTNAME for each client. I personally recommend having all of the rc.d files separate for each client, as configurationand hardware might vary from one to another. --> 上記5つのファイルは全てのクライアントで完全に同じファイルにすることができますので、単にハードリンクかコピーするだけです。ただし rc.S と fstab ファイルに関しては各クライアント毎に用意するほうがよいです。また各クライアント用に etc/ホスト名 も必要になるでしょう。ハードウェアの設定が違うかもしれないので、個人的には rc.d の全てのファイルをクライアント毎に用意することを勧めます。 <p> <!-- For each client, add to the fstab the proper swap line: --> 各クライアント用に、fstab に適切な swap 指定の行を追加します。 <verb> /dev/swap_partition swap swap default 1 1 </verb> <!-- The rest of the /etc files of the client, you can either hardlink to the /clients/etc/* files, or symlink them to the /server/etc (which is the mount point of /clients/etc/). --> 残りの、クライアントの /etc ファイルに関しては /clients/etc/* へハードリンクするか、/server/etc(/clietns/etc/ のマウントポイント)へシンボリックリンクすることができます。 <p> <!-- Make sure your machine can resolve properly, either through a named or through etc/hosts. It is not a bad idea to keep the server's IP in the etc/hosts, instead of counting on resolving. If you will count only on named resolving, a problem in the named will prevent your clients from booting up. --> 端末が named もしくは etc/hosts 経由により名前解決を正常にできることを確認してください。名前解決のためにサーバーの IP を etc/hosts に記述することは悪いアイデアではありません。named での解決のみをする場合 named で問題が発生すると、クライアントの起動をすることができませんから。 <sect1> <!-- Booting Up --> 起動 <p> <!-- Now, all you have to do is to boot up your machine, cross your fingers and hope everything works as it should :-). --> さあ、あと必要なことはマシンを起動することです。モニターの前で正座して正常に動作することを祈りましょう :-) <!-- cross one's fingers は英語圏の背景を訳注で説明するのが面倒なんで、 正座に変えてしまおう :-) --> <sect> <!-- Creating more clients --> クライアントの追加 <p> <!-- If you have followed my instructions so far this should be simple - cd to /clients/ and type: --> 今まで指示した方法に従っていれば簡単です。cd /clients/ して次のように入力するだけです。 <verb> cp -a hostname1 hostname2 </verb> <!-- and then make sure you check these points: --> 次の点について確認してください。 <p> <!-- rc.d/* files matches the hardware and wanted software configuration etc/HOSTNAME is correct, fstab's swap line is correct, the symbolic links of dev/mouse, dev/modem and dev/cdrom are right. --> rc.d/* ファイルがハードウェアにあった設定になっていること、etc/ホスト名 の必要なソフトの設定、fstab の swap 行が正しいこと、dev/mouse, dev/modem, dev/cdrom のシンボリックリンクが正常なこと。 <p> Good Luck.... <!-- さすがに Good Luck は訳さんぞ :-) --> </article>