# Links # https://www.golinuxcloud.com/rhel-centos-8-kickstart-example-generator/ # https://www.golinuxhub.com/2018/05/sample-kickstart-partition-example-raid/ # Create a CentOS Boot image # https://serverfault.com/questions/517908/how-to-create-a-custom-iso-image-in-centos text #autostep --autoscreenshot #url --url=https://nexus.iwanclement.eu/repository/sources/OS/CentOS/ISO/CentOS-8.2.2004-x86_64-dvd1.iso #nfs --server=10.9.240.69 --dir=/shared/isos/centos8-dvd cdrom # Keyboard layouts keyboard --vckeymap=fr --xlayouts='fr' #keyboard --vckeymap=us --xlayouts='us' # System language #lang fr_FR.UTF-8 lang en_US.UTF8 --addsupport=en_UK.UTF8,fr_FR.UTF8 # Network information # network --bootproto=static --ip=10.10.10.15 --netmask=255.255.255.0 --gateway=10.10.10.1 --nameserver=8.8.8.8 --device=eth0 network --bootproto=dhcp --device=eth0 --activate # network --bootproto=dhcp --device=eth1 --onboot=off --activate network --hostname=redhat.ivanclement.maison # Root password #rootpw --iscrypted $6$w7El/FYx9mbTG6x9$Te.Yg6dq0TsQwGpdSjeDGSw4J9ZBAkLXzT9ODMV7I7lHvX3n5.9PCS4jIkS2GbVLZOpVRLvrua3wwbwA.cfWX. #rootpw --plaintext Tagada rootpw --iscrypted $6$rounds=4096$9rMejHwwSN5svKna$nZoRElw3IfyuNWOK7oYtfEK5bYfjdzmFmo536G8lFb.2plTb7AACGfQqUocstWY6QH8.Be7C1g78FncXE7wvc0 # Run the Setup Agent on first boot # firstboot --enable #firstboot --enable --reconfig firstboot --disable # Do not configure the X Window System skipx # System timezone #timezone Asia/Kolkata --isUtc #timezone Europe/Paris --isUtc timezone Europe/Paris --isUtc # Create user user --name=firstuser --shell=/bin/bash --homedir=/home/firstuser --groups=wheel --iscrypted --password=$6$rounds=4096$/uJYhTHVUVcI6fZ3$q0xr5HN5VcIArDFTtZqUtXaZzq7/SAUUnFly0qf6lgBDqF0zaJF8KfnaO8nWqFmpMRE/Zdr5cunF/zY4XD7sH1 sshkey --username=firstuser "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDMxyXCCF7QuQDIRafwmCNwgLYuegQdJFy3L68itWBKr iwan@T480Buntu" sshkey --username=root "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDMxyXCCF7QuQDIRafwmCNwgLYuegQdJFy3L68itWBKr iwan@T480Buntu" # Configure repositories repo --name=epel --metalink='https://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&arch=$basearch&infra=$infra&content=$contentdir' #repo --name=repoid [--baseurl=url|--mirrorlist=url|--metalink=url] [OPTIONS] #repo --name=epel --metalink='https://mirrors.fedoraproject.org/metalink?repo=epel-modular-$releasever&arch=$basearch&infra=$infra&content=$contentdir' --cost=1 #repo --install --name=epel --metalink='https://mirrors.fedoraproject.org/metalink?repo=epel-modular-$releasever&arch=$basearch&infra=$infra&content=$contentdir' # Reboot the node reboot #halt #poweroff # Firewall configuration #firewall --enabled|--disabled [incoming] [OPTIONS] #firewall --disabled firewall --enabled --ssh # password Polixy %anaconda pwpolicy root --minlen=28 --minquality=50 --strict --changesok --notempty pwpolicy user --minlen=12 --minquality=25 --notstrict --changesok --emptyok # pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty %end # SeLinux configuration #selinux [--disabled|--enforcing|--permissive] #selinux --permissive # Packages installation %packages #epel-release sudo qemu-guest-agent # qemu-guest-agent # less # wget # curl %end # Partition clearing information #clearpart --all clearpart --all --initlabel ignoredisk --only-use=sda #part /boot --size 640 --asprimary --fstype=ext4 --ondrive=sda part /boot --size 640 --asprimary --fstype=ext4 --ondrive=sda --fsoptions='nodev,noexec,nosuid' part pv.1 --size 1 --grow --ondrive=sda volgroup system-vg --pesize=32768 pv.1 #logvol / --fstype=xfs --vgname=system-vg --size=512 --name=ROOT #logvol / --fstype=xfs --vgname=system-vg --size=512 --name=ROOT --fsoptions='noexec,nosuid' logvol / --fstype=xfs --vgname=system-vg --size=512 --name=ROOT --fsoptions='nosuid' logvol swap --vgname=system-vg --size=4096 --name=SWAP logvol /usr --fstype=xfs --vgname=system-vg --size=5120 --name=USR --fsoptions='nodev' #logvol /opt --fstype=xfs --vgname=system-vg --size=1024 --name=OPT --fsoptions='nodev' logvol /opt --fstype=xfs --vgname=system-vg --size=5120 --name=OPT --fsoptions='nodev,nosuid' logvol /tmp --fstype=xfs --vgname=system-vg --size=2048 --name=TMP --fsoptions='nodev,noexec,nosuid' #logvol /var --fstype=xfs --vgname=system-vg --size=2048 --name=VAR --fsoptions='nodev' logvol /var --fstype=xfs --vgname=system-vg --size=1024 --name=VAR --fsoptions='nodev,noexec,nosuid' logvol /var/lib --fstype=xfs --vgname=system-vg --size=1024 --name=VARLIB --fsoptions='nodev,nosuid' logvol /var/log --fstype=xfs --vgname=system-vg --size=2048 --name=VARLOG --fsoptions='nodev,noexec,nosuid' logvol /var/cache --vgname=system-vg --size=4096 --fstype=xfs --name=VARCACHE --fsoptions='nodev,noexec,nosuid' logvol /var/tmp --vgname=system-vg --size=2048 --fstype=xfs --name=VARTMP --fsoptions='nodev,noexec,nosuid' logvol /var/crash --vgname=system-vg --size=2048 --fstype=xfs --name=VARCRASH --fsoptions='nodev,noexec,nosuid' logvol /home --vgname=system-vg --size=2048 --fstype=xfs --name=HOME --fsoptions='nodev,nosuid'