From f71a70c0aad2bc4125fd88509fb0d86a2f7d013e Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Tue, 22 Nov 2022 11:25:12 -0700 Subject: [PATCH] flatten new templates for azure, oracle, vagrant --- Rocky-8-Azure-Base.ks | 120 +++++++++++++++++---------------- Rocky-8-Azure-LVM.ks | 125 +++++++++++++++++----------------- Rocky-8-OCP.ks | 82 ++++++++++++++--------- Rocky-8-Vagrant-Libvirt.ks | 133 +++++++++++++++++++------------------ Rocky-8-Vagrant-VMware.ks | 130 +++++++++++++++++++----------------- Rocky-8-Vagrant-Vbox.ks | 133 +++++++++++++++++++------------------ 6 files changed, 382 insertions(+), 341 deletions(-) diff --git a/Rocky-8-Azure-Base.ks b/Rocky-8-Azure-Base.ks index d347c71..71c2659 100644 --- a/Rocky-8-Azure-Base.ks +++ b/Rocky-8-Azure-Base.ks @@ -1,55 +1,60 @@ -text -url --url https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/ - -auth --enableshadow --passalgo=sha512 -shutdown -firewall --enabled --service=ssh -firstboot --disable -ignoredisk --only-use=vda -keyboard us -# System language -lang en_US.UTF-8 -# Network information -network --bootproto=dhcp --device=link --activate --onboot=on -network --hostname=localhost.localdomain +# Keyboard layouts +keyboard 'us' # Root password rootpw --iscrypted thereisnopasswordanditslocked -selinux --enforcing -services --disabled="kdump" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud-init,cloud-init-local,cloud-config,cloud-final,rngd" +# System language +lang en_US.UTF-8 +# Shutdown after installation +shutdown +# System timezone timezone UTC --isUtc -# Disk -bootloader --append="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=auto net.ifnames=0" --location=mbr --timeout=1 --boot-drive=vda -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" --ondisk=vda --maxsize=3000 --grow +# Use text mode install +text +# Network information +network --bootproto=dhcp --device=link --activate +network --bootproto=dhcp --hostname=localhost.localdomain +# Use network installation +url --url="https://download.rockylinux.org/stg/rocky/8/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" --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 +# Partition clearing information +clearpart --all --initlabel --disklabel=gpt +# Disk partitioning information +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" --grow --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 +# This was backported from our 9 kickstarts to address some issues. +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 ### -# pvgrub support -echo -n "Creating grub.conf for pvgrub" -rootuuid=$( awk '$2=="/" { print $1 };' /etc/fstab ) -mkdir /boot/grub -echo -e 'default=0\ntimeout=0\n\n' > /boot/grub/grub.conf -for kv in $( ls -1v /boot/vmlinuz* |grep -v rescue |sed s/.*vmlinuz-// ); do - echo "title Rocky Linux 8 ($kv)" >> /boot/grub/grub.conf - echo -e "\troot (hd0)" >> /boot/grub/grub.conf - echo -e "\tkernel /boot/vmlinuz-$kv ro root=$rootuuid console=hvc0 LANG=en_US.UTF-8" >> /boot/grub/grub.conf - echo -e "\tinitrd /boot/initramfs-$kv.img" >> /boot/grub/grub.conf - echo -done -ln -sf grub.conf /boot/grub/menu.lst -ln -sf /boot/grub/grub.conf /etc/grub.conf - # 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 @@ -244,27 +249,38 @@ true %packages @core +NetworkManager +WALinuxAgent chrony -dnf -yum cloud-init cloud-utils-growpart -NetworkManager +cockpit-system +cockpit-ws +dhcp-client +dnf +dnf-utils dracut-config-generic dracut-norescue firewalld gdisk grub2 +hyperv-daemons 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 @@ -282,25 +298,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 - -rocky-release -rng-tools - -WALinuxAgent -hyperv-daemons - %end diff --git a/Rocky-8-Azure-LVM.ks b/Rocky-8-Azure-LVM.ks index 88b398e..21951f3 100644 --- a/Rocky-8-Azure-LVM.ks +++ b/Rocky-8-Azure-LVM.ks @@ -1,57 +1,63 @@ -text -url --url https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/ - -auth --enableshadow --passalgo=sha512 -shutdown -firewall --enabled --service=ssh -firstboot --disable -ignoredisk --only-use=vda -keyboard us -# System language -lang en_US.UTF-8 -# Network information -network --bootproto=dhcp --device=link --activate --onboot=on -network --hostname=localhost.localdomain +#version=DEVEL +# Keyboard layouts +keyboard 'us' # Root password rootpw --iscrypted thereisnopasswordanditslocked -selinux --enforcing -services --disabled="kdump" --enabled="NetworkManager,sshd,rsyslog,chronyd,cloud-init,cloud-init-local,cloud-config,cloud-final,rngd" +# System language +lang en_US.UTF-8 +# Shutdown after installation +shutdown +# System timezone timezone UTC --isUtc -# Disk -bootloader --append="rootdelay=300 console=ttyS0 earlyprintk=ttyS0 no_timer_check crashkernel=auto net.ifnames=0" --location=mbr --timeout=1 --boot-drive=vda -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 --asprimary --grow -volgroup rocky pv.01 -logvol / --vgname=rocky --size=8000 --name=root --grow +# Use text mode install +text +# Network information +network --bootproto=dhcp --device=link --activate +network --bootproto=dhcp --hostname=localhost.localdomain +# Use network installation +url --url="https://download.rockylinux.org/stg/rocky/8/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" --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 +# Partition clearing information +clearpart --all --initlabel --disklabel=gpt +# Disk partitioning information +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 --asprimary --grow --ondisk=vda --size=1 +volgroup rocky pv.01 +logvol / --grow --size=8000 --name=root --vgname=rocky %post --erroronfail passwd -d root passwd -l root +# Attempting to force legacy BIOS boot if we boot from UEFI +# This was backported from our 9 kickstarts to address some issues. +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 ### -# pvgrub support -echo -n "Creating grub.conf for pvgrub" -rootuuid=$( awk '$2=="/" { print $1 };' /etc/fstab ) -mkdir /boot/grub -echo -e 'default=0\ntimeout=0\n\n' > /boot/grub/grub.conf -for kv in $( ls -1v /boot/vmlinuz* |grep -v rescue |sed s/.*vmlinuz-// ); do - echo "title Rocky Linux 8 ($kv)" >> /boot/grub/grub.conf - echo -e "\troot (hd0)" >> /boot/grub/grub.conf - echo -e "\tkernel /boot/vmlinuz-$kv ro root=$rootuuid console=hvc0 LANG=en_US.UTF-8" >> /boot/grub/grub.conf - echo -e "\tinitrd /boot/initramfs-$kv.img" >> /boot/grub/grub.conf - echo -done -ln -sf grub.conf /boot/grub/menu.lst -ln -sf /boot/grub/grub.conf /etc/grub.conf - # 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 @@ -246,27 +252,38 @@ true %packages @core +NetworkManager +WALinuxAgent chrony -dnf -yum cloud-init cloud-utils-growpart -NetworkManager +cockpit-system +cockpit-ws +dhcp-client +dnf +dnf-utils dracut-config-generic dracut-norescue firewalld gdisk grub2 +hyperv-daemons 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 @@ -284,25 +301,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 - -rocky-release -rng-tools - -WALinuxAgent -hyperv-daemons - %end diff --git a/Rocky-8-OCP.ks b/Rocky-8-OCP.ks index c82ce5f..4ebdc8f 100644 --- a/Rocky-8-OCP.ks +++ b/Rocky-8-OCP.ks @@ -1,36 +1,56 @@ -text -repo --name="oraclelinux-addons" --baseurl=http://yum.oracle.com/repo/OracleLinux/OL8/addons/$basearch/ --install --includepkgs="oci-utils" - -url --url https://download.rockylinux.org/stg/rocky/8/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 -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 +# Use text mode install +text +# Network information +network --bootproto=dhcp --device=link --activate +network --bootproto=dhcp --hostname=localhost.localdomain +repo --name="oraclelinux-addons" --baseurl=http://yum.oracle.com/repo/OracleLinux/OL8/addons/$basearch/ --includepkgs="oci-utils" --install +# Use network installation +url --url="https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/" +# System authorization information +auth --enableshadow --passalgo=sha512 +# Firewall configuration +firewall --enabled --service=ssh +firstboot --disable +# SELinux configuration +selinux --enforcing -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 --asprimary +# System services +services --disabled="kdump" --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 +# Clear the Master Boot Record +zerombr +# Partition clearing information +clearpart --all --initlabel --disklabel=gpt +# Disk partitioning information +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 --asprimary --grow --ondisk=vda --size=1 volgroup rocky pv.01 -logvol / --vgname=rocky --size=3000 --name=root --grow +logvol / --grow --size=8000 --name=root --vgname=rocky %post --erroronfail +# Attempting to force legacy BIOS boot if we boot from UEFI +# This was backported from our 9 kickstarts to address some issues. +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 @@ -213,9 +233,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 @@ -226,7 +246,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 @@ -241,6 +261,7 @@ true %packages @core +NetworkManager chrony cloud-init cloud-utils-growpart @@ -255,7 +276,6 @@ gdisk grub2 iscsi-initiator-utils kernel -NetworkManager nfs-utils oci-utils python3-jsonschema @@ -266,7 +286,6 @@ rsync tar yum yum-utils - -aic94xx-firmware -alsa-firmware -alsa-lib @@ -296,4 +315,5 @@ yum-utils -libertas-sd8787-firmware -libertas-usb8388-firmware -plymouth + %end diff --git a/Rocky-8-Vagrant-Libvirt.ks b/Rocky-8-Vagrant-Libvirt.ks index cf73455..a85bb50 100644 --- a/Rocky-8-Vagrant-Libvirt.ks +++ b/Rocky-8-Vagrant-Libvirt.ks @@ -1,67 +1,38 @@ -url --url https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/ -repo --name=plus --baseurl=http://dl.rockylinux.org/pub/rocky/8/plus/$basearch/os - -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 +repo --name="plus" --baseurl=http://dl.rockylinux.org/pub/rocky/8/plus/$basearch/os +# Use network installation +url --url="https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/" +# Firewall configuration +firewall --disabled +# Do not configure the X Window System +skipx -%packages --instLangs=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 @@ -109,9 +80,9 @@ ex -s /etc/pam.d/su <<'EOF' # allow vagrant to use su, but prevent others from becoming root or vagrant /^account\s\+sufficient\s\+pam_succeed_if.so uid = 0 use_uid quiet$/ :append -account [success=1 default=ignore] \\ - pam_succeed_if.so user = vagrant use_uid quiet -account required pam_succeed_if.so user notin root:vagrant +account [success=1 default=ignore] \\ + pam_succeed_if.so user = vagrant use_uid quiet +account required pam_succeed_if.so user notin root:vagrant . :update :quit @@ -154,3 +125,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-8-Vagrant-VMware.ks b/Rocky-8-Vagrant-VMware.ks index e3c5bb9..e17ea23 100644 --- a/Rocky-8-Vagrant-VMware.ks +++ b/Rocky-8-Vagrant-VMware.ks @@ -1,65 +1,38 @@ -url --url https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/ -repo --name=plus --baseurl=http://dl.rockylinux.org/pub/rocky/8/plus/$basearch/os -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 +repo --name="plus" --baseurl=http://dl.rockylinux.org/pub/rocky/8/plus/$basearch/os +# Use network installation +url --url="https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/" +# Firewall configuration +firewall --disabled +# Do not configure the X Window System +skipx -%packages --instLangs=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 @@ -111,9 +84,9 @@ ex -s /etc/pam.d/su <<'EOF' # allow vagrant to use su, but prevent others from becoming root or vagrant /^account\s\+sufficient\s\+pam_succeed_if.so uid = 0 use_uid quiet$/ :append -account [success=1 default=ignore] \\ - pam_succeed_if.so user = vagrant use_uid quiet -account required pam_succeed_if.so user notin root:vagrant +account [success=1 default=ignore] \\ + pam_succeed_if.so user = vagrant use_uid quiet +account required pam_succeed_if.so user notin root:vagrant . :update :quit @@ -155,3 +128,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-8-Vagrant-Vbox.ks b/Rocky-8-Vagrant-Vbox.ks index b989a64..51cd3e2 100644 --- a/Rocky-8-Vagrant-Vbox.ks +++ b/Rocky-8-Vagrant-Vbox.ks @@ -1,67 +1,38 @@ -url --url https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/ -repo --name=plus --baseurl=http://dl.rockylinux.org/pub/rocky/8/plus/$basearch/os - -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 +# 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 +repo --name="plus" --baseurl=http://dl.rockylinux.org/pub/rocky/8/plus/$basearch/os +# Use network installation +url --url="https://download.rockylinux.org/stg/rocky/8/BaseOS/$basearch/os/" +# Firewall configuration 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 +# Do not configure the X Window System +skipx + +# 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 -part / --fstype=xfs --asprimary --size=1024 --grow - -user --name=vagrant --plaintext --password=vagrant - -reboot - -%packages --instLangs=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 +# 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 @@ -103,9 +74,9 @@ ex -s /etc/pam.d/su <<'EOF' # allow vagrant to use su, but prevent others from becoming root or vagrant /^account\s\+sufficient\s\+pam_succeed_if.so uid = 0 use_uid quiet$/ :append -account [success=1 default=ignore] \\ - pam_succeed_if.so user = vagrant use_uid quiet -account required pam_succeed_if.so user notin root:vagrant +account [success=1 default=ignore] \\ + pam_succeed_if.so user = vagrant use_uid quiet +account required pam_succeed_if.so user notin root:vagrant . :update :quit @@ -168,3 +139,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