On Wed, Jun 28, 2017 at 5:00 PM, Michael Di Domenico <mdidomeni...@gmail.com
> wrote:

> can anyone point me towards some howto's or documentation that shows
> how one might replace an existing busybox based initrd with a systemd
> one?
>
> obviously this is a bit of a loaded question as you have no idea what
> i'm doing in the initrd, but i'm not sure where to get started.  to
> break it down simply;
>
> with busybox, i can compile a kernel, compile busybox, add my junk to
> the init script and then make an initrd image that the kernel loads.
> at the end of the initrd if all "my junk" worked, I then switchroot to
> boot up a linux o/s
>
> i want to basically do the same thing with systemd, take a kernel,
> hand off to an initrd where systemd would start a shell if needed
> (like busybox does) or switchroot to boot up the o/s
>

It seems that you just need to use "initrd.target" as the default, and
stock systemd units will take care of the rest, falling back to
emergency.target as regular boot does.

This is the systemd module for Arch's mkinitcpio (although we still default
to busybox there):
https://aur.archlinux.org/cgit/aur.git/tree/initcpio-install-systemd?h=systemd-git#n103


-- 
Mantas Mikulėnas <graw...@gmail.com>
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to