Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional entry in addition to active, fallback and recovery #2379

Closed
vipsharm opened this issue Mar 21, 2024 · 8 comments
Closed

Additional entry in addition to active, fallback and recovery #2379

vipsharm opened this issue Mar 21, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request uki

Comments

@vipsharm
Copy link
Collaborator

vipsharm commented Mar 21, 2024

Provide an option to enki with a cmdline (or a list) as input.

enki would generate then an extra entry/EFI file into the installer and the kairos system should have the entry installed in the system in addition to active, fallback and recovery .

Notes:

For Kairos reset flow, I need to add a single boot menu entry, with an additional cmdline "kairos.reset".

Adding it as extend cmdline loses the option to stay in recovery image, because it will always reset and reboot to active.
And, if i add it as generic cmdline that will create 6 EFIs into installed system 3 with default cmdline and 3 with this kairos.reset cmdline.

What we need is an option to add a cmdline for very specific usecase like reset, and have just one EFI instlled into the system alongwith active, fallback and recovery, This EFI will only be for this specific use case and we dont need fallback.recovery for this.

@vipsharm vipsharm added bug Something isn't working triage Add this label to issues that should be triaged and prioretized in the next planning call unconfirmed labels Mar 21, 2024
@mudler mudler added enhancement New feature or request and removed bug Something isn't working unconfirmed labels Mar 21, 2024
@mudler mudler changed the title Provide an option to give a cmdline and add just one extra EFI into installed system in addition to active, fallback and recovery Additional entry in addition to active, fallback and recovery Mar 21, 2024
@Itxaka
Copy link
Member

Itxaka commented Mar 22, 2024

We should be able to provide this directly via conf file like we do with active/passive/recorey currently, no need for another entry:

Copy an extra conf for autoreset: kairos-io/kairos-agent#267
Return autoreset state for uki: kairos-io/kairos-sdk#74
Trigger autoreset service on autoreset state: kairos-io/packages#762
Set proper sentinel to autoreset: kairos-io/immucore#259

@Itxaka Itxaka self-assigned this Mar 22, 2024
@Itxaka
Copy link
Member

Itxaka commented Mar 22, 2024

Everything merged.

Tested this manually.

  • installed
  • created some files under the persistent dirs
  • restarted
  • choose autoreset entry
  • let it boot, it reset-ed and rebooted
  • auto choose active on next boot
  • files were no longer there on persistent

Will be in next patch release

@Itxaka Itxaka closed this as completed Mar 22, 2024
@mudler
Copy link
Member

mudler commented Mar 22, 2024

reopening as we need still to tackle the changes in enki, however the autoreset entry is added

@mudler
Copy link
Member

mudler commented Mar 25, 2024

@Itxaka are you already working on the enki changes? I've just synced with Vipin and this is low prio atm

@Itxaka
Copy link
Member

Itxaka commented Mar 25, 2024

Nope, haven't touched this other than adding the autoreset @mudler

@mudler mudler removed the triage Add this label to issues that should be triaged and prioretized in the next planning call label Mar 27, 2024
@jimmykarily
Copy link
Contributor

What does loses the option to stay in recovery image, because it will always reset and reboot to active mean?

We currently have 2 flags:

  • extend-cmdline -> adds the provides parameters to all the cmdlines (active, passive, recovery)
  • extra-cmdline -> creates an additional entry for each one of active, passive, recovery with the provided parameters

If I understand correctly, we want an option that will only add the parameters to one specific entry? Or do we want an option that will create an additional entry (only one) with the provided parameters. If the latter is true, the efi file would have to be defined as well for the additional entry.

@mudler mudler added the uki label Apr 2, 2024
@mudler mudler mentioned this issue Apr 4, 2024
13 tasks
@jimmykarily jimmykarily self-assigned this Apr 15, 2024
jimmykarily added a commit to kairos-io/enki that referenced this issue Apr 15, 2024
Part of: kairos-io/kairos#2379

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
jimmykarily added a commit to kairos-io/enki that referenced this issue Apr 16, 2024
Part of: kairos-io/kairos#2379

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
@ci-robbot
Copy link
Collaborator

I apologize for the confusion in my previous comment. You would like an option that adds the provided parameters to a single specific entry, specifically the "autoreset" entry, while still having the existing (active, passive, recovery) entries unchanged. In this case, an additional EFI file doesn't need to be defined for the additional entry, but the command line parameters should be set specifically for the "autoreset" entry when it is generated.

To summarize:

  • Maintain existing (active, passive, recovery) entries unchanged
  • Add the provided parameters to the "autoreset" entry only
  • No need for a new EFI file for the "autoreset" entry

Please let me know if I've understood correctly.

@jimmykarily
Copy link
Contributor

All merged now. Docs at the bottom of this page: https://kairos.io/docs/installation/trustedboot/ (will appear as soon as the docs site is built)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request uki
Projects
Archived in project
Development

No branches or pull requests

5 participants