On Dec 8, 2015 12:13, "Radoslaw Kamil Ejsmont" <rados...@ejsmont.net> wrote: > > Hi, > > I am new to systemd. I am currently running Ubuntu 15.04 with ZFS. I would like to switch root filesystem to a tmpfs during system shutdown to reset root ZFS mount point (to dual boot FreeBSD). I have used /lib/systemd/system-shutdown/foo script. I have tried using systemctl switch-root, but the dbus daemon is already killed at this point.
systemctl wouldn't work anyway as systemd is not running anymore at that point – during shutdown it replaces itself with a small tool whose only purpose is to bring down whatever remains. However, it already has the feature you need. If systemd-shutdown finds /run/initramfs at the end, it will automatically switch to that as the new root and launch /run/initramfs/shutdown. For distros using dracut as initramfs, ZoL already has some support for this: https://github.com/zfsonlinux/dracut/blob/master/modules.d/98systemd/dracut-shutdown.service.8.asc http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface/ -- Mantas Mikulėnas <graw...@gmail.com>
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel