jupiter のインストール 時に入れた debian32 を設定する
ファイルサーバの設定
- pirikaにて作業
- /system/debian32/etc 以下を編集する
- hostname
debian32
- hosts の2行め
10.0.16.0 debian32.hokudai.in-cps debian32
- mailname
debian32.hokudai.in-cps
- network/interfaces
iface eth0 inet static address 10.0.16.0 netmask 255.255.0.0 network 10.0.0.0 broadcast 10.0.255.255 gateway 10.0.1.0 auto eth0
- udev/rules.d/70-persistent-net.rules を削除
- fstab を編集
proc /proc proc defaults 0 0 10.0.1.1:/system/debian32 / nfs rw,intr,hard,noac 0 1 none /tmp tmpfs defaults 0 0 none /var/run tmpfs defaults 0 0 none /var/lock tmpfs defaults 0 0 none /var/tmp tmpfs defaults 0 0
- kernel-img.conf
do_bootloader=no
- hostname
dhcp サーバの設定
- jupiterにて作業
- /tftpboot 以下に debian32 ディレクトリを作成
# mkdir /tftpboot/debian32
- syslinux を入れて pxelinux.0 をコピー
# apt-get install syslinux # cp /usr/lib/syslinux/pxelinux.0 /tftpboot/debian32/ # mkdir /tftpboot/debian32/pxelinux.cfg
- カーネルと起動イメージをコピー
# scp pirika:/system/debian32/boot/vmlinuz . # scp pirika:/system/debian32/boot/initrd.img .
- /tftpboot/debian32/pxelinux.cfg/0A001000 を作成
default debian prompt 1 noescape 0 allowoptions 0 timeout 60 label debian kernel vmlinuz append root=/dev/nfs netboot=nfs initrd=initrd.img nfsroot=10.0.1.1:/system/debian32 ip=eth0 rw
- 情報実験機を PXE ブートして MAC アドレスを調べる
- bios で NIC の boot ROM を有効に
- ネットワークを接続する
- ディスク類をつながないで起動
- 画面に MAC address が表示されるので記録する
- /etc/dhcpd.conf にエントリ追加
group pxeclients { next-server 10.0.1.2; host debian32 { hardware ethernet xx:xx:xx:xx:xx:xx; # xx を記録したMACアドレスで置き換える fixed-address 10.0.16.0; option root-path "10.0.1.1:/system/debian32"; filename "/debian32/pxelinux.0"; } }
- dhcp サーバを再起動
# /etc/init.d/isc-dhcp-server restart
- 情報実験機を起動する
- 起動しない場合は設定が悪いのでやりなおし.
- initrd.img の修正は難しいので、直したい場合には 最初から入れ直した方が早い.
起動後の設定
- grub を消す
# aptitude purge grub-pc grub-common
- initrd 作り直す
# mkinitrd -o initrd.img # scp initrd.img jupiter:/tftpboot/debian32/
- 何度かリブートして起動するか確認する
- 確認
- netstat -lntu で開いているポートを確認, 必要のない物はパッケージごと消す
- lsof -i:[ポート番号] で何というプロセスがポートを使っ ているのかを知ることができる
後始末
- 旧情報実験機をシャットダウンする
- pirika でスナップショットをとる
# zfs snapshot zfspool/system/debian32@minimum