Skip to content

Commit

Permalink
40ignition-ostree: add coreos-inject-rootmap.service
Browse files Browse the repository at this point in the history
This implements the rootmap functionality that figures out all the
dependencies required to find `/sysroot`, and injects them into the BLS
config. For more information, see:

coreos/fedora-coreos-tracker#94 (comment)

The `rdcore` code supports RAID and LUKS devices, though the latter
needs a new Clevis release with the following patches to be fully
supported:

latchset/clevis#211
latchset/clevis#217

This also implements the `root=UUID=$uuid` inject patch proposed in
coreos/fedora-coreos-tracker#465.

On its own, this unlocks reprovisioning FCOS with root on a RAID device,
or e.g. in-place reprovisioning of root on btrfs.

Closes: coreos/fedora-coreos-tracker#465
Closes: coreos/fedora-coreos-tracker#94
  • Loading branch information
jlebon committed Aug 27, 2020
1 parent fdadae1 commit f683a9e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=CoreOS Inject Rootmap
# If root is specified, assume rootmap is already configured
ConditionKernelCommandLine=!root
OnFailure=emergency.target
OnFailureJobMode=isolate

After=ignition-files.service

[Service]
Type=oneshot
ExecStart=/usr/bin/rdcore rootmap /sysroot --boot-device /dev/disk/by-label/boot
RemainAfterExit=yes
MountFlags=slave
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# ex: ts=8 sw=4 sts=4 et filetype=sh

depends() {
echo ignition
echo ignition rdcore
}

install_ignition_unit() {
Expand Down Expand Up @@ -90,4 +90,6 @@ install() {
inst_script "$moddir/coreos-growpart" /usr/libexec/coreos-growpart

inst_script "$moddir/coreos-relabel" /usr/bin/coreos-relabel

install_ignition_unit coreos-inject-rootmap.service diskful
}

0 comments on commit f683a9e

Please sign in to comment.