Skip to content

Drop several Dracut modules and add boot.mount#127

Draft
chewi wants to merge 5 commits into
flatcar-masterfrom
chewi/simplifications
Draft

Drop several Dracut modules and add boot.mount#127
chewi wants to merge 5 commits into
flatcar-masterfrom
chewi/simplifications

Conversation

@chewi

@chewi chewi commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

It turns out huge chunks of our Dracut code have been obsolete for a while through systemd upgrades and switching to the minimal init.

This also drops sysroot-boot.service in favour of boot.mount. sysroot-boot.service used to be a simple mount unit way back before 8bf46fe. This was changed due to umount sometimes being called after an unmount had already happened, causing it and its associated unit to fail. This was harmless, but it did cause Kola test failures.

Although the precise cause of that issue was never found, I think that between moving the mount point outside of /sysroot, not forcing it to unmount before switching root (that will happen anyway), and the intervening 8 years of systemd changes, there's a good chance we won't see it again.

How to use

Just boot up, maybe with some provisioning.

Testing done

This Jenkins run has... I have also done a little manual testing.

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update) -- N/A
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

chewi added 5 commits June 26, 2026 16:21
systemd-tmpfiles-setup-dev-early.service was backported from a newer
systemd version, but now our version is new enough.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This has been ineffective for a while because systemd now uses
systemd-fsck-usr.service rather than systemd-fsck@${usr}.service.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This module was gutted out when we switched to the minimal init.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
remount-sysroot.service is already provided by upstream Ignition as
ignition-remount-sysroot.service. The rest has been unused since
switching to the minimal init, and even before that, much of it was
handled by systemd-fstab-generator instead.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
sysroot-boot.service used to be a simple mount unit way back before
8bf46fe. This was changed due to umount
sometimes being called after an unmount had already happened, causing it
and its associated unit to fail. This was harmless, but it did cause
Kola test failures.

Although the precise cause of that issue was never found, I think that
between moving the mount point outside of /sysroot, not forcing it to
unmount before switching root (that will happen anyway), and the
intervening 8 years of systemd changes, there's a good chance we won't
see it again.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
@chewi chewi self-assigned this Jun 29, 2026
Copilot AI review requested due to automatic review settings June 29, 2026 17:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR removes several custom Dracut modules that are now obsolete due to systemd upgrades and the move to the minimal init flow, and replaces the initrd /sysroot/boot mounting logic (sysroot-boot.service) with a standard boot.mount unit that mounts the ESP at /boot during initrd when needed (e.g., for Ignition “first boot” quenching).

Changes:

  • Replace sysroot-boot.service (+ retry-umount) with boot.mount, and update Ignition quenching to operate on /boot/... instead of /sysroot/boot/....
  • Drop legacy/obsolete Dracut modules and associated generators/tests (usr generator, usr-fsck generator, verity generator, tmpfiles-early module).
  • Adjust initrd unit ordering where needed (e.g., disk-uuid.service now orders before boot.mount), and update diskless generator to use ignition-remount-sysroot.service.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test Removes the top-level test runner script.
README.md Removes documentation for running tests via ./test.
dracut/53ignition/sysroot-boot.service Deletes the old initrd service that mounted the ESP at /sysroot/boot.
dracut/53ignition/retry-umount.sh Deletes the retrying unmount helper previously used by sysroot-boot.service.
dracut/53ignition/module-setup.sh Stops installing retry-umount/sysroot-boot.service; installs new boot.mount.
dracut/53ignition/ignition-remount-sysroot.service Updates the Documentation URL.
dracut/53ignition/ignition-quench.service Switches dependency to /boot and updates the quench path from /sysroot/boot to /boot.
dracut/53ignition/boot.mount Adds a mount unit for the ESP at /boot in initrd.
dracut/53disk-uuid/disk-uuid.service Updates ordering to run before boot.mount and ignition-disks.service.
dracut/52tmpfiles-early/systemd-tmpfiles-setup-dev-early.service Deletes the custom early tmpfiles unit.
dracut/52tmpfiles-early/module-setup.sh Deletes the module that installed the custom early tmpfiles unit.
dracut/51verity-generator/no-job-timeout.conf Deletes verity-related drop-in used to disable job timeout.
dracut/51verity-generator/module-setup.sh Deletes the verity generator module.
dracut/51usr-generator/usr-generator Deletes the legacy usr= cmdline generator.
dracut/51usr-generator/testsuite.sh Deletes the usr-generator tests.
dracut/51usr-generator/remount-sysroot.service Deletes the legacy remount service used by the usr-generator flow.
dracut/51usr-generator/module-setup.sh Deletes the usr-generator module setup/install logic.
dracut/51usr-fsck-generator/usr-fsck-generator Deletes the generator that disabled fsck for /usr.
dracut/51usr-fsck-generator/testsuite.sh Deletes the usr-fsck-generator tests.
dracut/51usr-fsck-generator/module-setup.sh Deletes the usr-fsck-generator module setup/install logic.
dracut/51diskless-generator/module-setup.sh Removes dependency on the deleted usr-generator module.
dracut/51diskless-generator/diskless-generator Updates generated unit ordering to use ignition-remount-sysroot.service instead of remount-sysroot.service.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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