Skip to content

Commit

Permalink
fix Rocky 9 install. Remove bootloader and undefined variable (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sispheor authored Feb 17, 2025
1 parent fe74120 commit 3ae2c51
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
url ${KS_OS_REPOS} ${KS_PROXY}
url ${KS_BASE_OS_REPOS} ${KS_PROXY}
repo --name="AppStream" ${KS_APPSTREAM_REPOS} ${KS_PROXY}
repo --name="Extras" ${KS_EXTRAS_REPOS} ${KS_PROXY}

Expand Down Expand Up @@ -29,8 +28,8 @@ skipx
# Initial disk setup
# Use the first paravirtualized disk
ignoredisk --only-use=vda
# Place the bootloader on the Master Boot Record
bootloader --location=mbr --driveorder="vda" --timeout=1
# No need for bootloader
bootloader --disabled
# Wipe invalid partition tables
zerombr
# Erase all partitions and assign default labels
Expand Down Expand Up @@ -65,7 +64,7 @@ rm -f /etc/sysconfig/network-scripts/ifcfg-[^lo]*
sed -i 's/^GRUB_TERMINAL=.*/GRUB_TERMINAL_OUTPUT="console"/g' /etc/default/grub
sed -i '/GRUB_SERIAL_COMMAND="serial"/d' /etc/default/grub
sed -ri 's/(GRUB_CMDLINE_LINUX=".*)\s+console=ttyS0(.*")/\1\2/' /etc/default/grub
sed -i 's/GRUB_ENABLE_BLSCFG=.*/GRUB_ENABLE_BLSCFG=false/g' /etc/default/grub
sed -i 's/GRUB_ENABLE_BLSCFG=.*/GRUB_ENABLE_BLSCFG=false/g' /etc/default/grub

yum clean all

Expand Down

2 comments on commit 3ae2c51

@willfurnell
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sispheor Why is there no need for a bootloader in the image? Is that not needed to be able to boot once the install is done?

@Sispheor
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reproduced what is already there on other Rocky images and RHEL based image.
Actually there is a post install script that expect to have only one partition. Adding the bootloader make the install fail at this step.
On MaaS the deployment is wrapped by Curtin which seems to add a bootloader in the end if not present.

Please sign in to comment.