インストールイメージの登録


DVD イメージは前々回でダウンロード済みなので、インストール時に読み込みできるように登録を行う。

ブートイメージの取得

tftp 経由で読み込むブートイメージを tftp から読み込めるようにする為、先日ダウンロードした DVD イメージから 必要なファイルをコピーする。
gtank:/home/k0y# mkdir /mnt/centos4
gtank:/home/k0y# mount -t iso9660 -o loop CentOS-4.4-i386-binDVD.iso /mnt/centos4/
gtank:/home/k0y# ls -la /mnt/centos4/
合計 866
dr-xr-xr-x  8 root root   2048 2006-08-24 06:07 .
drwxr-xr-x  4 root root   4096 2007-03-29 01:12 ..
-r--r--r--  1 root root     82 2006-08-24 05:29 .discinfo
dr-xr-xr-x  4 root root   2048 2005-09-05 00:36 CentOS
-r--r--r--  9 root root  18009 2005-03-01 10:34 GPL
dr-xr-xr-x  2 root root  14336 2006-08-14 01:03 NOTES
-r--r--r--  2 root root   5781 2006-08-24 04:37 RELEASE-NOTES-en
-r--r--r--  2 root root   7014 2006-08-24 04:49 RELEASE-NOTES-en.html
-r--r--r--  9 root root   1795 2005-03-01 10:34 RPM-GPG-KEY
-r--r--r--  2 root root   1795 2005-03-01 10:34 RPM-GPG-KEY-centos4
-r--r--r--  2 root root   8859 2005-03-19 08:46 centosdocs-man.css
dr-xr-xr-x  2 root root 239616 2006-08-24 06:04 headers
dr-xr-xr-x  3 root root   2048 2006-08-24 05:26 images
dr-xr-xr-x  2 root root   4096 2006-08-24 05:26 isolinux
dr-xr-xr-x  2 root root   2048 2006-08-24 06:07 repodata
-r--r--r--  1 root root 569869 2006-08-13 00:38 yumgroups.xml
gtank:/home/k0y# mkdir -p /tftpboot/pxeboot/centos4
gtank:/home/k0y# cd /mnt/centos4/isolinux
gtank:/mnt/centos4/isolinux# cp initrd.img vmlinuz /tftpboot/pxeboot/centos4
gtank:/mnt/centos4/isolinux# ls -l /tftpboot/pxeboot/centos4/
合計 4988
-r--r--r--  1 root root 3590924 2007-03-29 01:26 initrd.img
-r--r--r--  1 root root 1504101 2007-03-29 01:26 vmlinuz
参考ページ:
開発倉庫

nfsの設定

会社の環境ではすべてイメージを配信サーバにて http 経由でダウンロードするように設定しているが、
今回はせっかくなので違う方法という事で nfs を利用。 nfs は少ししか使った事がないので全然覚えてない。少し不安
(それなのに会社で構築した監視環境は使っているけどねヽ(´ー`)ノ) /etc/exports に許可するIPを追加してサービスの再起動をするだけ
gtank:/home/k0y# cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#/share 192.168.1.0/255.255.255.0(rw,no_root_squash)
/mnt    192.168.1.0/255.255.255.0(ro,no_root_squash,all_squash)
gtank:/home/k0y# /etc/init.d/nfs-kernel-server restart
※「no_root_squash」:rootでの利用を許可