Commit ebb2bda
committed
fix(ungrub): replicate GRUB EFI core to all boot-pool members
install_grub installed the core to only the target device's ESP, while
grub-install rebuilt the shared modules under /boot/grub. On a mirror that
left every other member's ESP with a stale core that no longer matched the
rebuilt modules, so those members failed to boot with
"symbol 'grub_memcpy' not found" -- silently destroying boot redundancy.
- install_grub now copies the freshly built core to every other member's ESP
(no-op for a single-device pool).
- new "mkbootable sync <good-device>" op re-distributes the core from a known
good member to all others, to repair members that already drifted (eg a
device added via a bare "zpool attach").
ESPs are written with mtools (mcopy), the same tooling the installer uses, so
no mount is needed for the targets; the core uses a dynamic ($root) prefix so
the same image is valid on every member. Split into member_esp / install_efi_core
/ replicate_grub. mtools round-trip verified byte-faithful and idempotent.1 parent bccf49e commit ebb2bda
1 file changed
Lines changed: 62 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
82 | 85 | | |
83 | 86 | | |
84 | 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 | + | |
85 | 126 | | |
86 | 127 | | |
87 | 128 | | |
| |||
103 | 144 | | |
104 | 145 | | |
105 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
106 | 152 | | |
107 | 153 | | |
108 | 154 | | |
| |||
162 | 208 | | |
163 | 209 | | |
164 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
165 | 224 | | |
166 | 225 | | |
167 | 226 | | |
| |||
175 | 234 | | |
176 | 235 | | |
177 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
178 | 240 | | |
179 | 241 | | |
180 | 242 | | |
| |||
0 commit comments