Kickstart short cuts for noobs

= Kickstart short cuts for noobs =

Purpose
Kickstart is the core of the automated installation system used by Fedora and RHEL.

This short cut describes how to set-up such a system.

Operating Environment

 * yum install yum-utils: This package will enable you to download packages, without installing them. So you can populate your kickstart server with packages that didn't come with the Install media.

Do the virsh bridge create in kickstart http://www.mail-archive.com/netcf-devel@lists.fedorahosted.org/msg00361.html

Creating the NFS export Structure
/exports/ks/configs            192.168.42.0/255.255.255.0(ro,no_root_squash)
 * 1) mkdir -p /exports/ks/configs
 * 2) mkdir -p /exports/ks/images
 * 3) update /etc/exports
 * 1) service nfs restart

populate an install directory for kickstart use
/exports/ks/images/rhel6beta2 192.168.42.0/255.255.255.0(ro,no_root_squash)
 * 1)  mount -o loop /exports/isos/images/rhel6beta2.iso /mnt
 * 2) pushd /mnt
 * 3) cp -r * /exports/ks/images/rhel6beta2
 * 4) update /etc/exports

Kickstart config file
To create the config file use:
 * Fedora: /usr/bin/system-config-kickstart
 * (install by: yum install system-config-kickstart)


 * 1) Kickstart file automatically generated by anaconda.

install
 * 1) Tells the system to install a fresh system rather than upgrade an existing system.

nfs --server=192.168.42.132 --dir=/exports/ks/images/rhel6beta2
 * 1) Install from the NFS server specified.

skipx
 * 1) If present, X is not configured on the installed system.

text
 * 1) Perform the kickstart installation in text mode.

logging --level=info
 * 1) Installation logging level

authconfig --enableshadow --enablemd5
 * 1) Sets up the authentication options for the system.

rootpw --iscrypted XXXXXXXXXXXXXXXXXXXXXXXXXXX
 * 1) Sets the system's root password

lang en_US.UTF-8 keyboard us timezone --utc CET

network --device=eth0 --bootproto=dhcp --onboot=on network --device=eth2 --bootproto=dhcp --onboot=on network --device=eth3 --bootproto=dhcp --onboot=on
 * 1) Configures network information for the system.

firewall --disabled selinux --disabled

bootloader --location=mbr zerombr
 * 1) Clear the Master Boot Record

clearpart --all --initlabel part / --fstype="ext3" --size=14000 part swap --fstype="swap" --size=768

firstboot --disabled reboot

%packages @base @core @java keyutils trousers fipscheck device-mapper-multipath -cups nfs-utils


 * 1) %post
 * 2) Any post ops, just add the bash script commands here.

%end

Adding a package to the repository

 * yumdownloader sysstat: Downloads the 'sysstat' packages, to the current directory, and with the same architecture as the current system architechture.
 * 'uname -m' will print the system architecture.

setting up a boot server

 * http://linux-sxs.org/internet_serving/pxeboot.html
 * http://fedorasolved.org/installation-solutions/installing-fedora-using-pxe-images
 * http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch25_:_Network-Based_Linux_Installation

subnet 192.168.42.0 netmask 255.255.255.0 { range 192.168.42.10 192.168.42.24; default-lease-time 3600; max-lease-time 4800; option routers 192.168.42.1; option domain-name-servers 192.168.42.1; option subnet-mask 255.255.255.0; }
 * 1) yum install tftp-server dhcp httpd syslinux
 * 2)  vi /etc/dhcp/dhcpd.conf

host booty { hardware ethernet 00:54:20:7a:7e:8a; fixed-address 192.168.42.21; option host-name "booty"; filename "pxelinux.0"; } prompt 1 default linux timeout 100
 * 1) vi /etc/xinetd.d/tftp
 * 2) * Change '       disable                 =  no'
 * 3) Insert the Fedora DVD
 * 4) mount /dev/dvd /mnt
 * 5) cp vmlinuz initrd.img /var/lib/tftpboot
 * 6) cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot
 * 7) cd /var/lib/tftpboot
 * 8) mkdir /var/lib/tftpboot/pxelinux.cfg
 * 9) touch 01-00-54-20-7A-7E-8A
 * 10) touch C0A830A0
 * 11) vi pxelinux.cfg/default

label linux kernel vmlinuz append initrd=initrd.img ramdisk_size=9216 noapic acpi=off
 * 1) Follow: https://fedoraproject.org/wiki/Kickstart_short_cuts_for_noobs#Creating_the_NFS_export_Structure
 * 2) Test that the boot works.
 * 3) Add kickstart as per 'Booting With Your Kickstart Files' in http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch25_:_Network-Based_Linux_Installation
 * 4) Change the 'append' line in the default file to:
 * 5) * append initrd=initrd.img ramdisk_size=9216 noapic acpi=off ks=nfs:192.168.42.1:/exports/ks/configs/fedora14.ks

Local repository
See the reference in the reference list.


 * 1) yum install lighttpd
 * 2) vi /etc/lighttpd/lighttpd.conf
 * 3) * enable mod_aliases
 * 4) * add 'alias.url = ( "/yum" => "/exports/isos/repos" )'
 * 5) chkconfig lighttpd on
 * 6) /etc/init.d/lighttpd start

Package administration bytes

 * list content of a package: repoquery -ql mercurial
 * find a package: yum search kvm
 * download package without installing:
 * Install a local package: yum localinstall TUT.RPM
 * Description of package: yum info mercurial

I have to select the NIC to use for the installation
During the boot, on a multi NIC system, I'm asked to choose which NIC to use for the installation.

use the ksdevice=eth3 in the kickstart command.

on virt-install put it inside the -x"PARMS" parameter.

Cannot retrieve repository metadata (repomd.xml)
See: [ http://digitizor.com/2009/06/17/how-to-fix-the-cannot-retrieve-repository-metadata-repomd-xml-error-in-fedora-11 | How to fix the “Cannot retrieve repository metadata (repomd.xml)” error in Fedora? ]

Public key for .rpm is not installed
Public key for tigervnc-server-minimal-1.0.90-0.22.20100813svn4123.fc14.x86_64.rpm is not installed

See: | Public Key Not Installed


 * 1) find / -name "*GPG*"
 * 2) rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora