[Bug 2011536] Re: [SRU] Add FK_FORCE_EFI environment variable to skip EFI check
Isaac True
2011536 at bugs.launchpad.net
Tue Mar 14 12:14:16 UTC 2023
> While f-k mostly generate files, I don't think flash-kernel is
particularly good in the mode of "please ignore the current environment
and generate artifacts for the following hardware target without
flashing them to non-OS managed locations", perhaps it grew such support
recently though. I would expect this to be done with something like
FK_FORCE_TARGET_MACHINE or something, and then EFI/chroot/device-tree
checks should be ignored and the machine db would be used, except for
flashing to real hardware
I would say there is precedence for forcing installation/environments in
flash-kernel with the use of FK_FORCE and FK_MACHINE, where you can
override the VM/container and target machine detection.
I also wanted to add a new flag (FK_FORCE_EFI) rather than utilise the
existing FK_FORCE flag so that the current behaviour doesn't change
unexpectedly for users, in case someone is relying on this EFI
detection.
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2011536
Title:
[SRU] Add FK_FORCE_EFI environment variable to skip EFI check
Status in flash-kernel package in Ubuntu:
New
Bug description:
[ Impact ]
Flash-kernel currently checks to see if the machine is running in an
EFI environment by checking the existence of /sys/firmware/efi, and
exits if this is the case. This is undesirable in some cases, such as
in virtual, container, or chroot environments where the host is
running in an EFI environment, but the target device that the system
will actually run on is not and needs flash-kernel to be run.
This debdiff adds the ability to skip this check by setting the
FK_FORCE_EFI environment variable to "yes" (which follows the usage of
the FK_FORCE environment variable). This way, flash-kernel can be run
even though the host system is running in an EFI environment.
[ Test Plan ]
As this change should not impact the current usage of the tool, a test
should be carried out that the normal default usage (i.e. on target
platforms) is not affected and retains the current behaviour.
We should also test that the current behaviour of exiting when the
/sys/firmware/efi directory is detected is retained when FK_FORCE_EFI
is not set to "yes".
Finally, the new ability to skip the EFI detection check when
FK_FORCE_EFI is set to "yes" must be tested.
[ Where problems could occur ]
Some users may be relying on the current behaviour of flash-kernel to
exit when the EFI environment is detected. The current default
behaviour is being retained so as to avoid this issue, meaning a user
should only see the effect of this change when setting FK_FORCE_EFI to
"yes".
[ Other Info ]
N/A
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/flash-kernel/+bug/2011536/+subscriptions
More information about the Ubuntu-sponsors
mailing list