Skip to content

Conversation

@Johan-Liebert1
Copy link
Member

This is still very much work in progress. Feedback is appreciated

@Johan-Liebert1 Johan-Liebert1 added the WIP PR still being worked on label Nov 10, 2025
@@ -0,0 +1,4 @@
# Disable services that don't work with bootc/composefs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add a condition to those unit that makes them not run on composefs native systems.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that would be better

@@ -0,0 +1,9 @@
[Unit]
After=
After=bootc-initramfs-setup.service
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An option here could be to create a wrapping unit/script that runs the right command depending on the kernel parameter, to avoid duplicating everything.

@@ -0,0 +1,10 @@
[Unit]
ConditionKernelCommandLine=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see if we can figure out a way to include both condition in the unit:

If multiple conditions are specified, the unit will be executed if all of them apply (i.e. a logical AND is applied). Condition checks can use a pipe symbol ("|") after the equals sign ("Condition…=|…"), which causes the condition to become a triggering condition. If at least one triggering condition is defined for a unit, then the unit will be started if at least one of the triggering conditions of the unit applies and all of the regular (i.e. non-triggering) conditions apply. If you prefix an argument with the pipe symbol and an exclamation mark, the pipe symbol must be passed first, the exclamation second. If any of these options is assigned the empty string, the list of conditions is reset completely, all previous condition settings (of any kind) will have no effect.

https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#Conditions%20and%20Asserts

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that would the way to do it. I have it in separate drop-ins right now just to keep track of what all I'm changing

In order to boot systems with `composefs=` cmdline, add systemd drop-ins
to check for said commandline instead of `ostree=`

This is very WIP so some services have been disabled

Signed-off-by: Pragyan Poudyal <[email protected]>
Signed-off-by: Pragyan Poudyal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP PR still being worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants