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

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

Open
fmckeogh opened this issue Apr 30, 2024 · 1 comment

Comments

@fmckeogh
Copy link
Contributor

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
Copy link
Contributor Author

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

MarkRoss470 added a commit to MarkRoss470/bootloader that referenced this issue Jul 4, 2024
This prevents a 'No space left on device' error from occuring
for large kernel images.

Implements suggestion in rust-osdev#438 by Ferdia McKeogh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant