SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


redhatkickstart
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
redhatkickstart [2014/03/17 21:02]
sjoerd
redhatkickstart [2014/03/17 21:29] (current)
sjoerd [Building a Kickstart File]
Line 12: Line 12:
 </​code>​ </​code>​
  
-This will start this graphical tool:+This will start this graphical tool: \\
 {{redhatkickstart01.jpg}} \\ {{redhatkickstart01.jpg}} \\
  
Line 81: Line 81:
  
 > Note that the tool will automatically by default enable selinux but disable the firewall. Disabling the firewall is not possible during the manual installation but is with kickstart. > Note that the tool will automatically by default enable selinux but disable the firewall. Disabling the firewall is not possible during the manual installation but is with kickstart.
 +
 += Edit Kickstart File =
 +We just created a kickstart file with some very basic options. Of course it's possible to load the config file again and make some additional changes but sometimes it's just easier and faster to use a text editor.
 +
 +These are some options you could do:
 +* Add a package group to the installation files
 +* Add a single package to the installation
 +* Add an installation line to some file
 +
 +So if I would like to install the Development Tools package group, the gimp package and the time and date to the issue file I would ad these lines to kickstart file:
 +<​code>​
 +@Development Tools
 +gimp
 +
 +%post
 +date > /​root/​install-date
 +%end
 +</​code>​
 +
 +> Note that adding the installation lines happens inside the %post part of the file. This is a new part since I did not add a post part using the system-config-kickstart utility.
 +
 +This would now lead to the following file:
 +<​code>​
 +[root@localhost ~]# vim shifting.cfg
 +[root@localhost ~]# cat shifting.cfg
 +#​platform=x86,​ AMD64, or Intel EM64T
 +#​version=DEVEL
 +# Firewall configuration
 +firewall --disabled
 +# Install OS instead of upgrade
 +install
 +# Use CDROM installation media
 +cdrom
 +# Root password
 +rootpw --iscrypted $1$c29CNyiX$jWnvp1/​pv0RvJsTJhnt5c/​
 +# System authorization information
 +auth  --useshadow ​ --passalgo=sha512
 +# Use graphical install
 +graphical
 +firstboot --disable
 +# System keyboard
 +keyboard us
 +# System language
 +lang en_US
 +# SELinux configuration
 +selinux --enforcing
 +# Installation logging level
 +logging --level=info
 +# Reboot after installation
 +reboot
 +# System timezone
 +timezone ​ Europe/​Amsterdam
 +# Network information
 +network ​ --bootproto=dhcp --device=eth0 --onboot=on
 +# System bootloader configuration
 +bootloader --location=mbr
 +# Clear the Master Boot Record
 +zerombr
 +# Partition clearing information
 +clearpart --all --initlabel
 +# Disk partitioning information
 +part /boot --fstype="​ext4"​ --size=250
 +part swap --fstype="​swap"​ --size=512
 +part / --fstype="​ext4"​ --grow --size=1
 +
 +%packages
 +@base
 +@Development Tools
 +gimp
 +
 +%end
 +
 +%post
 +date > /​root/​install-date
 +
 +%end
 +</​code>​
 +
 +== Syntax Checking ==
 +Note that when you edit the file using vim you get a little color coding which makes the file more readable and will show you syntax errors: \\
 +{{redhatkickstart04.jpg}} \\
 +
 +If you want something a little bit more professional you van have ksvalidator check the file:
 +<​code>​
 +[root@localhost ~]# ksvalidator shifting.cfg
 +</​code>​
 +If a syntax error was made ksvalidator will show you an error. It does not check the commands for example inside the post section. Only the syntax. ​
 +
 += Make Kickstart File Available to Installer =
 +There are several ways to provide the file to the installer. I will use the http method. For this I need a webserver, see [[redhathttpd|here]] on how to deploy a webserver on Red Hat. 
 +
 +After installing the webserver, copy the kickstart file to the {{{/​var/​www/​html/​}}} directory and make sure it's readable by the apache webserver. ​
 +
 += Start the Installation With a Kickstart File =
 +Start your system using the install ISO with Red Hat Enterprise Server. In this cased I used this media:
 +
 +* rhel-server-6.5-x86_64-dvd.iso
 +
 +When the server is booting and with the option "​Install or Upgrade an existing system"​ highlighted,​ press tab. Now the following line appears:
 +
 +<​code>​
 +vmlinuz initrd=initrd.img
 +</​code>​
 +
 +Now add the location from the kickstart file:
 +<​code>​
 +vmlinuz initrd=initrd.img ks=http://​192.168.25.128/​shifting.cfg
 +</​code>​
 +
 +The IP address shown is the IP address of my webserver which is hosting the kickstart file: \\
 +{{redhatkickstart05.jpg}} \\
 +
 +
 +
 {{tag>​linux redhat install}} {{tag>​linux redhat install}}
redhatkickstart.txt ยท Last modified: 2014/03/17 21:29 by sjoerd