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

🌱 spike: lifecycle operations with UKI #1151

Closed
2 tasks
Tracked by #347
mudler opened this issue Mar 16, 2023 · 8 comments
Closed
2 tasks
Tracked by #347

🌱 spike: lifecycle operations with UKI #1151

mudler opened this issue Mar 16, 2023 · 8 comments

Comments

@mudler
Copy link
Member

mudler commented Mar 16, 2023

  • try to install the image manually (mimicking the installer) taking notes of the steps
  • try to do upgrade manually (mimicking what we have) taking notes of the steps

See also:
https://github.com/canonical/nullboot
https://github.com/Foxboron/sbctl

Action items

  • investigate required changes
  • create follow-ups card to implement the required code changes
@mudler mudler mentioned this issue Mar 16, 2023
27 tasks
@mudler mudler changed the title spike: lifecycle operations with UKI 🌱 spike: lifecycle operations with UKI Mar 16, 2023
@mudler
Copy link
Member Author

mudler commented Mar 16, 2023

Blocked by #1150

@Itxaka
Copy link
Member

Itxaka commented Aug 11, 2023

This has to be revisited as:

There is no install workflow anywhere for uki, its just 1 efi file that you need to copy into a FAT formatted partition
There is no upgrade workflow. There is only 1 partition where the efi resides. Upgrade would be dropping a new ifi file into that partition and making the bootloader add that entry.

In both cases we dont have anything in there to do any of those workflows, nor are we sure we can do those. Nor there is a install apth nor there is an iso that bundles the uki artifact.

@mudler mudler mentioned this issue Sep 5, 2023
22 tasks
@mudler
Copy link
Member Author

mudler commented Sep 18, 2023

Summary after conversation:

  • Installation, Upgrade and reset are handled manually by Kairos (managing directly the EFI files, without a boot manager like GRUB)
  • We can offer utilities to e.g. switch from active to passive during runtime (changing the EFI boot)
  • The EFI signatures of the images that we generate will be installed in the bios db of the machine
  • Both /oem and cos_persistent are optional. If they are there must be encrypted
    • Cloud config during installation can be sealed in the TPM (only one-off) or just the strictly necessary data to unencrypt the encrypted partition

@mudler mudler removed the blocked label Sep 18, 2023
@Itxaka
Copy link
Member

Itxaka commented Sep 18, 2023

Very interesting thing, fedora ships a fallback.efi which does the following:

  • Check under each EFI/ dir that its not BOOT
  • Looks for BOOT.CSV
  • For each valid entry in each BOOT.CSV file it finds, fallback creates a new Boot#### variable and appends it to BootOrder
  • After that, it boots the first created entry

Maybe we could lean on that to create and regenerate boot entries in case of failure or if we mess up or remove valid entries?

So the idea would be:

  • Copy kairos uki into /EFI/Kairos/kairos-$VERSION.efi
  • Add that new entry into a BOOT.CSV int eh /EFI/Kairos dir
  • Add the fallback.efi into /EFI/BOOT/{bootaa64.efi,bootx64.efi}

This would allow us some safety net in case we mess up the EFI boot manager entries...

https://blog.uncooperative.org/uefi/linux/shim/efi%20system%20partition/2014/02/06/the-efi-system-partition.html

@mudler mudler mentioned this issue Oct 31, 2023
53 tasks
@mudler
Copy link
Member Author

mudler commented Dec 5, 2023

@Itxaka we need a card for UEFI Setup mode install wrt Secure Boot

@mudler
Copy link
Member Author

mudler commented Dec 5, 2023

created the relevant cards

@mudler
Copy link
Member Author

mudler commented Jan 24, 2024

this is done, closing

@mudler mudler closed this as completed Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants