RHEL7 RHCSA Using Kickstart

 

تنصيب انظمة لينكس عبر الشبكة دون الحاجة الى CD/DVD or USB drives
PXE Server, stands for preboot execution environment
, will help to install a system in the network without having a physical media.
we can install any system in the network without having CD/DVD or USB drives.

 

1 – Using Kickstart
2 – Setting Up an Installation Server
3 – Configuring a Network Server as Installation Server
4 – Setting Up the Network Installation Server
5 – Setting Up a TFTP and DHCP Server for PXE Boot
6 – Installing the TFTP Server
7 – The xinetd File for TFTP
8 – Configuring DHCP for PXE Boot
9 – Creating the TFTP PXE Server Content
10- Configuring the TFTP Server for PXE Boot
11- firewall-cmd –permanent –add-service=dhcp
12- firewall-cmd –permanent –add-service=tftp
13- firewall-cmd –permanent –add-service=http
14- firewall-cmd –reload
15- Adding More Options to the PXE Boot Menu
16- Creating a Kickstart File
17- Using a Kickstart File to Perform an Automated Installation
18- Performing a Virtual Machine Network Installation Using a Kickstart File
19- Modifying the Kickstart File with system-config-kickstart
20- Use system-config-kickstart to create or tune Kickstart files.
21- Specifying the network installation source.
22- Creating partitions.
23- Making Manual Modifications to the Kickstart File
24- Contents of the anaconda-ks.cfg File

لعرض جميع الدروس يرجى مراجعة قناتي اليوتيوب اضغط

 رابط الدورة

james-redhat

الاوامر السطرية المستخدمة :

yum install dhcp tftp tftp-server syslinux wget vsftpd
/etc/dhcp/dhcpd.conf

allow booting;
allow bootp;
allow unknown-clients;

subnet 10.10.10.0 netmask 255.255.255.0 {
range 10.10.10.200 10.10.10.250;
option domain-name-servers 10.10.10.100;
option routers 10.10.10.100;
default-lease-time 600;
max-lease-time 7200;

next-server 10.10.10.100;
filename “pxelinux.0”;
}

nano /etc/xinetd.d/tftp

mkdir -p /tftpboot
chmod 777 /tftpboot

cp -v /usr/share/syslinux/pxelinux.0 /tftpboot
cp -v /usr/share/syslinux/menu.c32 /tftpboot
cp -v /usr/share/syslinux/memdisk /tftpboot
cp -v /usr/share/syslinux/mboot.c32 /tftpboot
cp -v /usr/share/syslinux/chain.c32 /tftpboot

mkdir /tftpboot/pxelinux.cfg
mkdir -p /tftpboot/netboot/

cp /var/ftp/pub/images/pxeboot/vmlinuz /tftpboot/netboot/

cp /var/ftp/pub/images/pxeboot/initrd.img /tftpboot/netboot/

openssl passwd -1 “000000”

$1$WZbV8hXJ$d9ocaB1lnEz.AEYvAyyiU0

kickstart file

/var/ftp/pub/anaconda-ks.cfg
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall –disabled
# Install OS instead of upgrade
install
# Use NFS installation media
url –url=”ftp://10.10.10.100/pub/centos”
# Root password [i used here 000000]
rootpw –iscrypted $1$GFAMhnI8$25znauL9LwujUesCCL8/c0
# 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 disabled
# Installation logging level
logging level=info
# System timezone
timezone Europe/Amsterdam
# System bootloader configuration
bootloader location=mbr
clearpart –all –initlabel
part swap –asprimary –fstype=”swap” –size=1024
part /boot –fstype xfs –size=200
part pv.01 –size=1 –grow
volgroup rootvg01 pv.01
logvol / –fstype xfs –name=lv01 –vgname=rootvg01 –size=1 –grow
%packages
@core
wget
net-tools
%end
%post
%end
nano /tftpboot/pxelinux.cfg/default

default menu.c32
prompt 0
timeout 30
MENU TITLE Muhammed Essa PXE Menu

LABEL centos7_x64
MENU LABEL CentOS 7 X64
KERNEL /netboot/vmlinuz
APPEND initrd=/netboot/initrd.img inst.repo=ftp://10.10.10.100/pub/centos ks=ftp://10.10.10.100/pub/anaconda-ks.cfg
systemctl enable dhcpd
systemctl enable xinetd
systemctl enable vsftpd

systemctl start dhcpd
systemctl start xinetd
systemctl start vsftpd