Redhat – Red Hat Kickstart: How to get a DVD-ROM based install to work

bootkickstartredhatrhel6

I'm trying to create a "Magic DVD" that will install and configure RHEL 6.2 just the way we want it the first time, every time.

Here's the process I've been trying to use, just to prove the concept:

Perform the install manually as intended. Allow anaconda to create
/root/anaconda-ks.cfg.
Copy the contents of the RHEL install DVD to a directory on my hard drive.

 mkdir -p /home/derp/RHEL/diskFiles   
 cp /media/RHEL_6.2\ i386\ Disc\ 1/* /home/derp/RHEL/diskFiles

Move /root/anaconda-ks.cfg into said directory, at the top level:

 cp /root/anaconda-ks.cfg /home/derp/RHEL/diskFiles/ks.cfg

Create a new ISO file using the appropriate commands. (Taken from this link.)

cd /home/derp/RHEL
mkisofs -o file.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot     -boot-load-size 4 -boot-info-table -R -J -v -T diskFiles/

From this point, it should be straightforward:

  • Burn the file to disk (or, in this case, connect the VM's "optical drive" to the ISO file.)
  • Boot the machine.
  • Cry tears of joy as the machine installs itself.

So here's the issue: My re-mastered ISO works fine booting and starting anaconda, but once it gets there, nothing happens. I'm confused as to what I've missed–it looks quite similar to an answer I found here. As I understand it, the anaconda-ks.cfg file should have executed the exact same install I performed to build the system. The only thing I added to the file was the autostep --autoscreenshot command so that I could see what it was doing.

I do notice that some of the partition commands are commented out, but I can't figure out if that's what's causing the the issue. Judging by the fact that the re-mastered ISO boots properly, I think I've screwed up the ks.cfg file and/or not specified a boot parameter I needed to. I've pasted in my ks.cfg below:

#version=DEVEL
autostep --autoscreenshot
install
cdrom
lang en_US.UTF-8
keyboard us
network --onboot no --device eth0 --noipv4 --noipv6
rootpw  --iscrypted $6$CLfKLztawb7ZJq.O$d9iWhj6/SC..72WZFOtiy6t90DfTkTGZ9xgJ/8Cy.xKVNLlv6tmqf73uxeP0mvZT481kvyQzDi7uLon5fUAAw/
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone --utc America/Los_Angeles
bootloader --location=mbr --driveorder=sda --append=" rhgb crashkernel=auto 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
#clearpart --all --drives=sda

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

#volgroup vg_dbs01 --pesize=4096 pv.008002
#logvol /omnyx --fstype=ext4 --name=lv_omnyx --vgname=vg_dbs01 --size=81448
#logvol / --fstype=ext4 --name=lv_root --vgname=vg_dbs01 --size=8192
#logvol swap --name=lv_swap --vgname=vg_dbs01 --size=4064
#logvol /var --fstype=ext4 --name=lv_var --vgname=vg_dbs01 --size=8192

repo --name="Red Hat Enterprise Linux"  --baseurl=cdrom:sr0 --cost=100

%packages
@base
@client-mgmt-tools
@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
@workstation-policy
@x11
mtools
pax
python-dmidecode
oddjob
sgpio
genisoimage
wodim
abrt-gui
certmonger
pam_krb5
krb5-workstation
gnome-pilot
libXmu
%end

Help would be met with much gratitude.

Best Answer

You need to tell the installer to do a kickstart installation. You can do this in one of two ways:

A. When you see the installer screen type linux ks=/ks.cfg
B. Since you are rolling your own media, you can change the linux label in the file named isolinux.cfg in the isolinux folder of the media to read:

label linux
  menu label ^Install or upgrade an existing system
  menu default
  kernel vmlinuz
  append initrd=initrd.img ks=/ks.cfg <-- EDIT HERE!