Repository navigation
Conversation
|
Thanks for picking up #13355. Checking the ESP is the right idea. I read the diff against current
Also, #13602 (yours too, now conflicting) uses a different rule (largest UKI or a 400 MiB floor). It's probably worth closing that one so only one approach is up for review. |
The update preflight only checked /, so a UKI + Limine install could fill its small ESP mid-update and leave the machine unbootable while root still reported 10 GiB free. Size the ESP ask against the largest UKI already on disk (room for one more plus retention churn) and name the ESP path in the refusal. Fixes omacom#13355
- Compare filesystems with findmnt -T, so the skip also fires when /boot is a plain directory on root. - Warn instead of passing silently when the UKIs on the ESP can't be listed (e.g. a root-only fmask/dmask mount). - Size the headroom by installed kernels plus one (at least two copies) instead of a flat 2x, since limine-snapper-sync also keeps history UKIs.
5d4b997 to
45a7879
Compare
|
| # No UKIs (different bootloader, or a wiped ESP) means nothing to size against. | ||
| if uki_sizes=$(find "$esp" -xdev -type f -name '*.efi' -printf '%s\n' 2>/dev/null); then | ||
| largest_uki_bytes=$(sort -nr <<< "$uki_sizes" | head -n 1) |
There was a problem hiding this comment.
Bootloader files block updates
The scan treats every .efi file as a UKI. If the ESP has another bootloader but no UKIs, files such as BOOTX64.EFI still produce a space requirement. The check can then refuse an update instead of taking the documented no-UKI skip. Limit the scan to UKI files and add a test with a bootloader file but no UKIs.
|
Reviewed at 45a7879. The problem in #13355 is real, but on a stock install this change does not stop the update it is meant to stop. What was checked. I ran it on a worker VM installed from the current Omarchy ISO. There
So the sizing logic works when it can read the ESP, but the real call path never lets it, and every update on a stock install prints the warning. What needs deciding. How the check gets to read the ESP is a design call, not a contained fix, so I have pushed nothing. One option is running it after
The Greptile note about Competing fixes. #12246 is older but bundles five unrelated changes, conflicts with Second opinion. Codex Medium reviewed the same diff, given the worker's mount measurements. It reached the same conclusion on the unreadable ESP and the reporter's numbers, though that agreement is not independent: it was handed the measurements and can read this session. The Waiting on the author to choose how the check reads the ESP under the real caller. |
Summary
omarchy-update-requires-free-spacechecked only/. On a UKI + Limine install the ESP is the actual constrained resource: a kernel update writes a fresh UKI whilelimine-snapper-syncstill holds its retained copies, and an ESP that fills mid-update leaves the machine unbootable while root happily reports terabytes free (#13355).The preflight now additionally guards the ESP when it is a separate filesystem:
ESP_PATHin/etc/default/limine(repo convention fromomarchy-provision-owner), defaulting to/boot..efialready on the ESP — room for the new UKI plus the retention churn around it — and refuses with a message naming the ESP path and the human-sized shortfall.Fixes #13355
Testing
test/shell.d/update-disk-space-test.shextended with stubbedsed/findmnt/dfand a fake 300 MiB UKI: full ESP blocks and names the path; exactly 2× largest UKI proceeds; shortfall scales with the UKI on disk (no fixed floor); no UKIs skips; root-backed ESP defers to the root check. 12/12 assertions pass.