/etc/sysctl.d is not applied on boot
Bug #1485683 reported by
Simon Eisenmann
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
Expired
|
High
|
Unassigned |
Bug Description
Changes to files in /etc/sysctl.d are not applied on boot. They get applied once one restarts systemd-
- To reproduce add .conf file to /etc/sysctl.d or change any of the existing values there.
- Then reboot and check if they are applied (sysctl -a). They are not (snappy armhf 15.04 ubuntu-core 4).
- Then run systemctl restart systemd-
I guess this is an issue with the mounting. It might be that /dev/mmcblk0p4 on /etc/sysctl.d type ext4 is not yet mounted when the early systemd service is run.
description: | updated |
Changed in snappy: | |
status: | New → Triaged |
importance: | Undecided → High |
To post a comment you must log in.
This sounds like another instance of the old problem that the root file system isn't actually the root fs until later in the boot, due to mounting stuff in /etc. Snappy/system-image fell into this trap countless times, and I can just repeat my recommendation to mount everything that belongs into the root file system (/etc/*, /lib/*) in initramfs.
If you don't want this for some reason, I suggest to add a /lib/systemd/ system/ systemd- sysctl. service. d/snappy. conf with
[Unit] or=/etc/ sysctl. d
RequiresMountsF
this should generate the appropriate Requires= /After= etc-sysctl. d.mount dependencies, but avoids hardcoding the unit name.