From 036f69602eaa1e47937af899fafa7d67531aaf60 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Tue, 22 Nov 2022 12:57:44 -0700 Subject: [PATCH] flatten specific images, fix vagrant template --- Rocky-9-Azure-Base.ks | 167 ++++++++++++---------- Rocky-9-Azure-LVM.ks | 169 +++++++++++++---------- Rocky-9-OCP.ks | 114 ++++++++------- Rocky-9-Vagrant-Libvirt.ks | 123 +++++++++-------- Rocky-9-Vagrant-VMware.ks | 121 ++++++++-------- Rocky-9-Vagrant-Vbox.ks | 123 +++++++++-------- vagrant/rocky-vagrant-packages-hyperv.ks | 2 +- vagrant/rocky-vagrant-packages.ks | 2 +- 8 files changed, 447 insertions(+), 374 deletions(-) diff --git a/Rocky-9-Azure-Base.ks b/Rocky-9-Azure-Base.ks index 5d4ee01..861ffd4 100644 --- a/Rocky-9-Azure-Base.ks +++ b/Rocky-9-Azure-Base.ks @@ -1,88 +1,56 @@ -text +#version=DEVEL +# Keyboard layouts +keyboard 'us' +# Root password +rootpw --iscrypted thereisnopasswordanditslocked +# System language lang en_US.UTF-8 -keyboard us -timezone UTC --utc -# Disk -bootloader --append="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=auto net.ifnames=0" --location=mbr --timeout=1 +# Shutdown after installation +shutdown +# System timezone +timezone UTC --isUtc +# Use text mode install +text +# Network information +network --bootproto=dhcp --device=link --activate +# Use network installation +url --url="https://download.rockylinux.org/stg/rocky/9/BaseOS/$basearch/os/" +# System authorization information auth --enableshadow --passalgo=sha512 -selinux --enforcing +# Firewall configuration firewall --enabled --service=ssh firstboot --disable -# Network information -network --bootproto=dhcp --device=link --activate --onboot=on -# Root password -services --disabled="kdump" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud-init,cloud-init-local,cloud-config,cloud-final,rngd,waagent" -rootpw --iscrypted thereisnopasswordanditslocked +# SELinux configuration +selinux --enforcing -# Partition Stuff +# System services +services --disabled="kdump,rhsmcertd" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud-init,cloud-init-local,cloud-config,cloud-final,rngd" +# System bootloader configuration +bootloader --append="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=auto net.ifnames=0" --location=mbr --timeout=1 +# Clear the Master Boot Record zerombr -clearpart --all --initlabel -part /boot --fstype xfs --size 1024 --asprimary --ondisk vda -part /boot/efi --fstype vfat --size 512 --asprimary --ondisk vda -reqpart -part / --fstype="xfs" --mkfsoptions "-m bigtime=0,inobtcount=0" --ondisk=vda --size=3000 -shutdown - -%packages -@core -rocky-release -kernel -yum-utils --aic94xx-firmware --alsa-firmware --alsa-lib --alsa-tools-firmware --ivtv-firmware --iwl1000-firmware --iwl100-firmware --iwl105-firmware --iwl135-firmware --iwl2000-firmware --iwl2030-firmware --iwl3160-firmware --iwl3945-firmware --iwl4965-firmware --iwl5000-firmware --iwl5150-firmware --iwl6000-firmware --iwl6000g2a-firmware --iwl6000g2b-firmware --iwl6050-firmware --iwl7260-firmware --libertas-sd8686-firmware --libertas-sd8787-firmware --libertas-usb8388-firmware - -cloud-init -cloud-utils-growpart -gdisk -dracut-config-generic -grub2 -firewalld - -# some stuff that's missing from core or explicitly setting -tar -rsync -dhcp-client -NetworkManager -rng-tools -dnf-utils -chrony -WALinuxAgent -hyperv-daemons - --biosdevname --plymouth --iprutils --langpacks-* --langpacks-en --qemu-guest-agent -%end +# Partition clearing information +clearpart --all --initlabel --disklabel=gpt +# Disk partitioning information +part prepboot --asprimary --fstype="prepboot" --size=4 +part biosboot --asprimary --fstype="biosboot" --size=1 +part /boot/efi --asprimary --fstype="efi" --size=100 +part /boot --asprimary --fstype="xfs" --size=1000 --label=boot +part / --fstype="xfs" --size=8000 --mkfsoptions="-m bigtime=0,inobtcount=0" %post --erroronfail passwd -d root passwd -l root +# Attempting to force legacy BIOS boot if we boot from UEFI +if [ "$(arch)" = "x86_64" ]; then + dnf install grub2-pc-modules grub2-pc -y + grub2-install --target=i386-pc /dev/vda +fi + +# Ensure that the pmbr_boot flag is off +parted /dev/vda disk_set pmbr_boot off + # Common Cloud Tweaks # setup systemd to boot to the right runlevel rm -f /etc/systemd/system/default.target @@ -230,4 +198,55 @@ true %end +%packages +@core +NetworkManager +WALinuxAgent +chrony +cloud-init +cloud-utils-growpart +dhcp-client +dnf-utils +dracut-config-generic +firewalld +gdisk +grub2 +hyperv-daemons +kernel +rng-tools +rocky-release +rsync +tar +yum-utils +-aic94xx-firmware +-alsa-firmware +-alsa-lib +-alsa-tools-firmware +-biosdevname +-iprutils +-ivtv-firmware +-iwl100-firmware +-iwl1000-firmware +-iwl105-firmware +-iwl135-firmware +-iwl2000-firmware +-iwl2030-firmware +-iwl3160-firmware +-iwl3945-firmware +-iwl4965-firmware +-iwl5000-firmware +-iwl5150-firmware +-iwl6000-firmware +-iwl6000g2a-firmware +-iwl6000g2b-firmware +-iwl6050-firmware +-iwl7260-firmware +-langpacks-* +-langpacks-en +-libertas-sd8686-firmware +-libertas-sd8787-firmware +-libertas-usb8388-firmware +-plymouth +-qemu-guest-agent +%end diff --git a/Rocky-9-Azure-LVM.ks b/Rocky-9-Azure-LVM.ks index 336082c..cb32bbb 100644 --- a/Rocky-9-Azure-LVM.ks +++ b/Rocky-9-Azure-LVM.ks @@ -1,90 +1,58 @@ -text +#version=DEVEL +# Keyboard layouts +keyboard 'us' +# Root password +rootpw --iscrypted thereisnopasswordanditslocked +# System language lang en_US.UTF-8 -keyboard us -timezone UTC --utc -# Disk -bootloader --append="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=auto net.ifnames=0" --location=mbr --timeout=1 +# Shutdown after installation +shutdown +# System timezone +timezone UTC --isUtc +# Use text mode install +text +# Network information +network --bootproto=dhcp --device=link --activate +# Use network installation +url --url="https://download.rockylinux.org/stg/rocky/9/BaseOS/$basearch/os/" +# System authorization information auth --enableshadow --passalgo=sha512 -selinux --enforcing +# Firewall configuration firewall --enabled --service=ssh firstboot --disable -# Network information -network --bootproto=dhcp --device=link --activate --onboot=on -# Root password -services --disabled="kdump" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud-init,cloud-init-local,cloud-config,cloud-final,rngd,waagent" -rootpw --iscrypted thereisnopasswordanditslocked +# SELinux configuration +selinux --enforcing -# Partition Stuff +# System services +services --disabled="kdump,rhsmcertd" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud-init,cloud-init-local,cloud-config,cloud-final,rngd" +# System bootloader configuration +bootloader --append="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=auto net.ifnames=0" --location=mbr --timeout=1 +# Clear the Master Boot Record zerombr -clearpart --all --initlabel -part /boot --fstype xfs --size 1024 --asprimary --ondisk vda -part /boot/efi --fstype vfat --size 512 --asprimary --ondisk vda -reqpart -part pv.01 --size=1 --ondisk=vda --grow +# Partition clearing information +clearpart --all --initlabel --disklabel=gpt +# Disk partitioning information +part prepboot --asprimary --fstype="prepboot" --size=4 +part biosboot --asprimary --fstype="biosboot" --size=1 +part /boot/efi --asprimary --fstype="efi" --size=100 +part /boot --asprimary --fstype="xfs" --size=1000 --label=boot +part pv.01 --grow --ondisk=vda --size=1 volgroup rocky pv.01 -logvol / --vgname=rocky --size=8000 --name=root --grow --mkfsoptions "-m bigtime=0,inobtcount=0" -shutdown - -%packages -@core -rocky-release -kernel -yum-utils --aic94xx-firmware --alsa-firmware --alsa-lib --alsa-tools-firmware --ivtv-firmware --iwl1000-firmware --iwl100-firmware --iwl105-firmware --iwl135-firmware --iwl2000-firmware --iwl2030-firmware --iwl3160-firmware --iwl3945-firmware --iwl4965-firmware --iwl5000-firmware --iwl5150-firmware --iwl6000-firmware --iwl6000g2a-firmware --iwl6000g2b-firmware --iwl6050-firmware --iwl7260-firmware --libertas-sd8686-firmware --libertas-sd8787-firmware --libertas-usb8388-firmware - -cloud-init -cloud-utils-growpart -gdisk -dracut-config-generic -grub2 -firewalld - -# some stuff that's missing from core or explicitly setting -tar -rsync -dhcp-client -NetworkManager -rng-tools -dnf-utils -chrony -WALinuxAgent -hyperv-daemons - --biosdevname --plymouth --iprutils --langpacks-* --langpacks-en --qemu-guest-agent -%end +logvol / --grow --size=8000 --mkfsoptions="-m bigtime=0,inobtcount=0" --name=root --vgname=rocky %post --erroronfail passwd -d root passwd -l root +# Attempting to force legacy BIOS boot if we boot from UEFI +if [ "$(arch)" = "x86_64" ]; then + dnf install grub2-pc-modules grub2-pc -y + grub2-install --target=i386-pc /dev/vda +fi + +# Ensure that the pmbr_boot flag is off +parted /dev/vda disk_set pmbr_boot off + # Common Cloud Tweaks # setup systemd to boot to the right runlevel rm -f /etc/systemd/system/default.target @@ -232,4 +200,55 @@ true %end +%packages +@core +NetworkManager +WALinuxAgent +chrony +cloud-init +cloud-utils-growpart +dhcp-client +dnf-utils +dracut-config-generic +firewalld +gdisk +grub2 +hyperv-daemons +kernel +rng-tools +rocky-release +rsync +tar +yum-utils +-aic94xx-firmware +-alsa-firmware +-alsa-lib +-alsa-tools-firmware +-biosdevname +-iprutils +-ivtv-firmware +-iwl100-firmware +-iwl1000-firmware +-iwl105-firmware +-iwl135-firmware +-iwl2000-firmware +-iwl2030-firmware +-iwl3160-firmware +-iwl3945-firmware +-iwl4965-firmware +-iwl5000-firmware +-iwl5150-firmware +-iwl6000-firmware +-iwl6000g2a-firmware +-iwl6000g2b-firmware +-iwl6050-firmware +-iwl7260-firmware +-langpacks-* +-langpacks-en +-libertas-sd8686-firmware +-libertas-sd8787-firmware +-libertas-usb8388-firmware +-plymouth +-qemu-guest-agent +%end diff --git a/Rocky-9-OCP.ks b/Rocky-9-OCP.ks index d639588..554e157 100644 --- a/Rocky-9-OCP.ks +++ b/Rocky-9-OCP.ks @@ -1,38 +1,56 @@ -text -repo --name="BaseOS" --baseurl=http://dl.rockylinux.org/stg/rocky/9/BaseOS/$basearch/os/ -repo --name="AppStream" --baseurl=http://dl.rockylinux.org/stg/rocky/9/AppStream/$basearch/os/ - -url --url http://dl.rockylinux.org/stg/rocky/9/BaseOS/$basearch/os/ - -auth --enableshadow --passalgo=sha512 -reboot -firewall --enabled --service=ssh -firstboot --disable -ignoredisk --only-use=vda -keyboard us +#version=DEVEL +# Keyboard layouts +keyboard 'us' +# Root password +rootpw --iscrypted thereisnopasswordanditslocked # System language lang en_US.UTF-8 -# Network information -network --bootproto=dhcp --device=link --activate --onboot=on -network --hostname=localhost.localdomain -# Root password -rootpw --plaintext rocky -selinux --enforcing -services --disabled="kdump" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud-init,cloud-init-local,cloud-config,cloud-final,rngd" +# Shutdown after installation +shutdown +# System timezone timezone UTC --isUtc -# Disk +# Use text mode install +text +# Network information +network --bootproto=dhcp --device=link --activate +# Use network installation +url --url="https://download.rockylinux.org/stg/rocky/9/BaseOS/$basearch/os/" +# System authorization information +auth --enableshadow --passalgo=sha512 +# Firewall configuration +firewall --enabled --service=ssh +firstboot --disable +# SELinux configuration +selinux --enforcing + +# System services +services --disabled="kdump,rhsmcertd" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud-init,cloud-init-local,cloud-config,cloud-final,rngd" +# System bootloader configuration bootloader --append="console=ttyS0,115200n8 console=tty0 no_timer_check crashkernel=auto net.ifnames=0 LANG=en_US.UTF-8 transparent_hugepage=never rd.luks=0 rd.md=0 rd.dm=0 rd.lvm.vg=rocky rd.lvm.lv=rocky/root rd.net.timeout.dhcp=10" --location=mbr --timeout=1 --boot-drive=vda - -clearpart --all --initlabel --drives vda -part /boot --fstype xfs --size 1024 --asprimary --ondisk vda -part /boot/efi --fstype vfat --size 512 --asprimary --ondisk vda - -part pv.01 --ondisk=vda --size=1 --grow +# Clear the Master Boot Record +zerombr +# Partition clearing information +clearpart --all --initlabel --disklabel=gpt +# Disk partitioning information +part prepboot --asprimary --fstype="prepboot" --size=4 +part biosboot --asprimary --fstype="biosboot" --size=1 +part /boot/efi --asprimary --fstype="efi" --size=100 +part /boot --asprimary --fstype="xfs" --size=1000 --label=boot +part pv.01 --grow --ondisk=vda --size=1 volgroup rocky pv.01 -logvol / --vgname=rocky --size=3000 --name=root --grow +logvol / --grow --size=8000 --mkfsoptions="-m bigtime=0,inobtcount=0" --name=root --vgname=rocky %post --erroronfail +# Attempting to force legacy BIOS boot if we boot from UEFI +if [ "$(arch)" = "x86_64" ]; then + dnf install grub2-pc-modules grub2-pc -y + grub2-install --target=i386-pc /dev/vda +fi + +# Ensure that the pmbr_boot flag is off +parted /dev/vda disk_set pmbr_boot off + # setup systemd to boot to the right runlevel rm -f /etc/systemd/system/default.target ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target @@ -210,9 +228,9 @@ echo "$(date) - OCI initramfs network modification script started." # Symlink network config files where cloud-init >= 19.4 expects them DRACUT_CFG=/run/initramfs/state/etc/sysconfig/network-scripts CI_DIR=/run -if [ -d $DRACUT_CFG ]; then +if [ -d $DRACUT_CFG ]; then FILE_COUNT=`ls $DRACUT_CFG | wc -l` - if [ $FILE_COUNT -eq 0 ]; then + if [ $FILE_COUNT -eq 0 ]; then # Create dummy file if dracut did not create network device config dummycfg=$CI_DIR/net-dummy.conf echo "DEVICE=\"dummy\"" > $dummycfg @@ -223,7 +241,7 @@ if [ -d $DRACUT_CFG ]; then filename=${dcfg##*/} devname=${filename##ifcfg-} cicfg=$CI_DIR/net-$devname.conf - if [ ! -e $cicfg ]; then + if [ ! -e $cicfg ]; then echo "$(date) - Creating symlink from $dcfg to $cicfg." ln -s $dcfg $cicfg fi @@ -238,26 +256,36 @@ true %packages @core +NetworkManager chrony -dnf -yum cloud-init cloud-utils-growpart -NetworkManager +cockpit-system +cockpit-ws +dhcp-client +dnf +dnf-utils dracut-config-generic firewalld gdisk grub2 +iscsi-initiator-utils kernel nfs-utils +python3-jsonschema +qemu-guest-agent +rng-tools +rocky-release rsync tar -dnf-utils +yum yum-utils -aic94xx-firmware -alsa-firmware -alsa-lib -alsa-tools-firmware +-biosdevname +-iprutils -ivtv-firmware -iwl100-firmware -iwl1000-firmware @@ -275,25 +303,11 @@ yum-utils -iwl6000g2b-firmware -iwl6050-firmware -iwl7260-firmware +-langpacks-* +-langpacks-en -libertas-sd8686-firmware -libertas-sd8787-firmware -libertas-usb8388-firmware --biosdevname --iprutils -plymouth -python3-jsonschema -qemu-guest-agent -dhcp-client -cockpit-ws -cockpit-system --langpacks-* --langpacks-en - - -iscsi-initiator-utils - -rocky-release -rng-tools %end - diff --git a/Rocky-9-Vagrant-Libvirt.ks b/Rocky-9-Vagrant-Libvirt.ks index c94f4a6..1d8a832 100644 --- a/Rocky-9-Vagrant-Libvirt.ks +++ b/Rocky-9-Vagrant-Libvirt.ks @@ -1,64 +1,37 @@ -text -keyboard --vckeymap us -lang en_US -skipx -network --bootproto=dhcp --device=link --activate --onboot=on +#version=DEVEL +# Keyboard layouts +keyboard --vckeymap=us +# Root password rootpw --plaintext vagrant -firewall --disabled -timezone --utc UTC -services --enabled=vmtoolsd -# The biosdevname and ifnames options ensure we get "eth0" as our interface -# even in environments like virtualbox that emulate a real NW card -bootloader --timeout=1 --append="no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop" -zerombr -clearpart --all --initlabel -reqpart -part / --fstype=xfs --asprimary --size=1024 --grow - -user --name=vagrant --plaintext --password=vagrant - +# System language +lang en_US +# Shutdown after installation shutdown +user --name=vagrant --password=vagrant +# System timezone +timezone UTC --isUtc +# Use text mode install +text +# Network information +network --bootproto=dhcp --device=link --activate +# Use network installation +url --url="https://download.rockylinux.org/stg/rocky/9/BaseOS/$basearch/os/" +# Firewall configuration +firewall --disabled +# Do not configure the X Window System +skipx -%packages --inst-langs=en -bash-completion -man-pages -bzip2 -rsync -nfs-utils -cifs-utils -chrony -yum-utils -hyperv-daemons -open-vm-tools -# Vagrant boxes aren't normally visible, no need for Plymouth --plymouth -# Microcode updates cannot work in a VM --microcode_ctl -# Firmware packages are not needed in a VM --iwl100-firmware --iwl1000-firmware --iwl105-firmware --iwl135-firmware --iwl2000-firmware --iwl2030-firmware --iwl3160-firmware --iwl3945-firmware --iwl4965-firmware --iwl5000-firmware --iwl5150-firmware --iwl6000-firmware --iwl6000g2a-firmware --iwl6050-firmware --iwl7260-firmware -# Don't build rescue initramfs --dracut-config-rescue -%end - -# kdump needs to reserve 160MB + 2bits/4kB RAM, and automatic allocation only -# works on systems with at least 2GB RAM (which excludes most Vagrant boxes) -# CBS doesn't support %addon yet https://bugs.centos.org/view.php?id=12169 -%addon com_redhat_kdump --disable -%end +# System services +services --enabled="vmtoolsd" +# System bootloader configuration +bootloader --append="no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop" --location=mbr --timeout=1 +reqpart +# Clear the Master Boot Record +zerombr +# Partition clearing information +clearpart --all --initlabel +# Disk partitioning information +part / --asprimary --fstype="xfs" --grow --size=1024 %post # configure swap to a file @@ -151,3 +124,37 @@ rm -rf /etc/ssh/ssh_host_* hostnamectl set-hostname localhost.localdomain rm -rf /etc/udev/rules.d/70-* %end + +%addon com_redhat_kdump --disable +%end +%packages --instLangs=en +bash-completion +bzip2 +chrony +cifs-utils +hyperv-daemons +man-pages +nfs-utils +open-vm-tools +rsync +yum-utils +-dracut-config-rescue +-iwl100-firmware +-iwl1000-firmware +-iwl105-firmware +-iwl135-firmware +-iwl2000-firmware +-iwl2030-firmware +-iwl3160-firmware +-iwl3945-firmware +-iwl4965-firmware +-iwl5000-firmware +-iwl5150-firmware +-iwl6000-firmware +-iwl6000g2a-firmware +-iwl6050-firmware +-iwl7260-firmware +-microcode_ctl +-plymouth + +%end diff --git a/Rocky-9-Vagrant-VMware.ks b/Rocky-9-Vagrant-VMware.ks index 2af3b3e..d5f794f 100644 --- a/Rocky-9-Vagrant-VMware.ks +++ b/Rocky-9-Vagrant-VMware.ks @@ -1,63 +1,37 @@ -text -keyboard --vckeymap us -lang en_US -skipx -network --bootproto=dhcp --device=link --activate --onboot=on +#version=DEVEL +# Keyboard layouts +keyboard --vckeymap=us +# Root password rootpw --plaintext vagrant -firewall --disabled -timezone --utc UTC -services --enabled=vmtoolsd -# The biosdevname and ifnames options ensure we get "eth0" as our interface -# even in environments like virtualbox that emulate a real NW card -bootloader --timeout=1 --append="no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop" -zerombr -clearpart --all --initlabel -reqpart -part / --fstype=xfs --asprimary --size=1024 --grow - -user --name=vagrant --plaintext --password=vagrant - +# System language +lang en_US +# Shutdown after installation shutdown +user --name=vagrant --password=vagrant +# System timezone +timezone UTC --isUtc +# Use text mode install +text +# Network information +network --bootproto=dhcp --device=link --activate +# Use network installation +url --url="https://download.rockylinux.org/stg/rocky/9/BaseOS/$basearch/os/" +# Firewall configuration +firewall --disabled +# Do not configure the X Window System +skipx -%packages --inst-langs=en -bash-completion -man-pages -bzip2 -rsync -nfs-utils -cifs-utils -chrony -yum-utils -open-vm-tools -# Vagrant boxes aren't normally visible, no need for Plymouth --plymouth -# Microcode updates cannot work in a VM --microcode_ctl -# Firmware packages are not needed in a VM --iwl100-firmware --iwl1000-firmware --iwl105-firmware --iwl135-firmware --iwl2000-firmware --iwl2030-firmware --iwl3160-firmware --iwl3945-firmware --iwl4965-firmware --iwl5000-firmware --iwl5150-firmware --iwl6000-firmware --iwl6000g2a-firmware --iwl6050-firmware --iwl7260-firmware -# Don't build rescue initramfs --dracut-config-rescue -%end - -# kdump needs to reserve 160MB + 2bits/4kB RAM, and automatic allocation only -# works on systems with at least 2GB RAM (which excludes most Vagrant boxes) -# CBS doesn't support %addon yet https://bugs.centos.org/view.php?id=12169 -%addon com_redhat_kdump --disable -%end +# System services +services --enabled="vmtoolsd" +# System bootloader configuration +bootloader --append="no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop" --location=mbr --timeout=1 +reqpart +# Clear the Master Boot Record +zerombr +# Partition clearing information +clearpart --all --initlabel +# Disk partitioning information +part / --asprimary --fstype="xfs" --grow --size=1024 %post # configure swap to a file @@ -140,3 +114,36 @@ rm -rf /etc/ssh/ssh_host_* hostnamectl set-hostname localhost.localdomain rm -rf /etc/udev/rules.d/70-* %end + +%addon com_redhat_kdump --disable +%end +%packages --instLangs=en +bash-completion +bzip2 +chrony +cifs-utils +man-pages +nfs-utils +open-vm-tools +rsync +yum-utils +-dracut-config-rescue +-iwl100-firmware +-iwl1000-firmware +-iwl105-firmware +-iwl135-firmware +-iwl2000-firmware +-iwl2030-firmware +-iwl3160-firmware +-iwl3945-firmware +-iwl4965-firmware +-iwl5000-firmware +-iwl5150-firmware +-iwl6000-firmware +-iwl6000g2a-firmware +-iwl6050-firmware +-iwl7260-firmware +-microcode_ctl +-plymouth + +%end diff --git a/Rocky-9-Vagrant-Vbox.ks b/Rocky-9-Vagrant-Vbox.ks index b159856..0bec4f4 100644 --- a/Rocky-9-Vagrant-Vbox.ks +++ b/Rocky-9-Vagrant-Vbox.ks @@ -1,64 +1,37 @@ -text -keyboard --vckeymap us -lang en_US -skipx -network --bootproto=dhcp --device=link --activate --onboot=on +#version=DEVEL +# Keyboard layouts +keyboard --vckeymap=us +# Root password rootpw --plaintext vagrant -firewall --disabled -timezone --utc UTC -services --enabled=vmtoolsd -# The biosdevname and ifnames options ensure we get "eth0" as our interface -# even in environments like virtualbox that emulate a real NW card -bootloader --timeout=1 --append="no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop" -zerombr -clearpart --all --initlabel -reqpart -part / --fstype=xfs --asprimary --size=1024 --grow - -user --name=vagrant --plaintext --password=vagrant - +# System language +lang en_US +# Reboot after installation reboot +user --name=vagrant --password=vagrant +# System timezone +timezone UTC --isUtc +# Use text mode install +text +# Network information +network --bootproto=dhcp --device=link --activate +# Use network installation +url --url="https://download.rockylinux.org/stg/rocky/9/BaseOS/$basearch/os/" +# Firewall configuration +firewall --disabled +# Do not configure the X Window System +skipx -%packages --inst-langs=en -bash-completion -man-pages -bzip2 -rsync -nfs-utils -cifs-utils -chrony -yum-utils -hyperv-daemons -open-vm-tools -# Vagrant boxes aren't normally visible, no need for Plymouth --plymouth -# Microcode updates cannot work in a VM --microcode_ctl -# Firmware packages are not needed in a VM --iwl100-firmware --iwl1000-firmware --iwl105-firmware --iwl135-firmware --iwl2000-firmware --iwl2030-firmware --iwl3160-firmware --iwl3945-firmware --iwl4965-firmware --iwl5000-firmware --iwl5150-firmware --iwl6000-firmware --iwl6000g2a-firmware --iwl6050-firmware --iwl7260-firmware -# Don't build rescue initramfs --dracut-config-rescue -%end - -# kdump needs to reserve 160MB + 2bits/4kB RAM, and automatic allocation only -# works on systems with at least 2GB RAM (which excludes most Vagrant boxes) -# CBS doesn't support %addon yet https://bugs.centos.org/view.php?id=12169 -%addon com_redhat_kdump --disable -%end +# System services +services --enabled="vmtoolsd" +# System bootloader configuration +bootloader --append="no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop" --location=mbr --timeout=1 +reqpart +# Clear the Master Boot Record +zerombr +# Partition clearing information +clearpart --all --initlabel +# Disk partitioning information +part / --asprimary --fstype="xfs" --grow --size=1024 %post # configure swap to a file @@ -165,3 +138,37 @@ rm -rf /etc/ssh/ssh_host_* hostnamectl set-hostname localhost.localdomain rm -rf /etc/udev/rules.d/70-* %end + +%addon com_redhat_kdump --disable +%end +%packages --instLangs=en +bash-completion +bzip2 +chrony +cifs-utils +hyperv-daemons +man-pages +nfs-utils +open-vm-tools +rsync +yum-utils +-dracut-config-rescue +-iwl100-firmware +-iwl1000-firmware +-iwl105-firmware +-iwl135-firmware +-iwl2000-firmware +-iwl2030-firmware +-iwl3160-firmware +-iwl3945-firmware +-iwl4965-firmware +-iwl5000-firmware +-iwl5150-firmware +-iwl6000-firmware +-iwl6000g2a-firmware +-iwl6050-firmware +-iwl7260-firmware +-microcode_ctl +-plymouth + +%end diff --git a/vagrant/rocky-vagrant-packages-hyperv.ks b/vagrant/rocky-vagrant-packages-hyperv.ks index 9fc634a..80a2a4c 100644 --- a/vagrant/rocky-vagrant-packages-hyperv.ks +++ b/vagrant/rocky-vagrant-packages-hyperv.ks @@ -1,4 +1,4 @@ -%packages --inst-langs=en +%packages --instLangs=en bash-completion man-pages bzip2 diff --git a/vagrant/rocky-vagrant-packages.ks b/vagrant/rocky-vagrant-packages.ks index 497638b..4a08ce7 100644 --- a/vagrant/rocky-vagrant-packages.ks +++ b/vagrant/rocky-vagrant-packages.ks @@ -1,4 +1,4 @@ -%packages --inst-langs=en +%packages --instLangs=en bash-completion man-pages bzip2