[systemd-devel] Shutdown root fs on loop device
Michael Lipp
mnl at mnl.de
Fri Apr 22 09:49:09 UTC 2016
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?
- Michael
More information about the systemd-devel
mailing list