rancher / elemental-toolkit

:snowflake: The toolkit to build, ship and maintain cloud-init driven Linux derivatives based on container images
https://rancher.github.io/elemental-toolkit/docs/
Apache License 2.0
282 stars 49 forks source link

Make EFI partition size configurable at install time #2105

Closed davidcassany closed 3 weeks ago

davidcassany commented 4 weeks ago

Fixes #2104

davidcassany commented 4 weeks ago

In addition to that we could also consider having way higher default value (what about 1G or even 2G?) So if we ever support systemd-boot or unified kernel image (which require having kernel and initrd within the EFI partition) we could eventually consider upgrades without having to reinstall from scratch.

kkaempf commented 4 weeks ago

As said in #2104, calling it EFI partition is misleading on Raspberry (and might as well other ARM platforms). Raspberry doesn't boot from EFI but also needs a vfat formatted boot partition.

It might not matter implementation wise, but I'm somewhat concerned about mixing topics.

davidcassany commented 4 weeks ago

As said in #2104, calling it EFI partition is misleading on Raspberry (and might as well other ARM platforms). Raspberry doesn't boot from EFI but also needs a vfat formatted boot partition.

It might not matter implementation wise, but I'm somewhat concerned about mixing topics.

All right, this is a fair point and probably we can start by exposing it with a different name but keep all variables and constants as they are now, which is probably already misleading. Lets start having a look.

davidcassany commented 4 weeks ago

I also dislike the boot name as this can easily be confusing with /boot 🤔 Shall we call it firmware partition? Something like:

install:
  partitions:
    firmware:
      size: 512
    oem:
      ...

We could easily name EFI to firmware in UX and probably change the EFI variable name to FW or something like that, however there still many constant literals that refer to efi (e.g. the partition is mounted at /run/elemental/efi).

Note that in toolkit we are only effectively supporting EFI firmware. So to some extend it makes sense keeping the default constant literals referring to efi (e.g. /run/elemental/efi).

Shall we try to do such a rename? How far should we attempt to go.

kkaempf commented 3 weeks ago

firmware isn't clear either, as there's "boot firmware" (like in RPi) and "kernel firmware" (all the *-firmware rpms).

Yeah, naming is hard 😆

davidcassany commented 3 weeks ago

Probably bootloader partition is more accurate? Could be meaningful for BIOS, EFI and UBOOT-like with EFI Grub

kkaempf commented 3 weeks ago

Probably bootloader partition is more accurate? Could be meaningful for BIOS, EFI and UBOOT-like with EFI Grub

Let's go for bootloader !

kkaempf commented 3 weeks ago

I cannot add

partitions:
  bootloader:
    size: 128

via the Rancher UI 😕

kkaempf commented 3 weeks ago

When trying to edit via kubectl I get

> kubectl edit -n fleet-default MachineRegistration rpi-cluster-nodes
error: machineregistrations.elemental.cattle.io "rpi-cluster-nodes" is invalid
A copy of your changes has been stored to "/tmp/kubectl-edit-rw5pf.yaml"
error: Edit cancelled, no valid changes were saved.
kkaempf commented 3 weeks ago

Confirmed working, thanks !