Skip to content

Commit

Permalink
Fix GRUB2 loader commands for Debian/Ubuntu
Browse files Browse the repository at this point in the history
Back in time, GRUB2 is using `linux` and `initrd` loader commands to
load the kernel and initrd into ram on legacy BIOS. Later, `linuxefi`
and `initrdefi` loader commands have been added to do the same on UEFI
platforms as some kind of interim solution. These out-of-tree patches
have been added by the vendors.

First vendors [1] started now to drop patches for `linuxefi`/`initrdefi`
loader commands support, `linux`/`initrd` of course also work under UEFI
then.

Thus, we need to adapt preseed templates to render correct templates
with supported loader commands.

[1]:https://salsa.debian.org/grub-team/grub/-/commit/5cf01c9d98bda554ac2460a6e68e34743a19328f
  • Loading branch information
Jan Löser committed Feb 21, 2025
1 parent f9f1162 commit 1b74a44
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ description: |
os_major = @host.operatingsystem.major.to_i
os_name = @host.operatingsystem.name

if (os_name == 'Ubuntu' && os_major > 12) || (os_name == 'Debian' && os_major > 8)
if (os_name == 'Ubuntu' && os_major > 12 && os_major < 24) || (os_name == 'Debian' && os_major > 8 && os_major < 13)
efi_suffix = 'efi'
else
efi_suffix = ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ test_on:
# System locale
#
<%
efi_suffix = 'efi'
os_major = @host.operatingsystem.major.to_i

if (os_major > 12 && os_major < 24)
efi_suffix = 'efi'
else
efi_suffix = ''
end
-%>

set default=0
Expand Down

0 comments on commit 1b74a44

Please sign in to comment.