Bug#958390: systemd: systemctl ignores soft links in /etc/systemd/system at boot
Erich Minderlein
erich.minderlein at edhec.com
Wed Apr 22 11:10:18 BST 2020
Hi Michael
Your proposal to tamper with initramfs is off the target.
initramfs is well before PID 1. There ist no problem before PID 1.
It can only hurt or damage something.
systemctl list-dependencies my.timer
my.timer
● └─sysinit.target
● ├─apparmor.service
● ├─dev-hugepages.mount
● ├─dev-mqueue.mount
● ├─keyboard-setup.service
● ├─kmod-static-nodes.service
● ├─proc-sys-fs-binfmt_misc.automount
● ├─sys-fs-fuse-connections.mount
● ├─sys-kernel-config.mount
● ├─sys-kernel-debug.mount
● ├─systemd-ask-password-console.path
● ├─systemd-binfmt.service
● ├─systemd-hwdb-update.service
● ├─systemd-journal-flush.service
● ├─systemd-journald.service
● ├─systemd-machine-id-commit.service
● ├─systemd-modules-load.service
● ├─systemd-random-seed.service
● ├─systemd-sysctl.service
● ├─systemd-sysusers.service
● ├─systemd-timesyncd.service
● ├─systemd-tmpfiles-setup-dev.service
● ├─systemd-tmpfiles-setup.service
● ├─systemd-udev-trigger.service
● ├─systemd-udevd.service
● ├─systemd-update-utmp.service
● ├─cryptsetup.target
● ├─local-fs.target
● │ ├─-.mount
● │ ├─home.mount
● │ ├─systemd-fsck-root.service
● │ ├─systemd-remount-fs.service
● │ ├─tmp.mount
● │ └─var.mount
● └─swap.target
● └─dev-disk-by\x2duuid-xxxxxxxx....xxxxxxxxxxxxxxxxx.swap
When you go down the tree, you find
level -1 sysinit.target
level -2 local-fs.target
level -3 home.mount
S systemd knows, that it must provide the mount of home before scanning
my.timer
I suggest you reopen the bug, because you have a race condition there,
which redhat seemss to have solved.
after some reading I see that two mounts may be needed :
systemctl list-units --type=mount --all
UNIT LOAD ACTIVE SUB DESCRIPTION
-.mount loaded active mounted Root Mount
dev-hugepages.mount loaded active mounted Huge Pages File System
dev-mqueue.mount loaded active mounted POSIX Message
Queue File System
home.mount loaded active mounted /home
proc-sys-fs-binfmt_misc.mount loaded active mounted Arbitrary
Executable File Formats File System
run-user-0.mount loaded active mounted /run/user/0
run-user-1000.mount loaded active mounted /run/user/1000
sys-fs-fuse-connections.mount loaded inactive dead FUSE Control File
System
sys-kernel-config.mount loaded inactive dead Kernel
Configuration File System
sys-kernel-debug.mount loaded active mounted Kernel Debug File
System
tmp.mount loaded active mounted /tmp
var.mount loaded active mounted /var
That is the home mount and may be the user-1000-mount.
btw I have done som more testing with systemd.
There is nothing in
/etc/initramfs-tools/scripts/local-premount, except . and .. , :-)
as they are all in fstab , seems to be a race .
I have now added
RequireMountsFor=/home into the service files.
The problem continues.
I think, you have been too fast in closing this bug.
Initramfs is another site.
If I goof something in initramfs , then it will be gone with the next
kernel install.
debian 10.3 has nothing inside the initramfs script section,
I could not even copy and adopt a script.
systemd provides a job home.mount and is solely responsible for the
complete ordered startup through all runlevel. I expect this .
that the file system is mounted before any job wants to accces it.
My fix of this problem is to go back to cron and sysvinit, if systemd is
relying on the customer to sort, what the vendor of the package has not
achieved. So devuan is the the solution , because debian has integrated
systemnd so much taht there is no way back
Am 21.04.20 um 14:01 schrieb Michael Biebl:
> Am 21.04.20 um 13:55 schrieb Michael Biebl:
>> Control: tags -1 + moreinfo
>> Control: severity -1 normal
>>
>> Am 21.04.20 um 13:23 schrieb Erich Minderlein:
>>
>>> $HOME/location/of/app/etc/systemd/system/config.*
>>
>> Is that on a separate partition that has to be mounted during boot to
>> make it accessible?
>
> systemd itself should have no problems with using symlinks, fwiw.
>
> My guess is, that your $HOME/location/of/app/etc/systemd/system/
> is not available when systemd is started during boot, so those files are
> inaccessible. This obviously can't work.
> You either need to move those files to a location which resides on your
> / partition or pre-mount /home in your initramfs before systemd is started.
>
--
mit freundlichen Grüßen
with the beste regards
cordialement
Erich |\/|inderlei|\|
----------------------------------------------------------
-Stuttgart 21- :
Ein weiterer Schritt zur Erhöhung der CO2 Emissionen
Mit 5 bis 10 MRD € wird der öffentliche Nahverkehr in Baden-Württemberg
halbiert.
Die Deutsche Bahn "erhöht" die Abfertigungskapazität von jetzt 800 auf
dann maximal 430 Züge pro Tag und mischt Verkehre verschiedener
Geschwindigkeit auf den gleichen Gleisen.
jetzt kommt der S21 Krimi
geht nur alles schief, was vorhergesagt wurde, oder noch mehr ?
Update : mindestens alles geht schief
https://www.golem.de/1103/81972.html
https://fahrradzukunft.de/25/motorisierte-gewalt/
2022 feiern wir 100 Jahre Kopfbahnhof Stuttgart !! Ich freue mich drauf !
-------------------------------------------------------------------------
Friedrichstrasse 30
77948 Friesenheim (Baden)
Tel +49 (0) 7821 328 99 47
Mob +49 (0) 176 54 33 94 01
More information about the Pkg-systemd-maintainers
mailing list