[systemd-devel] starting systemd from busybox initrd

Lennart Poettering lennart at poettering.net
Mon Mar 26 08:53:23 PDT 2012


On Mon, 26.03.12 17:02, Leo Baltus (Leo.Baltus at omroep.nl) wrote:

> Hi,

heya,
 
> I am in the process of setting up a fairly standard busybox to act as
> an initrd and rescue environment. The idea is to use a fedora kernel in
> which all boot-time needed modules are compiled in so we can boot all of
> our hardware from the same initrd.

It's not a fedora kernel if it is not compiled by Fedora. It's not a
Fedora kernel if you run it with a non-Fedora initrd.

> The initrd is supposed to do some boot-time checks and if all checks
> succeed switch_root to the os-image or else start busybox.

If you implement an initrd on your own please implement the initrd
interfaces of systemd:

http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface

> However on startup my fedora-16 system seems to timeout on something and
> drops me to sulogin.
> 
> The setup uses a separate /var which is a logical-volume which is not
> mounted by systemd. If I add 'mount /var' at the the of 
> /lib/systemd/fedora-storage-init the mount succeeds and the system boots up.

Humm, yeah, LVM is not really integrated into modern Linuxes the way it
should be. I am not really sure what is necessary to hand over LVM
devices from the initrd properly. Please check dracut what it is doing
in that area.

My recommendation would be to extend dracut anyway, rather then writing
a new initrd from scratch. All these problems are implemented in dracut
anyway, and the systemd interfaces all all implemented there already.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list