ディスクの入れ替え以外全自動でインストールする仕組み。RedHat系で使用可能だが仕事で全自動インストールをやる必要に迫られる人以外はあまり使っていないのかもしれない。debianだとpreseedという別の仕組みらしい

通常インストールで出来上がる /root/anaconda-ks.cfgが若干の修正で利用可能。

修正箇所は以下のとおり

install
cdrom←追加
パーティションのところをコメントはずす(消してしまうので慎重に!)
#clearpart --all --drives=hda
#part /boot --fstype ext3 --size=100 --ondisk=hda
#part / --fstype ext3 --size=700 --grow --ondisk=hda
#part swap --size=512 --grow --maxsize=1024 --ondisk=hda

上記はパーティション仕切りを全自動に任せたもの

ルートのパスワード暗号化

perl -e 'print crypt("password", "XX") . "\n";'p

サンプル

# Kickstart file automatically generated by anaconda.
install
cdrom
lang ja_JP.eucJP
langsupport --default ja_JP.eucJP ja_JP.eucJP
keyboard jp106
mouse genericwheelps/2 --device psaux
skipx
network --device eth0 --bootproto static --ip 172.16.16.162 --netmask 255.255.248.0 --gateway 172.16.16.1 --nameserver 172.16.16.36 --hostname vm-itto2
rootpw --iscrypted Xx4FRqIkMyvcU
firewall --disabled
authconfig --enableshadow --enablemd5
timezone Asia/Tokyo
bootloader --location=mbr
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
clearpart --all --drives=hda
part /boot --fstype ext3 --size=100 --ondisk=hda
part / --fstype ext3 --size=700 --grow --ondisk=hda
part swap --size=256 --grow --maxsize=512 --ondisk=hda

%packages
@ Development Tools
@ Dialup Networking Support
@ Japanese Support

%post

キックスタートインストール

	3.1
		2で用意したファイルをWindows上でもよいのでks.cfgという名前でFDに保存します。
	3.2
		RedHatのCD-ROMを入れてブートの選択画面が出たら、
		boot: linux ks=hd:fd0/ks.cfg
		あとはCD-ROMの入れ替えだけやってあげればインストール完了です。

キックスタートファイルをNFSから取得する

linux ks=nfs:192.168.0.10:/NFS公開ディレクトリ/ks.cfg
Counter: 8608, today: 1, yesterday: 2

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2022-10-14 (金) 13:16:53