Reducing Boot time - aceisace/Raspberry-Pi-Setup GitHub Wiki
Why should you reduce the boot time?
The standard boot time of a Raspberry pi is around 30 seconds. For some tasks (e.g. Airplay Receiver), it's desirable to have a shorter boot time so desired programs are started faster.
With systemd-analyze
you can find out how many seconds the last boot took.
Running systemd-analyze blame
shows the time required for each package to start at boot. The most time-consuming ones are at the top. If you don't need a service (like keyboard-setup), you can disable it from starting at boot again. By doing so, fewer packages are run at boot, decreasing the boot time.
The services are managed by systemd. To stop a service, use sudo systemctl stop service-name
. This will stop a specific service instantly. At the next boot however, it will run again.
This is where disable comes in place, like so: sudo systemctl disable service-name
. Now the service will not start at boot again. To enable a disabled service, sudo systemctl enable service-name
is used.
To check if a service is running, use sudo systemctl status service-name
.