diff --git a/src/efi.rs b/src/efi.rs index 4d18bdcee..ffe4b8167 100644 --- a/src/efi.rs +++ b/src/efi.rs @@ -128,6 +128,10 @@ impl Efi { #[context("Updating EFI firmware variables")] fn update_firmware(&self, device: &str, espdir: &openat::Dir) -> Result<()> { + if !is_efi_booted()? { + log::debug!("Not booted via EFI, skipping firmware update"); + return Ok(()); + } let efidir = &espdir.sub_dir("EFI").context("Opening EFI")?; let vendordir = super::grubconfigs::find_efi_vendordir(efidir)?; let vendordir = vendordir