From 0b2fc1382bf58d5c5c84e7d793f4642a985a5a07 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 6 Mar 2024 17:26:45 -0800 Subject: [PATCH] bootupd: call bootupctl with --update-firmware This is required to write an entry to the EFI boot manager, which we ought to do (anaconda does it when installing the bootloader itself). Without this, boot of the installed system will only work if it's configured to try and boot from the hard disk using the fallback path. Signed-off-by: Adam Williamson --- .../modules/payloads/payload/rpm_ostree/installation.py | 1 + .../modules/payloads/payload/test_rpm_ostree_tasks.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyanaconda/modules/payloads/payload/rpm_ostree/installation.py b/pyanaconda/modules/payloads/payload/rpm_ostree/installation.py index 0ac8583b781..f5ea666cf27 100644 --- a/pyanaconda/modules/payloads/payload/rpm_ostree/installation.py +++ b/pyanaconda/modules/payloads/payload/rpm_ostree/installation.py @@ -520,6 +520,7 @@ def _install_bootupd(self): "install", "--auto", "--write-uuid", + "--update-firmware", "--device", dev_data.path, "/", diff --git a/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_rpm_ostree_tasks.py b/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_rpm_ostree_tasks.py index 264ad82c14b..4b951231bd5 100644 --- a/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_rpm_ostree_tasks.py +++ b/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_rpm_ostree_tasks.py @@ -777,8 +777,8 @@ def test_bootupd_run(self, devdata_mock, storage_mock, symlink_mock, rename_mock exec_mock.assert_has_calls([ call( "bootupctl", - ["backend", "install", "--auto", "--write-uuid", "--device", - "/dev/btldr-drv", "/"], + ["backend", "install", "--auto", "--write-uuid", "--update-firmware", + "--device", "/dev/btldr-drv", "/"], root=sysroot ), call(