Skip to content

switch-root: Ensure sysctl is run again after switching root#125

Merged
chewi merged 1 commit into
flatcar-masterfrom
chewi/sysctl-rerun
May 15, 2026
Merged

switch-root: Ensure sysctl is run again after switching root#125
chewi merged 1 commit into
flatcar-masterfrom
chewi/sysctl-rerun

Conversation

@chewi
Copy link
Copy Markdown
Contributor

@chewi chewi commented May 14, 2026

Dracut normally copies all sysctl config to the initrd, but we may want to exclude platform-specific config because the initrd is shared between platforms. That config can be picked up from the OEM sysext after switching root.

I have tested this manually with GCE.

Dracut normally copies all sysctl config to the initrd, but we may want
to exclude platform-specific config because the initrd is shared between
platforms. That config can be picked up from the OEM sysext after
switching root.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
@chewi chewi self-assigned this May 14, 2026
@chewi chewi requested a review from a team as a code owner May 14, 2026 17:34
Copy link
Copy Markdown
Member

@krnowak krnowak left a comment

Choose a reason for hiding this comment

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

I assume that this is for picking up sysctl files that are distributed with an OEM sysext, right? Is systemd-sysctl service ordered to run after systemd-{sys,conf}ext?

@chewi
Copy link
Copy Markdown
Contributor Author

chewi commented May 15, 2026

Is systemd-sysctl service ordered to run after systemd-{sys,conf}ext?

If you mean we could just run it once, that would be much later in the boot process than it normally runs. If you're just checking whether I remembered that ordering for the second run, I did have that initially, but Kai's changes now mean that the sysexts are merged just before switching root (i.e. before systemd-sysext.service), so that ordering is unnecessary now.

@krnowak
Copy link
Copy Markdown
Member

krnowak commented May 15, 2026

I meant the latter. :) Thanks.

@chewi chewi merged commit a3b96e3 into flatcar-master May 15, 2026
1 check passed
@chewi chewi deleted the chewi/sysctl-rerun branch May 15, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants