bootloader icon indicating copy to clipboard operation
bootloader copied to clipboard

`No space left on device` for UEFI image with large kernel image, fixed by increasing FAT padding

Open fmckeogh opened this issue 1 year ago • 1 comments

When I try to create a UEFI image with a 600MiB+ kernel image, I sometimes get a No space left on device error.

This can be fixed by altering fat.rs:29:

---    let fat_size_padded_and_rounded = ((needed_size + 1024 * 64 - 1) / MB + 1) * MB + MB;
+++    let fat_size_padded_and_rounded = ((needed_size + 1024 * 64 - 1) / MB + 2) * MB + MB;

to increase the size by 1MiB. I believe this is an issue with clusters and/or fragmentation, but I don't want to just increase a constant and potentially waste that megabyte if I don't need to.

Is there an improved heuristic for the necessary padding and rounding?

fmckeogh avatar Apr 30 '24 15:04 fmckeogh

This might also be solved by adding files largest to smallest?

fmckeogh avatar Apr 30 '24 15:04 fmckeogh