Commit ee5d1d6
committed
fix: use loader.conf default instead of bootctl for UKI boot selection
bootctl set-default / set-next require either the bootctl binary in PATH
or a writable efivarfs (backing OVMF_VARS flash device). Both may be
absent: the Ubuntu container image does not guarantee bootctl is on PATH,
and test VMs often run with a read-only combined OVMF_CODE.fd that has no
separate writable VARS.
Fix: write `default <entry-id>` directly into /boot/efi/loader/loader.conf.
Systemd-boot reads this file at every boot and honours it as the default
entry when no EFI variable preference is set. The file is on the FAT ESP
which is always writable when cbootc runs.
upgrade.rs: replace `bootctl set-default` with set_loader_conf_default()
rollback.rs: replace `bootctl set-next` / set_next_entry_bootctl() with the
same helper (persistent rollback — stays on old entry until the
next explicit upgrade, which is the correct behaviour here)
tests/e2e.py: replace test_bootctl_next_entry_set (EFI var check) with
test_loader_conf_default_set (loader.conf check); drop _diag1 parent 81393dd commit ee5d1d6
3 files changed
Lines changed: 43 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | 155 | | |
167 | 156 | | |
168 | 157 | | |
| |||
190 | 179 | | |
191 | 180 | | |
192 | 181 | | |
193 | | - | |
| 182 | + | |
194 | 183 | | |
195 | 184 | | |
196 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
8 | 38 | | |
9 | 39 | | |
10 | 40 | | |
| |||
65 | 95 | | |
66 | 96 | | |
67 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
68 | 103 | | |
69 | 104 | | |
70 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
447 | 447 | | |
448 | | - | |
449 | 448 | | |
450 | 449 | | |
451 | 450 | | |
| |||
456 | 455 | | |
457 | 456 | | |
458 | 457 | | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | 458 | | |
476 | 459 | | |
477 | 460 | | |
| |||
512 | 495 | | |
513 | 496 | | |
514 | 497 | | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | 498 | | |
519 | 499 | | |
520 | 500 | | |
| |||
537 | 517 | | |
538 | 518 | | |
539 | 519 | | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | 520 | | |
544 | 521 | | |
545 | 522 | | |
546 | | - | |
| 523 | + | |
547 | 524 | | |
548 | 525 | | |
549 | 526 | | |
| |||
0 commit comments