Commit 1e5b2ca
committed
update: Skip bootloader update when no block devices back the root
In environments without block-backed boot filesystems (virtiofs in bcvk
ephemeral, NFS root, ISO boot, etc.) there is no on-disk bootloader to
manage. Previously bootloader-update.service would fail because
get_devices() bailed when it could not find a block device from /boot
or /sysroot.
Change get_devices() to return Ok(None) instead of an error when no
block-backed filesystem is found, and propagate this through
prep_before_update() so the update and adopt-and-update paths exit
cleanly with an informative message. The EFI validate path also skips
gracefully in this case.
This is more general than checking for specific filesystem types: any
environment without backing block devices is handled, which also
prepares for the transition to list_dev_current_root() in PR #1068.
Assisted-by: OpenCode (Claude Opus 4)1 parent 83293cf commit 1e5b2ca
3 files changed
Lines changed: 30 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | | - | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
| |||
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
29 | | - | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
36 | | - | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
535 | | - | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
536 | 540 | | |
537 | 541 | | |
538 | | - | |
539 | | - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
540 | 549 | | |
541 | 550 | | |
542 | 551 | | |
543 | 552 | | |
544 | | - | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
545 | 556 | | |
546 | 557 | | |
547 | 558 | | |
| |||
596 | 607 | | |
597 | 608 | | |
598 | 609 | | |
599 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
600 | 613 | | |
601 | 614 | | |
602 | 615 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
560 | 560 | | |
561 | 561 | | |
562 | 562 | | |
563 | | - | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
564 | 566 | | |
565 | 567 | | |
566 | 568 | | |
| |||
0 commit comments