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
280 stars 49 forks source link

COS_GRUB too small on ARM / RPi #2104

Open kkaempf opened 3 weeks ago

kkaempf commented 3 weeks ago

Creating the boot partition seems to be based on the assumption "boot is always EFI".

So we see EfiSize = MinPartSize and COS_GRUB is created with this minimal size.

However, this is wrong for ARM, esp. Raspberry Pi where everything (bootloader, firmware, kernel, initrd) must be on a vfat partition. The minimal size should be 256M for this COS_GRUB partitions.

The simplest change is probably to set MinSize to 256.

A better change would not use EfiSize for ARM since not all ARM systems boot via EFI. We probably need BootSize here 🤔

kkaempf commented 3 weeks ago

Seems as if I cannot override the default size via the install: config 😩

From the general configuration docs

 # default partitions
 # only 'oem', 'recovery', 'state' and 'persistent' objects allowed
 # size in MiB
  partitions:
davidcassany commented 2 weeks ago

A better change would not use EfiSize for ARM since not all ARM systems boot via EFI. We probably need BootSize here

Yes, probably we need a way to make all this more flexible. In fact adding the efi partition into this list should be easy. I can try to quickly prepare a PR for that.

kkaempf commented 2 weeks ago

What's probably more surprising - there's no error message during install about COS_GRUB overflowing 🤔

kkaempf commented 2 weeks ago

https://github.com/rancher/elemental-toolkit/pull/2105#issuecomment-2178210754 - reopening