This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:centos_redhat_kickstart [2021/08/24 12:47] manu |
linux:centos_redhat_kickstart [2021/08/26 16:59] (current) manu |
||
---|---|---|---|
Line 15: | Line 15: | ||
# mkdir /tmp/rhel8 | # mkdir /tmp/rhel8 | ||
# cp -avRf /mnt/* /tmp/rhel8 | # cp -avRf /mnt/* /tmp/rhel8 | ||
+ | # cp -avRf /mnt/.discinfo /mnt/.treeinfo /tmp/rhel8 | ||
</cli> | </cli> | ||
- | //Note:// All files including .<file> must also be copied, else the stage2 won't be loaded. | + | **//Note://** All files including .<file> must also be copied, else the stage2 won't be loaded. |
Copy your kickstart file into the temporary folder (name must be ks.cfg) | Copy your kickstart file into the temporary folder (name must be ks.cfg) | ||
Line 29: | Line 30: | ||
https://github.com/jivoi/scripts/blob/master/kickstart/ks.cfg | https://github.com/jivoi/scripts/blob/master/kickstart/ks.cfg | ||
| | ||
+ | Or use the configurator | ||
+ | https://access.redhat.com/labs/kickstartconfig/ | ||
+ | |||
+ | Ex: | ||
+ | <code> | ||
+ | lang en_US.UTF-8 | ||
+ | keyboard fr_CH | ||
+ | #platform IBM pSeries | ||
+ | reboot | ||
+ | text | ||
+ | cdrom | ||
+ | bootloader --location=partition --append="rhgb quiet crashkernel=auto" | ||
+ | zerombr | ||
+ | clearpart --all --initlabel | ||
+ | autopart | ||
+ | auth --passalgo=sha512 --useshadow | ||
+ | |||
+ | # Network information | ||
+ | network --bootproto=dhcp --device=env2 --interfacename=env2 --activate --ipv6=auto | ||
+ | network --bootproto=dhcp --device=env3 --interfacename=env3 --onboot=off --noipv6 | ||
+ | network --hostname=lnx100 | ||
+ | # Root password | ||
+ | rootpw --iscrypted $6$c12345siBmU$fko/4zLgIGBumF8p.Jp1nndgZ0 | ||
+ | # System authorization information | ||
+ | auth --passalgo=sha512 --useshadow | ||
+ | # SELinux configuration | ||
+ | selinux --disabled | ||
+ | firstboot --disable | ||
+ | # Do not configure the X Window System | ||
+ | skipx | ||
+ | # System services | ||
+ | services --enabled="chronyd" | ||
+ | services --disabled="libvirtd" | ||
+ | # System timezone | ||
+ | timezone Europe/Luxembourg --isUtc | ||
+ | |||
+ | # Disk partitioning information | ||
+ | ignoredisk --only-use=mpatha | ||
+ | clearpart --all --initlabel --drives=mpatha | ||
+ | |||
+ | part pv.590 --fstype="lvmpv" --ondisk=mpatha --size=16392 --grow | ||
+ | part prepboot --fstype="prepboot" --ondisk=mpatha --size=10 | ||
+ | part /boot --fstype="xfs" --ondisk=mpatha --size=1005 | ||
+ | volgroup rootvg --pesize=4096 pv.590 | ||
+ | logvol / --fstype="xfs" --size=3072 --name=root --vgname=rootvg | ||
+ | logvol /usr --fstype="xfs" --size=3072 --name=usr --vgname=rootvg | ||
+ | logvol /var --fstype="xfs" --size=3072 --name=var --vgname=rootvg | ||
+ | logvol /tmp --fstype="xfs" --size=1024 --name=tmp --vgname=rootvg | ||
+ | logvol /home --fstype="xfs" --size=1024 --name=home --vgname=rootvg | ||
+ | logvol swap --fstype="swap" --size=2048 --name=swap --vgname=rootvg | ||
+ | |||
+ | %packages | ||
+ | @^custom-environment | ||
+ | @standard | ||
+ | nfs-utils | ||
+ | @network-tools | ||
+ | @backup-client | ||
+ | rear | ||
+ | %end | ||
+ | |||
+ | %post | ||
+ | ( | ||
+ | set -x | ||
+ | echo | ||
+ | echo "################################" | ||
+ | echo "# Running Post Configuration #" | ||
+ | echo "################################" | ||
+ | |||
+ | #Update system | ||
+ | rm -rf /var/cache/yum/timedhosts.txt | ||
+ | yum update -y | ||
+ | ) > /root/post_install.log 2>&1 | ||
+ | |||
+ | %end | ||
+ | </code> | ||
+ | |||
Check the LABEL of the DVD iso. | Check the LABEL of the DVD iso. | ||
<cli prompt='#'> | <cli prompt='#'> | ||
Line 34: | Line 111: | ||
</cli> | </cli> | ||
- | Add the stanza in /tmp/rhel7/isolinux/isolinux.cfg file as follows. | + | Add the stanza in **/tmp/rhel8/isolinux/isolinux.cfg** file as follows. |
Make sure that the stanza has inst.stage2 and the correct label. | Make sure that the stanza has inst.stage2 and the correct label. |