diff --git a/Rocky-8-Vagrant-Libvirt.ks b/Rocky-8-Vagrant-Libvirt.ks index c5c8257..1ae0002 100644 --- a/Rocky-8-Vagrant-Libvirt.ks +++ b/Rocky-8-Vagrant-Libvirt.ks @@ -37,6 +37,15 @@ part /boot --size=1000 --fstype=xfs --asprimary --label=boot part / --size=8000 --fstype="xfs" --mkfsoptions "-m bigtime=0,inobtcount=0" --grow %post +# 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 + # configure swap to a file fallocate -l 2G /swapfile chmod 600 /swapfile diff --git a/Rocky-8-Vagrant-VMware.ks b/Rocky-8-Vagrant-VMware.ks index 608faeb..a4d7611 100644 --- a/Rocky-8-Vagrant-VMware.ks +++ b/Rocky-8-Vagrant-VMware.ks @@ -37,6 +37,15 @@ part /boot --size=1000 --fstype=xfs --asprimary --label=boot part / --size=8000 --fstype="xfs" --mkfsoptions "-m bigtime=0,inobtcount=0" --grow %post +# 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 + # configure swap to a file fallocate -l 2G /swapfile chmod 600 /swapfile diff --git a/Rocky-8-Vagrant-Vbox.ks b/Rocky-8-Vagrant-Vbox.ks index 8704af2..8d2178d 100644 --- a/Rocky-8-Vagrant-Vbox.ks +++ b/Rocky-8-Vagrant-Vbox.ks @@ -37,6 +37,15 @@ part /boot --size=1000 --fstype=xfs --asprimary --label=boot part / --size=8000 --fstype="xfs" --mkfsoptions "-m bigtime=0,inobtcount=0" --grow %post +# 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 + # configure swap to a file fallocate -l 2G /swapfile chmod 600 /swapfile diff --git a/vagrant/rocky-vagrant-libvirt.ks b/vagrant/rocky-vagrant-libvirt.ks index ffbc862..89cfa3e 100644 --- a/vagrant/rocky-vagrant-libvirt.ks +++ b/vagrant/rocky-vagrant-libvirt.ks @@ -2,6 +2,15 @@ %include rocky-vagrant-packages-hyperv.ks %post +# 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 + # configure swap to a file fallocate -l 2G /swapfile chmod 600 /swapfile diff --git a/vagrant/rocky-vagrant-vbox.ks b/vagrant/rocky-vagrant-vbox.ks index b138c3b..0b8699a 100644 --- a/vagrant/rocky-vagrant-vbox.ks +++ b/vagrant/rocky-vagrant-vbox.ks @@ -2,6 +2,15 @@ %include rocky-vagrant-packages-hyperv.ks %post +# 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 + # configure swap to a file fallocate -l 2G /swapfile chmod 600 /swapfile diff --git a/vagrant/rocky-vagrant-vmware.ks b/vagrant/rocky-vagrant-vmware.ks index 4bd16ee..4158c13 100644 --- a/vagrant/rocky-vagrant-vmware.ks +++ b/vagrant/rocky-vagrant-vmware.ks @@ -2,6 +2,15 @@ %include rocky-vagrant-packages.ks %post +# 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 + # configure swap to a file fallocate -l 2G /swapfile chmod 600 /swapfile