Hello. Thanks for reading my topic.
Here is Lubuntu 24.04.3 and AMD FX 6300. Lubuntu is configured to grub
GRUB_CMDLINE_LINUX_DEFAULT=#“quiet splash”
so show services and process in boot startup.
Here happening a problem because the HDD is pretty slow.
When OS are starting are showed in boot startup terminal some lines with values
FAILED and DEPEND for some services and tasks. Not is problem of installation or configuration because the problema happen ramdoly with each service.
When the OS is totally loaded happen some errors for example not is possible login because the accounts-daemon not was correctly loaded.
Have any configuration for add a delay between services and tasks when doing OS boot startup ?
Have a nice week.
Topic moved to Support and Help.
@aug7744 Please use the Support and Help category for support questions.
The Flavors & Remixes > Lubuntu is not for technical support.
Thanks
Excuse me … thanks for fixing it.
Have a nice week.
That shouldn’t be a problem with a correctly functioning HDD; system startup would simply be slower then. Unless the HDD extremely slow so that services time out, which could indicate an imminent hardware failure of the HDD.
You can check which services failed by using the systemctl command in a terminal:
systemctl list-units --failed
You can also analyze the boot process:
systemd-analyze critical-chain
That should show, which service take so long and hold everything else up.
systemd-analyze blame
lists individual startup times of services in descending order.
One can delay individual services by running sudo systemctl edit <service> and adding ExecStartPost=sleep <seconds>:
$ sudo systemctl edit my-service
[Service]
# wait 10 addtional seconds
ExecStartPost=sleep 10
(systemctl edit will start an editor and you just need to put those lines in the file, save and close it.)
But I don’t thinks that’s very useful, when you have to do that for random services. You should analyze the actual cause and fix the problem there.
Please put all log and other console/terminal output in pre-formatted code blocks (click the </> icon in the editor first and paste into the new element), ideally wrapped in a “Hide Details” element, if it’s more than just a few lines. See items 4 and 5 in the Posting Guide.
Optional helper script
If you are so inclined, I took it upon myself to provide a little helper script for that. ![]()
A simple delay may not guarantee the service’s necessary precondition will be met, so you many need to take a different approach.
I believe there might be some value in your reviewing one of my earlier posts, which looks at defining a necessary pre-condition before certain services are initiated:
In that, my precondition is
- RequiresMountsFor
but there are other controlling parameters which might be more “specific” to the necessary pre-condition which would address your event sequence scenario.
That shouldn’t be necessary with standard services, because they have an implicit DefaultDependencies=yes, which equates to Requires=sysinit.target and After=sysinit.target. In turn, systinit.target depends on local-fs.target, among many others:
systemctl list-dependencies sysinit.target
A fixed delay as ExecStartPost=sleep <seconds> will block systemd from starting other units, which are ordered After= or similar; in contrast to considering the unit started as soon as the main process is spawned, which is almost all services, except the rather rare Type={notify{,-reload},oneshot,dbus}.
Too long a delay may cause a service start timeout, though, so one might need to increase that as well. But, as I said, just setting some delay is probably not very useful without investigating the cause of said failures.