[arch-projects] [mkinitcpio] systemd in initramfs

Thomas Bächler thomas at archlinux.org
Sat Aug 17 11:08:08 EDT 2013

The Arch testing/systemd package recently added support for systemd in
initramfs. This obsoletes the base, usr, udev and timestamp hooks.

So, what about the rest?

0) autodetect, block, filesystems, fsck, keyboard and modconf work
exactly as before.

1) mdadm: I see no hope for this hook working on systemd, however the
mdadm_udev hook works out of the box.

2) lvm2: This is much simpler now. I created the sd-lvm2 hook, find it
here: https://paste.xinu.at/3vezU/ - this works great, although it could
be simplified a bit if one uses add_systemd_unit and add_udev_rule.

3) encrypt: I created the sd-encrypt hook, you can find it here:
https://paste.xinu.at/8xUYPI/. This changes the command line syntax, the
new syntax can be found in the manpage for systemd-cryptsetup-generator.
However, the syntax is less powerful than before - for that reason, I
added /etc/crypttab.initrd as /etc/crypttab to the initrd, which should
support almost everything. There were some problems with adding the same
crypttab for initrd and the main system, but that may be my stupiditiy -
I hope the separate crypttab is something we can get rid of.

4) shutdown: I removed this from initramfs entirely - I now generate the
shutdown ramfs on the fly during shutdown instead of generating one in
the initrd. I'll post something when I polished it more.

5) consolefont/keymap: I tried by putting systemd-vconsole-setup to
initramfs. Since keymaps are now loaded by loadkeys instead of busybox's
setkmap, this had a few problems and I couldn't get it to work yet.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-projects/attachments/20130817/0b1469ae/attachment.asc>

More information about the arch-projects mailing list