redhat el 5_kickstart
TRANSCRIPT
-
8/12/2019 RedHat EL 5_kickstart
1/5
-
8/12/2019 RedHat EL 5_kickstart
2/5
18/07/13 RedHat EL 5.8 kickstart network installation
www.googlux.com/kickstart.html
flags = IPv4}
Let's now configure Operating System descriptions to be used for PXE boot files.
The command creates a sub-directory RHEL5.8 in the /tftpboot/linux-install/ and copy linux kernel (vmlinuz) and ram disk (initrd.img), normally located in images/pxeboot
directory of the installation tree (defined with -L).
The -K defines NFS location of directory with kickstart file.
The initrd.img (initial ram disk is part of memory that can be formatted/mounted like block device) is used for loading a temporary root file system during kernel (vmlinuz)
boot process.
{host}/# pxeos -a -i "RHEL5.8" -p NFS -D 0 -s 192.168.28.220 -L /.0/kickstart/rhel-5.8 -K nfs:192.168.28.220:/.0/kickstart/ks-conf-file
{host}/# pxeos -lRHEL5.8
Description: RHEL5.8 Protocol: NFS isDiskless: False Server: 192.168.28.220 Location: /.0/kickstart/rhel-5.8
Let's configure PXE boot files:
{host}/# pxeboot -a -K nfs:192.168.28.220:/.0/kickstart/ks-conf-files/unixlab-8-ks.cfg -O RHEL5.8 unixlab-8
{host}/# pxeboot -lpxelinux client: 192.168.28.221default RHEL5.8label RHEL5.8 kernel RHEL5.8/vmlinuz append initrd=RHEL5.8/initrd.img ramdisk_size=14430 method=nfs:192.168.28.220:/.0/kickstart/rhel-5.8 ip=dhcp
The file /tftpboot/linux-install/pxelinux.cfg/C0A81CDD (host to be installed IP in HEX) is created with the content:
default RHEL5.8label RHEL5.8 kernel RHEL5.8/vmlinuz append initrd=RHEL5.8/initrd.img ramdisk_size=14430 ks=nfs:192.168.28.220:/.0/kickstart/ks-conf-files/unixlab-8-ks.cfg
Make sure TFTP is running on the server and now boot the machine where you want to install rhel-5.8 from the network.
-
8/12/2019 RedHat EL 5_kickstart
3/5
18/07/13 RedHat EL 5.8 kickstart network installation
www.googlux.com/kickstart.html
And some syslog messages on the server:
dhcpd: DHCPDISCOVER from 00:14:4f:01:7e:e8 via eth0dhcpd: DHCPOFFER on 192.168.28.221 to 00:14:4f:01:7e:e8 via eth0dhcpd: DHCPREQUEST for 192.168.28.221 (192.168.28.220) from 00:14:4f:01:7e:e8 via eth0dhcpd: DHCPACK on 192.168.28.221 to 00:14:4f:01:7e:e8 via eth0in.tftpd: RRQ from 192.168.28.221 filename linux-install/pxelinux.0in.tftpd: tftp: client does not accept optionsin.tftpd: RRQ from 192.168.28.221 filename linux-install/pxelinux.0in.tftpd: RRQ from 192.168.28.221 filename linux-install/pxelinux.cfg/01-00-14-4f-01-7e-e8in.tftpd: RRQ from 192.168.28.221 filename linux-install/pxelinux.cfg/C0A81CDDin.tftpd: RRQ from 192.168.28.221 filename linux-install/RHEL5.8/vmlinuzin.tftpd: RRQ from 192.168.28.221 filename linux-install/RHEL5.8/initrd.imgdhcpd: DHCPDISCOVER from 00:14:4f:01:7e:e8 via eth0dhcpd: DHCPOFFER on 192.168.28.221 to 00:14:4f:01:7e:e8 via eth0
dhcpd: DHCPREQUEST for 192.168.28.221 (192.168.28.220) from 00:14:4f:01:7e:e8 via eth0dhcpd: DHCPACK on 192.168.28.221 to 00:14:4f:01:7e:e8 via eth0mountd: authenticated mount request from 192.168.28.221:987 for /.0/kickstart/ks-conf-files (/.0/kickstart/ks-conf-files)mountd: authenticated mount request from 192.168.28.221:990 for /.0/kickstart/rhel-5.8 (/.0/kickstart/rhel-5.8)
And example of kickstart file:
# install not updateinstall
# define type of installation#cdromnfs --server=192.168.28.220 --dir=/.0/kickstart/rhel-5.8
# perform installation in text mode, default is GUI modetext# required, set language during installationlang en_US.UTF-8#set languages installed on system
langsupport en_US.UTF-8# required, set keyboard typekeyboard us
# network info used during installation and for installed systemnetwork --device eth0 --bootproto static --ip 192.168.28.221 --netmask 255.255.255.0 --gateway 192.168.28.1 --nameserver 198.49.180.149
# encrypted root passwordrootpw --iscrypted $1$KBf2ShFQ$P3Sih6cgnpMcTij1YHcmh0
# disable firewall - iptables#firewall --enabled --port=22:tcpfirewall --disabled
# authconfig setup authentication options for systemauthconfig --enableshadow --enablemd5
-
8/12/2019 RedHat EL 5_kickstart
4/5
18/07/13 RedHat EL 5.8 kickstart network installation
www.googlux.com/kickstart.html
# Security Enhanced Linux, enable with default target policyselinux --enforcing
# set timezonetimezone America/Los_Angeles
# bootloader define how GRUB bootloader should be installedbootloader --location=mbr --driveorder=sda,sdb
# 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 --initlabel
#part / --fstype ext3 --size=4500 --ondisk=sda --asprimary#part /var --fstype ext3 --size=4500 --ondisk=sda#part /.0 --fstype ext3 --size=4500 --ondisk=sda#part swap --recommended#part swap --size=4500 --ondisk=sda
# raid1part raid.a1 --size 4500 --asprimary --ondisk=sdapart raid.a2 --size 4500 --asprimary --ondisk=sdapart raid.a3 --size 4500 --asprimary --ondisk=sdapart raid.a4 --size 1 --grow --ondisk=sda
part raid.b1 --size 4500 --asprimary --ondisk=sdbpart raid.b2 --size 4500 --asprimary --ondisk=sdbpart raid.b3 --size 4500 --asprimary --ondisk=sdbpart raid.b4 --size 1 --grow --ondisk=sdb
raid / --fstype ext3 --device md1 --level=RAID1 raid.a1 raid.b1raid swap --fstype swap --device md2 --level=RAID1 raid.a2 raid.b2raid /var --fstype ext3 --device md3 --level=RAID1 raid.a3 raid.b3
raid /.0 --fstype ext3 --device md4 --level=RAID1 raid.a4 raid.b4
# packages to be installed# @ is group of packages%packages@admin-tools@base@core@dns-server@development-libs@development-tools#@dialup@editors@java@legacy-software-support@mail-server@network-server@server-cfg@system-tools@text-internet
kexec-toolsfipscheckdevice-mapper-multipathsgpioperl-Convert-ASN1python-dmidecodeimakeemacsdnsmasqauditdhcp
# pre-installation script%pre
#!/bin/sh# simple examplesleep 5/bin/echo This is PRE-installation script that does nothing.
# post-installation script%post
# simple example/bin/sleep 5/bin/echo "This is POST-installation script that does nothing."/bin/echo STOP sendmail/sbin/service sendmail stop/bin/echo START nfs/sbin/service nfs start
Back to the main page
http://www.googlux.com/index.htm -
8/12/2019 RedHat EL 5_kickstart
5/5
18/07/13 RedHat EL 5.8 kickstart network installation
www.googlux.com/kickstart.html