generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add QEMU Support for CentOS 9 Stream
- Loading branch information
1 parent
0c6b616
commit b9ff4e6
Showing
3 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# version=RHEL9 | ||
# Install OS instead of upgrade | ||
cdrom | ||
authselect --enableshadow --passalgo=sha512 --kickstart | ||
# License agreement | ||
eula --agreed | ||
# Use text mode install | ||
text | ||
# Disable Initial Setup on first boot | ||
firstboot --disable | ||
# Keyboard layout | ||
keyboard --vckeymap=us --xlayouts='us' | ||
# System language | ||
lang en_US.UTF-8 | ||
# Network information | ||
network --bootproto=dhcp --device=link --activate | ||
network --hostname=centos9 | ||
firewall --disabled | ||
# Root password | ||
rootpw builder --plaintext | ||
# SELinux configuration | ||
selinux --permissive | ||
# Do not configure the X Window System | ||
skipx | ||
# System timezone | ||
timezone UTC | ||
# Add a user named builder | ||
user --groups=wheel --name=builder --password=builder --plaintext --gecos="builder" | ||
|
||
# System bootloader configuration | ||
bootloader --location=mbr --boot-drive=sda | ||
# Clear the Master Boot Record | ||
zerombr | ||
clearpart --all --initlabel --drives=sda | ||
part / --fstype="ext4" --grow --asprimary --label=slash --ondisk=sda | ||
|
||
# Reboot after successful installation | ||
reboot | ||
|
||
%packages --ignoremissing --excludedocs | ||
# dnf group info minimal-environment | ||
@^minimal-environment | ||
@core | ||
openssh-server | ||
sed | ||
sudo | ||
python3 | ||
|
||
# Exclude unnecessary firmwares | ||
-iwl*firmware | ||
%end | ||
|
||
# Enable/disable the following services | ||
services --enabled=sshd | ||
|
||
%post --nochroot --logfile=/mnt/sysimage/root/ks-post.log | ||
# Disable quiet boot and splash screen | ||
sed --follow-symlinks -i "s/ rhgb quiet//" /mnt/sysimage/etc/default/grub | ||
sed --follow-symlinks -i "s/ rhgb quiet//" /mnt/sysimage/boot/grub2/grubenv | ||
|
||
# Passwordless sudo for the user 'builder' | ||
echo "builder ALL=(ALL) NOPASSWD: ALL" >> /mnt/sysimage/etc/sudoers.d/builder | ||
# Remove the package cache | ||
yum -y clean all | ||
|
||
# Disable swap | ||
swapoff -a | ||
rm -f /swapfile | ||
sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab | ||
|
||
sed -i '/^\(HWADDR\|UUID\)=/d' /etc/sysconfig/network-scripts/ifcfg-* | ||
|
||
%end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"ansible_extra_vars": "ansible_python_interpreter=/usr/bin/python extra_arguments =vvvv", | ||
"boot_command_prefix": "<tab> text inst.ks=", | ||
"boot_command_suffix": "/9/ks.cfg<enter><wait><enter>", | ||
"boot_media_path": "http://{{ .HTTPIP }:{{ .HTTPPort }}", | ||
"build_name": "centos-9", | ||
"distribution_version": "9", | ||
"distro_arch": "amd64", | ||
"distro_name": "centos", | ||
"distro_version": "9", | ||
"epel_rpm_gpg_key": "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9", | ||
"guest_os_type": "centos9-64", | ||
"iso_checksum": "2080b8ff7b4bd06982323a8bf3d1c030678b48656e5c6d12e79c22a838e2490e", | ||
"iso_checksum_type": "sha256", | ||
"iso_url": "https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/iso/CentOS-Stream-9-20231211.0-x86_64-dvd1.iso", | ||
"os_display_name": "CentOS 9 Stream", | ||
"redhat_epel_rpm": "https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm", | ||
"shutdown_command": "/sbin/halt -h -p" | ||
} |