Repository navigation
Commit 27fcedb
committed
composefs: Use an XBOOTLDR partition with systemd-boot
The Boot Loader Specification lets systemd-boot read Type #1 entries
and UKIs from an Extended Boot Loader Partition (XBOOTLDR) on the
ESP's disk. The composefs backend always wrote them to the ESP, which
doesn't work when the ESP is small. That's the usual case next to
Windows: its ESP is often 100 MB, a UKI with a full initramfs can be
bigger than that, and composefs keeps the booted, staged and rollback
ones side by side.
For bootloaders that read entries the way BLS describes, which for
now is only systemd-boot, install the UKIs, BLS entries and their
kernels and initramfs images to a VFAT XBOOTLDR partition next to the
ESP when there is one. The bootloader and loader.conf, which
systemd-boot only reads from the ESP, stay there.
When booted, BootedStorage, which upgrades, rollback, finalize and GC
go through, uses the XBOOTLDR partition next to the ESP named by
LoaderDevicePartUUID only if it holds the booted deployment's entries,
and the ESP otherwise. That way systems installed by an older bootc,
or before an XBOOTLDR partition was added, keep their entries on the
ESP.
GRUB keeps its own /boot handling, and grub-cc is left alone since
it's unclear whether it reads XBOOTLDR.
The new tmt test splits the VM's ESP in half with an empty XBOOTLDR
partition, and checks that a switch keeps the entries on the ESP. It
then moves them to the XBOOTLDR partition, as an install there would
have put them, and upgrades and rolls back. Sealed runs skip it, since
the derived images are built in the VM without keys to sign them.
Assisted-by: AI
Signed-off-by: Kristof Imeri <kristof@lanth.me>1 parent db8f971 commit 27fcedb
19 files changed
Lines changed: 622 additions & 92 deletions
File tree
- crates/lib/src
- bootc_composefs
- backwards_compat
- store
- docs/src
- tmt
- plans
- tests
- booted
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
294 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
295 | 298 | | |
296 | 299 | | |
297 | 300 | | |
| |||
329 | 332 | | |
330 | 333 | | |
331 | 334 | | |
332 | | - | |
| 335 | + | |
333 | 336 | | |
334 | 337 | | |
335 | 338 | | |
| |||
345 | 348 | | |
346 | 349 | | |
347 | 350 | | |
348 | | - | |
| 351 | + | |
349 | 352 | | |
350 | 353 | | |
351 | 354 | | |
| |||
376 | 379 | | |
377 | 380 | | |
378 | 381 | | |
379 | | - | |
380 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
381 | 387 | | |
382 | 388 | | |
383 | 389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
114 | | - | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
822 | 822 | | |
823 | 823 | | |
824 | 824 | | |
825 | | - | |
| 825 | + | |
826 | 826 | | |
827 | 827 | | |
828 | 828 | | |
| |||
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
865 | | - | |
| 865 | + | |
866 | 866 | | |
867 | 867 | | |
868 | 868 | | |
| |||
895 | 895 | | |
896 | 896 | | |
897 | 897 | | |
898 | | - | |
| 898 | + | |
899 | 899 | | |
900 | 900 | | |
901 | 901 | | |
| |||
931 | 931 | | |
932 | 932 | | |
933 | 933 | | |
934 | | - | |
| 934 | + | |
| 935 | + | |
935 | 936 | | |
936 | 937 | | |
937 | 938 | | |
| |||
1775 | 1776 | | |
1776 | 1777 | | |
1777 | 1778 | | |
1778 | | - | |
| 1779 | + | |
1779 | 1780 | | |
1780 | 1781 | | |
1781 | 1782 | | |
| |||
1826 | 1827 | | |
1827 | 1828 | | |
1828 | 1829 | | |
1829 | | - | |
| 1830 | + | |
1830 | 1831 | | |
1831 | 1832 | | |
1832 | 1833 | | |
| |||
1930 | 1931 | | |
1931 | 1932 | | |
1932 | 1933 | | |
1933 | | - | |
| 1934 | + | |
1934 | 1935 | | |
1935 | 1936 | | |
1936 | 1937 | | |
| |||
1968 | 1969 | | |
1969 | 1970 | | |
1970 | 1971 | | |
1971 | | - | |
| 1972 | + | |
1972 | 1973 | | |
1973 | 1974 | | |
1974 | 1975 | | |
| |||
2021 | 2022 | | |
2022 | 2023 | | |
2023 | 2024 | | |
2024 | | - | |
| 2025 | + | |
2025 | 2026 | | |
2026 | 2027 | | |
2027 | 2028 | | |
| |||
2065 | 2066 | | |
2066 | 2067 | | |
2067 | 2068 | | |
2068 | | - | |
| 2069 | + | |
| 2070 | + | |
2069 | 2071 | | |
2070 | 2072 | | |
2071 | 2073 | | |
| |||
2176 | 2178 | | |
2177 | 2179 | | |
2178 | 2180 | | |
2179 | | - | |
| 2181 | + | |
2180 | 2182 | | |
2181 | 2183 | | |
2182 | 2184 | | |
2183 | | - | |
| 2185 | + | |
2184 | 2186 | | |
2185 | 2187 | | |
2186 | 2188 | | |
2187 | | - | |
2188 | | - | |
2189 | | - | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
2190 | 2195 | | |
2191 | 2196 | | |
2192 | | - | |
| 2197 | + | |
2193 | 2198 | | |
2194 | 2199 | | |
2195 | 2200 | | |
| |||
2208 | 2213 | | |
2209 | 2214 | | |
2210 | 2215 | | |
2211 | | - | |
2212 | | - | |
| 2216 | + | |
2213 | 2217 | | |
2214 | 2218 | | |
2215 | 2219 | | |
| |||
2264 | 2268 | | |
2265 | 2269 | | |
2266 | 2270 | | |
2267 | | - | |
2268 | | - | |
2269 | | - | |
2270 | | - | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
2271 | 2276 | | |
2272 | 2277 | | |
2273 | 2278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 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 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
| 278 | + | |
278 | 279 | | |
279 | 280 | | |
280 | 281 | | |
| |||
0 commit comments