
148 The Virtualization Cookbook for Red Hat Enterprise Linux 5.2
10.1 Configure the controller for kickstart
In this section, you configure the controller to host the kickstart file, which you use to perform
the automated installation of the Linux virtual server called LINUX02. This section assumes
you have already set up the RHEL 5.2 install tree as described in 7.2, “Configuring the
controller” on page 109.
The installer generates a kickstart file at the end of every installation. It is based on the
answers provided during the interactive install. This kickstart file is named anaconda-ks.cfg
and is located in the /root/ directory. You use this kickstart file from RHEL52 as a template for
LINUX02. Perform the following steps:
1. From an Secure Shell (SSH) session to the controller, create a directory to hold the
kickstart file. Then, copy the default kickstart file to this directory, rename it, and modify the
permissions so others may read it:
# mkdir /nfs/ks
# cp /root/anaconda-ks.cfg /nfs/ks/linux02-ks.cfg
# chmod +r /nfs/ks/linux02-ks.cfg
2. Next, use vi to edit the kickstart configuration file. To customize this kickstart for LINUX02,
remove the lines with the strikethrough, and edit the lines shown in bold font:
# vi /nfs/ks/linux02-ks.cfg
install
nfs --server=9.12.5.30 --dir=/nfs/rhel5.2 1
lang en_US.UTF-8
network --device eth0 --mtu=1500 --bootproto static --ip 9.12.5.32 2
--netmask 255.255.255.0 --gateway 9.12.4.1 --nameserver 9.12.6.7
--hostname virtc532.itso.ibm.com 3
rootpw --iscrypted $1$d6Mi5lj9$jzwhlKOUK37qXQzTLVRSm.
firewall --disabled --port=22:tcp
4
authconfig --enableshadow --enablemd5
selinux --enforcing
timezone America/New_York
bootloader --location=mbr --driveorder=dasda,dasdd,dasdg,dasdh,dasdi,dasdj,dasdk
5
reboot 6
key --skip 7
# 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
zerombr yes 8
clearpart --all --initlabel 9
part / --fstype ext3 --size=1 --grow --ondisk=dasda 10
#clearpart --linux
11
#part /boot --fstype ext3 --size=100 --ondisk=dasda
#part pv.11 --size=100 --grow --ondisk=dasde
#part pv.10 --size=100 --grow --ondisk=dasdd
#part pv.9 --size=100 --grow --ondisk=dasdc
#part pv.8 --size=100 --grow --ondisk=dasdb
#part / --fstype ext3 --size=100 --grow --ondisk=dasda
#volgroup install_vg --pesize=32768 pv.8 pv.9 pv.10 pv.11
#logvol /nfs --fstype ext3 --name=install_lv --vgname=install_vg --size=9120
%packages 12
@core
@base
@games
Komentarze do niniejszej Instrukcji