Commit c3f0600
committed
overlay/ignition: delete pre-existing bootuuid.cfg
In our disk images, we inject a grub script that looks for a
`/boot/grub2/bootuuid.cfg` to find the boot partition. If the file is not
present, the label `boot` is used to find the partition. See [1] for more.
During the first boot, the hard-coded uuid of the boot partition is
replaced with a random one [2]. However this is triggered by checking
for the `bootuuid.cfg` file, and this file is created by `bootc install`,
short-circuiting this logic.
So let's delete this file pre-emptyvely for during the first boot, so we
always restamp the boot partition and write a new file in /boot.
This allows us to use `bootc install to-disk` to build our disk images.
See [3][4].
[1] https://github.com/coreos/bootupd/blob/1768f31c85b5d8cd72f4339ab669b703d7071b51/src/grub2/grub-static-pre.cfg
[2] https://github.com/coreos/fedora-coreos-config/blob/testing-devel/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-gpt-setup.service
[3] https://issues.redhat.com/browse/COS-3374
[4] coreos/coreos-assembler#42241 parent 79736c3 commit c3f0600
File tree
2 files changed
+16
-0
lines changed- overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition
2 files changed
+16
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
29 | 42 | | |
30 | 43 | | |
31 | 44 | | |
0 commit comments