27.12.2012 Views

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

# cd /nfs<br />

# mkdir ks<br />

# cd ks<br />

► Copy the sample kickstart file from the golden image:<br />

# scp 9.60.18.222:/root/anaconda-ks.cfg linux02-ks.cfg<br />

anaconda-ks.cfg <strong>10</strong>0% 1813 1.8KB/s 00:00<br />

# chmod +r linux02-ks.cfg<br />

► Edit the kickstart configuration file as follows. After the first four changes which are in bold,<br />

remove the comments from the part, volgroup and logvol lines. Edit the lines in bold in to<br />

customize this kickstart <strong>for</strong> LINUX02:<br />

# vi linux02-ks.cfg<br />

# Kickstart file automatically generated by anaconda.<br />

#version=RHEL6<br />

install<br />

reboot<br />

nfs --server=9.60.18.223 --dir=/nfs/rhel6<br />

lang en_US.UTF-8<br />

rootpw --iscrypted<br />

$6$jiFGqyU1FwxWWQ6t$7qnsOSsUsNOyGnjtIpR63z204RDjL1q6M//lxfA.E5SbQ.M2gNKCJpahQ.m07JCm.56y<br />

H3vKbxc5bVtvRERwd0<br />

firewall --disabled<br />

authconfig --enableshadow --passalgo=sha512 --enablefingerprint<br />

selinux --en<strong>for</strong>cing<br />

timezone --utc America/New_York<br />

bootloader --location=mbr --driveorder=dasdb,dasdc,dasdd,dasde<br />

--append="crashkernel=auto"<br />

# <strong>The</strong> following is the partition in<strong>for</strong>mation you requested<br />

# Note that any partitions you deleted are not expressed<br />

# here so unless you clear all partitions first, this is<br />

# not guaranteed to work<br />

clearpart --all --initlabel --drives=dasdb,dasdc,dasdd,dasde<br />

part / --fstype=ext4 --size=512<br />

part swap --size=512<br />

part pv.Al9FUC-feWq-uHGF-Jaui-RxZQ-Kq9t-pi5zlC --grow --size=200<br />

part pv.uB82Dq-ajP3-QEln-dcsJ-XHds-tCxx-BRjx0c --grow --size=200<br />

part swap --grow --size=200<br />

part swap --grow --size=200<br />

volgroup system_vg --pesize=4096 pv.Al9FUC-feWq-uHGF-Jaui-RxZQ-Kq9t-pi5zlC<br />

pv.uB82Dq-ajP3-QEln-dcsJ-XHds-tCxx-BRjx0c<br />

logvol /opt --fstype=ext4 --name=opt_lv --vgname=system_vg --size=384<br />

logvol /tmp --fstype=ext4 --name=tmp_lv --vgname=system_vg --size=384<br />

logvol /usr --fstype=ext4 --name=usr_lv --vgname=system_vg --size=1536<br />

logvol /var --fstype=ext4 --name=var_lv --vgname=system_vg --size=384<br />

repo --name="Red Hat Enterprise Linux" --baseurl=file:///mnt/source/ --cost=<strong>10</strong>0<br />

%packages<br />

@base<br />

...<br />

%end<br />

Following are clarifications to some of the values:<br />

– <strong>The</strong> line reboot is added to set the server to automatically shutdown after kickstart.<br />

– <strong>The</strong> line starting with nfs --server= sets the IP address of installation server and path<br />

to install tree.<br />

164 <strong>The</strong> <strong>Virtualization</strong> <strong>Cookbook</strong> <strong>for</strong> RHEL 6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!