[systemd-devel] [RFC] Integrating an early-boot service in a blocking way?

Colin Guthrie gmane at colin.guthr.ie
Fri Aug 16 02:21:05 PDT 2013


'Twas brillig, and Michael Stapelberg at 15/08/13 22:00 did gyre and gimble:
> Hi,
> 
> the debian-live people have approached me and want to experiment with
> systemd. One of the things they need to have is running a service called
> live-config.service, but the issue is that it needs to run in early
> boot, even before udev.
> 
> We thought of maybe creating a custom target, but it would need to run
> before basic.target and I don’t see a good way of doing that.
> 
> Do you have any ideas on how to solve this (and making live-config work
> in a different way does not count :))? Thanks!

I presume the live system will come from some kind of initrd? There are
several dracut modules that do various things with live setup
(90dmsquash-live[1]) and we in Mageia have our own dracut module for
doing live CD setup stuff[2].

As dracut first runs udev, to run "before" udev, you'll need to do it
very early - i.e at the initrd stage.

I know you don't use dracut just now (at least I presume this is why
Harald gave a talk at debconf recently trying to promote it!), but
perhaps the same logic applies to whatever tool you use to create your
initrd?

Or perhaps you do things differently and an initrd is not used? I can't
say for sure, but perhaps this points you in the right direction.

HTHs

Col

1.
http://git.kernel.org/cgit/boot/dracut/dracut.git/tree/modules.d/90dmsquash-live

2. It's a bit "split out" just now as it was created in a hurry, but
perhaps we can merge it with the dmsquash stuff and commit upstream
eventually:
http://svnweb.mageia.org/packages/cauldron/dracut/current/SOURCES/ (see
mgalive-* and module-setup.sh) I really should make it a patch at least...



-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the systemd-devel mailing list