Skip to content

Commit

Permalink
Fixes #36189 - Add AlmaLinux UEFI provisioning support
Browse files Browse the repository at this point in the history
In pxegrub2_chainload.erb various paths are tried, but the
/EFI/almalinux/grubx64.efi path is missing. This causes the server
to refuse to boot.

To make it easier to use the AlmaLinux installation medium is added.
  • Loading branch information
omenos committed Mar 10, 2023
1 parent 405971f commit dc9c885
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 4 deletions.
Expand Up @@ -12,7 +12,7 @@ description: |
<%
# Grub1 only supports numeric default statement, this allows conversion to number. First define
# array of directories we will search for EFI booloaders:
paths = ["fedora", "redhat", "centos", "rocky", "debian", "ubuntu", "sles", "opensuse", "Microsoft", "EFI"]
paths = ["fedora", "redhat", "centos", "rocky", "almalinux", "debian", "ubuntu", "sles", "opensuse", "Microsoft", "EFI"]
# Add remaining entries to it and use this to convert to number:
items = paths.push("local_chain_hd0")
# Read default setting but since "local" is missing, use the first path available.
Expand Down
Expand Up @@ -11,7 +11,7 @@ description: |
<%
# Grub1 only supports numeric default statement, this allows conversion to number. First define
# array of directories we will search for EFI booloaders:
paths = ["fedora", "redhat", "centos", "rocky", "debian", "ubuntu", "sles", "opensuse", "Microsoft", "EFI"]
paths = ["fedora", "redhat", "centos", "rocky", "almalinux", "debian", "ubuntu", "sles", "opensuse", "Microsoft", "EFI"]
# Add remaining entries to it and use this to convert to number:
items = paths.push("local_chain_hd0", "discovery")
# Read default setting but since "local" is missing, use the first path available.
Expand Down
Expand Up @@ -18,6 +18,8 @@ description: |
'/EFI/centos/grubx64.efi',
'/EFI/rocky/shim.efi',
'/EFI/rocky/grubx64.efi',
'/EFI/almalinux/shim.efi',
'/EFI/almalinux/grubx64.efi',
'/EFI/debian/grubx64.efi',
'/EFI/ubuntu/grubx64.efi',
'/EFI/sles/grubx64.efi',
Expand Down
5 changes: 5 additions & 0 deletions db/seeds.d/100-installation_media.rb
Expand Up @@ -65,6 +65,11 @@
:os_family => "Redhat",
:path => "https://download.rockylinux.org/pub/rocky/$version/BaseOS/$arch/os",
},
{
:name => "AlmaLinux",
:os_family => "Redhat",
:path => "https://repo.almalinux.org/almalinux/$version/BaseOS/$arch/os/",
},
{
:name => "CoreOS mirror",
:os_family => "Coreos",
Expand Down
Expand Up @@ -2,7 +2,7 @@
default=0
timeout=20

fallback=1 2 3 4 5 6 7 8 9 10 11
fallback=1 2 3 4 5 6 7 8 9 10 11 12

title Chainload Grub from /EFI/fedora or try next
rootnoverify (hd0,0)
Expand All @@ -20,6 +20,10 @@ title Chainload Grub from /EFI/rocky or try next
rootnoverify (hd0,0)
chainloader /EFI/rocky/grubx64.efi

title Chainload Grub from /EFI/almalinux or try next
rootnoverify (hd0,0)
chainloader /EFI/almalinux/grubx64.efi

title Chainload Grub from /EFI/debian or try next
rootnoverify (hd0,0)
chainloader /EFI/debian/grubx64.efi
Expand Down
Expand Up @@ -2,7 +2,7 @@
default=0
timeout=20

fallback=1 2 3 4 5 6 7 8 9 10 11 12
fallback=1 2 3 4 5 6 7 8 9 10 11 12 13

title Chainload Grub from /EFI/fedora or try next
rootnoverify (hd0,0)
Expand All @@ -20,6 +20,10 @@ title Chainload Grub from /EFI/rocky or try next
rootnoverify (hd0,0)
chainloader /EFI/rocky/grubx64.efi

title Chainload Grub from /EFI/almalinux or try next
rootnoverify (hd0,0)
chainloader /EFI/almalinux/grubx64.efi

title Chainload Grub from /EFI/debian or try next
rootnoverify (hd0,0)
chainloader /EFI/debian/grubx64.efi
Expand Down
Expand Up @@ -103,6 +103,26 @@ menuentry 'Chainload Grub2 EFI from ESP' --id local_chain_hd0 {
sleep 2
boot
fi
echo "Trying /EFI/almalinux/shim.efi "
unset chroot
# add --efidisk-only when using Software RAID
search --file --no-floppy --set=chroot /EFI/almalinux/shim.efi
if [ -f ($chroot)/EFI/almalinux/shim.efi ]; then
chainloader ($chroot)/EFI/almalinux/shim.efi
echo "Found /EFI/almalinux/shim.efi at $chroot, attempting to chainboot it..."
sleep 2
boot
fi
echo "Trying /EFI/almalinux/grubx64.efi "
unset chroot
# add --efidisk-only when using Software RAID
search --file --no-floppy --set=chroot /EFI/almalinux/grubx64.efi
if [ -f ($chroot)/EFI/almalinux/grubx64.efi ]; then
chainloader ($chroot)/EFI/almalinux/grubx64.efi
echo "Found /EFI/almalinux/grubx64.efi at $chroot, attempting to chainboot it..."
sleep 2
boot
fi
echo "Trying /EFI/debian/grubx64.efi "
unset chroot
# add --efidisk-only when using Software RAID
Expand Down
Expand Up @@ -119,6 +119,26 @@ menuentry 'Chainload Grub2 EFI from ESP' --id local_chain_hd0 {
sleep 2
boot
fi
echo "Trying /EFI/almalinux/shim.efi "
unset chroot
# add --efidisk-only when using Software RAID
search --file --no-floppy --set=chroot /EFI/almalinux/shim.efi
if [ -f ($chroot)/EFI/almalinux/shim.efi ]; then
chainloader ($chroot)/EFI/almalinux/shim.efi
echo "Found /EFI/almalinux/shim.efi at $chroot, attempting to chainboot it..."
sleep 2
boot
fi
echo "Trying /EFI/almalinux/grubx64.efi "
unset chroot
# add --efidisk-only when using Software RAID
search --file --no-floppy --set=chroot /EFI/almalinux/grubx64.efi
if [ -f ($chroot)/EFI/almalinux/grubx64.efi ]; then
chainloader ($chroot)/EFI/almalinux/grubx64.efi
echo "Found /EFI/almalinux/grubx64.efi at $chroot, attempting to chainboot it..."
sleep 2
boot
fi
echo "Trying /EFI/debian/grubx64.efi "
unset chroot
# add --efidisk-only when using Software RAID
Expand Down
Expand Up @@ -99,6 +99,26 @@ menuentry 'Chainload Grub2 EFI from ESP' --id local_chain_hd0 {
sleep 2
boot
fi
echo "Trying /EFI/almalinux/shim.efi "
unset chroot
# add --efidisk-only when using Software RAID
search --file --no-floppy --set=chroot /EFI/almalinux/shim.efi
if [ -f ($chroot)/EFI/almalinux/shim.efi ]; then
chainloader ($chroot)/EFI/almalinux/shim.efi
echo "Found /EFI/almalinux/shim.efi at $chroot, attempting to chainboot it..."
sleep 2
boot
fi
echo "Trying /EFI/almalinux/grubx64.efi "
unset chroot
# add --efidisk-only when using Software RAID
search --file --no-floppy --set=chroot /EFI/almalinux/grubx64.efi
if [ -f ($chroot)/EFI/almalinux/grubx64.efi ]; then
chainloader ($chroot)/EFI/almalinux/grubx64.efi
echo "Found /EFI/almalinux/grubx64.efi at $chroot, attempting to chainboot it..."
sleep 2
boot
fi
echo "Trying /EFI/debian/grubx64.efi "
unset chroot
# add --efidisk-only when using Software RAID
Expand Down

0 comments on commit dc9c885

Please sign in to comment.