diff --git a/ironic_python_agent/extensions/image.py b/ironic_python_agent/extensions/image.py index 1d439923f..a09cb140e 100644 --- a/ironic_python_agent/extensions/image.py +++ b/ironic_python_agent/extensions/image.py @@ -760,7 +760,7 @@ def _install_grub2(device, root_uuid, efi_system_part_uuid=None, # recommended path. _configure_grub(device, path) - if efi_mounted: + if efi_system_part_uuid and efi_mounted: _append_uefi_to_fstab(path, efi_system_part_uuid) LOG.info("GRUB2 successfully installed on %s", device) diff --git a/releasenotes/notes/fix_efi_uuid_fstab-f2edbee9bfbac64a.yaml b/releasenotes/notes/fix_efi_uuid_fstab-f2edbee9bfbac64a.yaml new file mode 100644 index 000000000..77d64ce08 --- /dev/null +++ b/releasenotes/notes/fix_efi_uuid_fstab-f2edbee9bfbac64a.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes an issue when the EFI partition UUID is not set and an attempt + to edit /etc/fstab is made. +