CentOS 8
Sponsored Link

PXE Boot : Network Installation (Kick Start)2020/02/12

 
Automate Network Installation by Kick Start.
[1]
[2] Configure Kick Start settings.
# generate root password

[root@dlp ~]#
python3 -c 'import crypt,getpass; \
print(crypt.crypt(getpass.getpass(), \
crypt.mksalt(crypt.METHOD_SHA512)))'
Password:
$6$EC1T.oKN5f3seb20$y1WlMQ7Ih424OwOn.....
[root@dlp ~]#
mkdir /var/www/html/ks

[root@dlp ~]#
vi /var/www/html/ks/centos8-ks.cfg
# create new

# automatically proceed for each steps
autostep

# reboot after installing
reboot

# encrypt algorithm
auth --enableshadow --passalgo=sha512

# installation source
url --url=http://10.0.0.30/centos8/

# install disk
ignoredisk --only-use=sda

# keyboard layouts
keyboard --vckeymap=jp106 --xlayouts='jp','us'

# system locale
lang en_US.UTF-8

# network settings
network  --bootproto=dhcp --ipv6=auto --activate --hostname=localhost

# root password you generated above
rootpw --iscrypted $6$EC1T.oKN5f3seb20$y1WlMQ7Ih424OwOn.....

# timezone
timezone Asia/Tokyo --isUtc --nontp

# bootloaders settings
bootloader --location=mbr --boot-drive=sda

# initialize all partition tables
zerombr
clearpart --all --initlabel

# partitioning
# for [/boot/efi], it needs only for UEFI clients
part /boot --fstype="ext4" --ondisk=sda --size=1024
part /boot/efi --fstype="vfat" --ondisk=sda --size=512
part pv.10 --fstype="lvmpv" --ondisk=sda --size=30720
volgroup VolGroup --pesize=4096 pv.10
logvol / --fstype="xfs" --size=20480 --name=root --vgname=VolGroup
logvol swap --fstype="swap" --size=4096 --name=swap --vgname=VolGroup

%packages
@core
%end

[root@dlp ~]#
chmod 644 /var/www/html/ks/centos8-ks.cfg

[3] For BIOS based clients, Configure like follows.
[root@dlp ~]#
vi /var/lib/tftpboot/pxelinux.cfg/default
# change like follows

default vesamenu.c32
prompt 1
timeout 60

display boot.msg

label linux
  menu label ^Install CentOS 8
  menu default
  kernel centos8/vmlinuz
  append initrd=centos8/initrd.img ip=dhcp inst.ks=http://10.0.0.30/ks/centos8-ks.cfg
.....
.....
[4] For UEFI based clients, Configure like follows.
[root@dlp ~]#
vi /var/lib/tftpboot/grub.cfg
# change like follows

set timeout=30
menuentry 'Install CentOS 8' {
    linuxefi centos8/vmlinuz ip=dhcp inst.ks=http://10.0.0.30/ks/centos8-ks.cfg
    initrdefi centos8/initrd.img
}
[5] Power on a computer which is enabled network booting on BIOS/UEFI settings, then installation process starts and will finish automatically. Below is the state after finishing installation and restarting automatically.
Matched Content