[Nix-dev] systemd in initrd
Luca Bruno
lethalman88 at gmail.com
Thu Aug 21 18:56:53 CEST 2014
On 21/08/2014 18:30, Alexander Zubkov wrote:
> > Being simple is for year '90
> It is hard to argue so strong opinion. :) By simple, I do not mean
> primitive. I mean using enough and appropriate tools to do the work,
> without extra unneeded stuff.
>
> Initrd is not a generic system in my mind. It is just sequence of
> actions to mount root.
> 1) If this sequence needs to be sorted in some way - I think hand
> sorting is enough. More to say, any automatic "sorting application" will
> limit the use cases by those only supported by this "sorting
> application" logic.
> 2) There is no need to manage services or processes in initrd, only
> start it. So any management system is overkill here.
> 3) Do we need all the increasing capabilities of systemd in the initrd?
> 4) It should be examined if size of initrd will not grow too much. May
> be not an issue at all.
I would really like to agree here. Sorting can take place when building
the initrd, yes. Nixos is very able to do that. That's what I proposed
in the PR in the first place, about having a dependency information
between mounts, something like fileSystems."/".mountAfter = "....", that
would work only for the initrd.
But that wouldn't be enough. Because then, to make things proper, file
systems need a sequence of commands to mount, e.g. for encrypted
devices, to get rid of preLVM. In other words, you are reimplementing
systemd but at nixos level. Not only, in the worst case you are writing
a different nixos interface, one for the nixos initrd init system, and
one for systemd.
More information about the nix-dev
mailing list