Rhel 6.1 - How to create a kickstart file?

Can anyone tell me how you create a kickstart file for RHEL 6.1 install? I am new to this and wanting to learn Red Hat. I have a training guide that says to create one but it does not give you instructions on how to do so.

The simplest way is to take one from an existing installation, found in /root/anaconda-ks.cfg, and modify it as needed.

Alternatively, you can use the kickstart configurator - system-config-kickstart - to modify it, or to create a new one.

So when I boot from the RHEL disc, I just install to HD or which steps should I take? Thanks for your help!

anaconda-ks.cfg is created based on the selections you make during a manual installation.

You need to give more information about your setup. Are you installing RHEL, or a rebrand (i.e. Fedora, CentOS or Scientific Linux)? Are you installing on physical hardware (describe it) or in a VM (describe that). Do you have a physical DVD, or an ISO image?

Here's an example anaconda-ks.cfg file that was created during a basic desktop installation (I have modified the partition information):

# Kickstart file automatically generated by anaconda.

#version=DEVEL
install
cdrom
lang en_US.UTF-8
keyboard us-acentos
network --onboot no --device eth0 --bootproto dhcp --noipv6
rootpw  --iscrypted $6$npZDPR.Ns0fVhnhw$iddPpu0nJM.FGT2nEUOJlJUGHQVzCF60VRI7mLU0hh7loeFSYse35T2xrnQNO8z42q8dGBZJ.H5pkeyhNQzfe.
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone --utc Europe/Zurich
bootloader --location=mbr --driveorder=sda,sdb --append="crashkernel=auto rhgb quiet"
# 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
clearpart --all --drives=sda

part /boot --fstype=ext4 --size=500
part pv.008002 --grow --size=1


volgroup vg_kvm --pesize=4096 pv.008002
logvol / --fstype=ext4 --name=lv_root --vgname=vg_kvm --grow --size=1024 --maxsize=51200
logvol swap --name=lv_swap --vgname=vg_kvm --grow --size=1984 --maxsize=1984

repo --name="CentOS"  --baseurl=cdrom:sr0 --cost=100

%packages
@base
@core
@debugging
@basic-desktop
@desktop-debugging
@desktop-platform
@directory-client
@fonts
@general-desktop
@graphical-admin-tools
@input-methods
@internet-applications
@internet-browser
@java-platform
@legacy-x
@network-file-system-client
@office-suite
@print-client
@remote-desktop-clients
@server-platform
@server-policy
@x11
mtools
pax
oddjob
wodim
sgpio
genisoimage
device-mapper-persistent-data
abrt-gui
samba-winbind
certmonger
pam_krb5
krb5-workstation
gnome-pilot
libXmu
%end

reboot

In particular you may need to modify the url, network, partition information and repo settings, and anything else to suit your needs.

To use the kickstart file during an installation, press TAB after starting the machine, during the GRUB loader, and edit the boot options (press e) and add the location of the kickstart file (ks=...) (reference here)

I would suggest that you first install manually from the DVD, then play around with the configurator.