[systemd-devel] Service not starting that wants first-boot-complete.target
Christopher Hunt
huntchr at gmail.com
Tue Apr 8 00:40:58 UTC 2025
Howdy. I've got a "Resize file system" service that wants first-boot-complete.target and is to be run before it. I've linked the service to the first-boot-complete.target, removed /etc/machine-id and then reboot. The first boot condition is met, yet I see the following status once booted:
○ resizefs.service - Resize file system to capacity on first boot
Loaded: loaded (/etc/systemd/system/resizefs.service; enabled; preset: enabled)
Active: inactive (dead)
If there was a problem with my link then I suppose wouldn't see that the above service is enabled. Which leads me to think that there's something else up.
If I check the target itself:
○ first-boot-complete.target - First Boot Complete
Loaded: loaded (/usr/lib/systemd/system/first-boot-complete.target; static)
Active: inactive (dead)
Docs: man:systemd.special(7)
...then I think that's telling me that first boot didn't complete... right? But dmesg shows that first boot is so:
[ 3.024138] systemd[1]: Detected first boot.
Here's my unit file:
[Unit]
Description=Resize file system to capacity on first boot
ConditionFirstBoot=yes
DefaultDependencies=no
# This service will need to write to the file system:
After=systemd-remount-fs.service
Wants=first-boot-complete.target
Before=first-boot-complete.target sysinit.target
Conflicts=shutdown.target
Before=shutdown.target
[Service]
Type=oneshot
ExecStart=/etc/systemd/system/resizefs.sh
Thanks for any ideas as to why my service is not being started.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20250408/8feb96b0/attachment.htm>
More information about the systemd-devel
mailing list