Following commands help to get a better insight:
systemd-analyze
systemd-analyze blame
systemd-analyze critical-chain
Edit /etc/systemd/journald.conf
Set this line and value:
SystemMaxUse=50M
cd /var/log/journal/
sudo rm -r *
sudo systemctl mask systemd-journal-flush.service
!!! Do not mask systemd-journald.service !!!
See in "Mask unnecessary services" at bottom of this page.
Information on masking systemd-journal-flush
Information
https://askubuntu.com/questions/919428/keyboard-setup-service-taking-too-long-in-startup-20sec
Open this file: /etc/fstab as sudo.
Comment out the swapfile line with a #
sudo apt remove network-manager
sudo apt install wicd
Make sure to include wicd-gtk -t in the startup script
Some services like accounts-daemon.service are unnecessary at startup. To see which services are enabled, use
systemctl list-unit-files --type=service | grep enabled
To mask the above mentioned accounts-daemon.service service:
sudo systemctl mask accounts-daemon.service
To unmask and enable:
sudo systemctl unmask accounts-daemon.service
sudo systemctl enable accounts-daemon.service
Some services which can be masked/disabled are:
- accounts-daemon.service
- ModemManager.service
- keyboard-setup.service
- systemd-journal-flush.service
- avahi-daemon.service
- pppd-dns.service
- apport.service
- NetworkManager-wait-online.service
Things to disable/mask
How to disable/enable
Information on masking systemd-journal-flush
sudo find /tmp/{*,.??*} -exec rm -rf {} \;
Edit the default grub file:
sudo nano /etc/default/grub
Add "fastboot" to the GRUB_CMDLINE_LINUX_DEFAULT line. It should look like this:
GRUB_CMDLINE_LINUX_DEFAULT="fastboot"
Save the file. Update grub.
sudo update-grub