Skip to content

drop dracut for initramfs generation #251

@ddiss

Description

@ddiss

Dracut is useful for providing a bunch of system image "recipes" in the form of dracut-modules, as well as performing a few early-boot tasks before rapido autorun. I initially expected to write and use dracut-modules for rapido, but having dracut source internal (system) and external (rapido) modules simultaneously proved difficult.
Nowadays we tend to only use the base and systemd modules, with one exception for multipath. As such I think we could consider dropping dracut and instead using the kernel's gen_init_cpio binary.

I think the main benefits of this change would be:

  • portability: dracut isn't used for boot-time initramfs generation on many distros. some are also moving from dracut to mkosi.
  • performance: dracut is quite a fork-bomb, and stages all files before generation to accommodate GNU cpio's silly source-is-dest behavior
  • simplicity: having full control of init should reduce the amount of regressions caused by upstream dracut changes

I think the main tasks to move things forward here are:

  • add logic to determine kernel dependencies via modules.dep
  • parse ldd output to gather shared object dependencies
  • convert existing dracut invocations to gen_init_cpio archive manifest files

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions