On Fri, 22.04.16 11:49, Michael Lipp (m...@mnl.de) wrote: > Hi, > > I have some PCs where I have to store the Linux root file system as a > large file in Window's NTFS file system. Everything boots fine. The NTFS > file system is mounted as ntfs-3g in the initial ramfs as /host, the > loopback device is created (using /host/Linux/image.img) and used as root. > > However, the system doesn't shut down cleanly, usually it simply hangs. > I admit that it isn't easy to solve this situation on shutdown. When > executing findmnt in the running Linux system, the only "hint" is > /dev/loop0 being mounted as root. The NTFS mount doesn't appear at all. > It only shows in systemctl status, which starts with > > init.scope > |. 1 /sbin/init > |- 155 mount.ntfs-3g -o permissions /dev/sda2 /host > > Is it possible to configure systemd-shutdown somehow (e.g. hook > scripts)? Or do I have to write my own systemd-shutdown?
If marking your fuse process with "@" doesn't suffice (as suggested in the other mails in this thread), you can always define an initrd shutdown script: https://www.freedesktop.org/wiki/Software/systemd/InitrdInterface/ i.e. the /run/initramfs/shutdown stuff discussed there. But note that this is invoked after the built-in shutdown logic has run, and thus you probably want to combine it with the "@" logic. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel