Merge ~xnox/maas:compatible-grub.cfg into maas:master

Proposed by Dimitri John Ledkov
Status: Work in progress
Proposed branch: ~xnox/maas:compatible-grub.cfg
Merge into: maas:master
Diff against target: 43 lines (+16/-0)
2 files modified
src/provisioningserver/boot/install_grub.py (+8/-0)
src/provisioningserver/boot/uefi_amd64.py (+8/-0)
Reviewer Review Type Date Requested Status
Dimitri John Ledkov (community) Disapprove
MAAS Lander Approve
MAAS Maintainers Pending
Review via email: mp+397528@code.launchpad.net

Commit message

provisioningserver: generate grub.cfg suitable for both arm64 & amd64

This grub.cfg provisioning enrollment grub.cfg is suitable to be booted by either secureboot signed grub arm64 build, or the older unsigned network boot grub arm64 build as produced by bootloaders maas-images build.

This change will allow for the current/new maas to use either the current arm64 grub builds, or the new secureboot signed arm64 grub builds.

This alone will not obviously enable older/stable maas to use arm64 secureboot signed grub. But this change might be easy enough to backport to older maas series.

I did not test this, but it is the right syntax.

To post a comment you must log in.
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b compatible-grub.cfg lp:~xnox/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: c12d85dc4c391fe1ef0750748d2a8477940310c6

review: Approve
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

however this will not do much good.

this will allow to use the old bootloaders with new maas; but that is not a problem, cause we can make new maas use new bootloaders revisions too.

the issue is more pressing with making the new bootloader work with old maas, which might not be upgraded at all.

review: Disapprove

Unmerged commits

c12d85d... by Dimitri John Ledkov

provisioningserver: generate grub.cfg suitable for both arm64 & amd64

This grub.cfg provisioning enrollment grub.cfg is suitable to be
booted by either secureboot signed grub arm64 build, or the older
unsigned network boot grub arm64 build as produced by bootloaders
maas-images build.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/src/provisioningserver/boot/install_grub.py b/src/provisioningserver/boot/install_grub.py
index 27ebd36..b43b8ed 100644
--- a/src/provisioningserver/boot/install_grub.py
+++ b/src/provisioningserver/boot/install_grub.py
@@ -15,9 +15,17 @@ CONFIG_FILE = """
15# Load based on MAC address first.15# Load based on MAC address first.
16configfile /grub/grub.cfg-${net_default_mac}16configfile /grub/grub.cfg-${net_default_mac}
1717
18if [ "$platform" = "x86_64-efi" ]; then
18# Failed to load based on MAC address.19# Failed to load based on MAC address.
19# Load amd64 by default, UEFI only supported by 64-bit20# Load amd64 by default, UEFI only supported by 64-bit
20configfile /grub/grub.cfg-default-amd6421configfile /grub/grub.cfg-default-amd64
22fi
23
24if [ "$platform" = "arm64-efi" ]; then
25# Failed to load based on MAC address.
26# Load arm64 by default, UEFI only supported by 64-bit
27configfile /grub/grub.cfg-default-arm64
28fi
21"""29"""
2230
2331
diff --git a/src/provisioningserver/boot/uefi_amd64.py b/src/provisioningserver/boot/uefi_amd64.py
index 4e42c78..5a73dec 100644
--- a/src/provisioningserver/boot/uefi_amd64.py
+++ b/src/provisioningserver/boot/uefi_amd64.py
@@ -26,9 +26,17 @@ CONFIG_FILE = dedent(
26 # Load based on MAC address first.26 # Load based on MAC address first.
27 configfile (pxe)/grub/grub.cfg-${net_default_mac}27 configfile (pxe)/grub/grub.cfg-${net_default_mac}
2828
29 if [ "$platform" = "x86_64-efi" ]; then
29 # Failed to load based on MAC address.30 # Failed to load based on MAC address.
30 # Load amd64 by default, UEFI only supported by 64-bit31 # Load amd64 by default, UEFI only supported by 64-bit
31 configfile (pxe)/grub/grub.cfg-default-amd6432 configfile (pxe)/grub/grub.cfg-default-amd64
33 fi
34
35 if [ "$platform" = "arm64-efi" ]; then
36 # Failed to load based on MAC address.
37 # Load arm64 by default, UEFI only supported by 64-bit
38 configfile (pxe)/grub/grub.cfg-default-arm64
39 fi
32 """40 """
33)41)
3442

Subscribers

People subscribed via source and target branches