Installing FreeBSD 8.x via serial console and PXE の訳(参考)

http://jdc.parodius.com/freebsd/pxeboot_serial_install_8.html

FreeBSD8.xにviaシリアルコンソールとPXE(ぴくせ?)インストール

セクション
1.必要条件

これらは、絶対に守ってください。
質問はできません。
もし、あなたが、それらのいくつかを持っていないならば
あなたは、ここにいないほうがいいでしょう。

  • MACアドレスのあるNICが乗っていること(DHCPコンフィグをするために必要)
  • DHCPサーバ
  • TFTPサーバ
  • NFSサーバ
  • FreeBSD8.0のインストールディスク(ISOかCDRか)
  • シリアルコンソールでインストールしたい場合9600bps以上出ることを確認してください。別のマシンに接続し、確認作業を行ってください。”cu -l ttyu0 -s”で115200を確認してください。
  • FreeBSDがのっているマシンにベースシステムをリビルドできる場所をよういしてください。それは、/usr/src ツリーがすべてあることを意味します。
  • FreeBSDをインストールするときは、再起動を行います。必ずとは、いいませんが、再起動をすべきです。リモートインストールを行い作業をしている場合、リモートで再起動を行えますが、物理的に不可能なときがあります。

この手順は、i386amd64両方に適用できます。amd64のためにパス名をける必要は、ありません。

共通設定と今回使うもの

設定 説明
192.168.1.88 The IP of the DHCP, TFTP, and NFS server.
192.168.1.100 The IP of the box which we're doing the PXE boot on/from.
nfsserver.home.lan FQDN of 192.168.1.88
newbox.home.lan FQDN of 192.168.1.100
/usr/local/freebsd8 Contains contents of the FreeBSD 8.x "disc1" CD; you will be modifying some files in this directory, so it cannot be a mounted CD (e.g. read-only).
boot0,boot1,boot2,loader All of these are the different stages of the FreeBSD bootstraps. All are used when physical media is used for installation (e.g. floppies, CDROM, hard disk, USB thumb drive, etc.), but aren't used when PXE booting. loader(8) is technically used, but it's actually called pxeboot(8). See below for details on that.
pxebootpxeldr his is the sole binary that gets fetched via TFTP after the Intel PXE boot ROM gets an IP via DHCP. The binary itself is actually a modified version of loader(8), and includes some extra features (which we'll use!).

ステップ1:DHCPコンフィグ

私は、iscサーバをよく知っていて、/ports/net/isc-dhcp3-serverを使っています。/usr/local/etc/dhcpd.confに設定データがあることが重要でしょう。

  host newbox.home.lan {
	  hardware ethernet 00:11:22:33:44:55;
	  fixed-address newbox.home.lan;
	  next-server 192.168.1.88;
	  filename "freebsd8/boot/pxeboot";
	  option root-path "/usr/local/freebsd8";
  }

Web上には、重要なオプションを説明してあるドキュメントが一つだけではないのです。
私は、それの目的について述べます。

next-server 192.168.1.88

もしNFSサーバとDHCPサーバが同じマシンにあるならこの行は、必要でない。
必要でないものを含む。

filename "freebsd8/boot/pxeboot";

NICインテルPXEブートROMからリクエストがあった時、IPアドレス以外伝えることのできる追加オプションがあります。
この引数は、PXEブートROMにTFTPリクエストのためのファイル名を伝えます。TFTPリクエストに必要なファイル名を知らせるためのものです。
※わからない英文*1

option root-path "/usr/local/freebsd8";

これは、FreeBSDのためにあります。それは、pxeboot(8)にrootファイルシステムがどこにマウントされるべきか伝えます。NFSは賢いXD。そうして、カーネルは、次と同じことをします。実行するためのルートファイルシステムを得ることを試みて、そしてinitを始めます。

mount -t nfs 192.168.1.88:/usr/local/freebsd8 /

ここで、あなたは、/etc/rc.confにISCDHCPサーバを実行できるようにするといいでしょう、そして、/usr/local/etc/rc.dの中にある、デーモンを使うための適切なrc.dスクリプトによってスタートするでしょう。

Step2:TFTPコンフィグ

*1:TFTP request for now that it has an IP address.