Bugzilla – Bug 1213648
dracut: implement no implicit initrd location
Last modified: 2024-04-18 15:00:05 UTC
I'm working on systemd-boot integration in Factory. An effect of how it's currently done is that dracut basically cannot know where to install the initrd and it should not do it anyway. See https://github.com/lnussel/sdbootutil/blob/main/ARCHITECTURE.md for an overview. So to avoid users (or scriptlets) generating useless initrds, would it be possible to implement a global config option to disable guessing of the location? Ie always require to specify an output file when that option is set.
(In reply to Ludwig Nussel from comment #0) > So to avoid users (or scriptlets) generating useless initrds, would it be > possible to implement a global config option to disable guessing of the > location? Ie always require to specify an output file when that option is > set. You know it could be possible :), the question is whether it'd be accepted upstream (knowing how they breathe...), because specifying an output file already disables guessing.
the point would be to prevent admins to naively type "dracut" from generating an initrd in a useless location
Here it is, but I wouldn't bet a lot of money: https://github.com/dracutdevs/dracut/pull/2448 We had a "similar" PR rejected in the past: https://github.com/dracutdevs/dracut/pull/2020
Changing severity to enhancement, I'd say that the current behavior is not a bug, since the output file can be specified explicitly.
(In reply to Antonio Feijoo from comment #3) > Here it is, but I wouldn't bet a lot of money: > https://github.com/dracutdevs/dracut/pull/2448 I'd say that this PR will not be merged. Is there still any interest in keeping this enhancement request open or has sdbootutil already found a workaround for this?
There can't be a workaround in sdbootutil. The issue is people can call dracut manually any time and it would create an initrd. The result is useless as the new initrd won't be used for anything. In the systemd-boot case it's simply not dracut's job to register the initrd with the bootloader. Tooling around dracut takes care to install the generated initrd in the right location. Anyway dracut generating initrd in random places is not harmful or blocking anything, just useless :-)
The patch from https://github.com/openSUSE/dracut/pull/323 is included since snapshot 20240417.