How to improve boot speed?
Hi, I have been distro hopping and on a suggestion from a friend got into bazzite. So far it has been the smoothest installation and functioning experience but I noticed it has the slowest boot speed of the distros I have tried as well as my windows boot. My friend has conflicting experience and he says his boot is faster than his windows. Is there something that I did or can do to improve my boot speed?
77 Replies
While the boot is occurring, press escape and see if there are any services that are failing to start that the system is waiting for. Atomic desktop install speed, updates and boot speed do tend to be a bit slow but your boot should be under 40 seconds on an ssd.
i see failed to logrotate
@HikariKnight can you look into this?
Seems to be the issue with the logs
Hmm I will have to be able to replicate. Or see some actual logs.
Will see if I can dig up a command when I get home. Ty for ping @antheas
I have the same logrotate failing to start during boot - let me know if I can help by pulling logs
does
sudo cat /var/lib/logrotate/logrotate.status
say anything?
been awhile since i messed with logrotate
and systemctl status logrotate.service
i guesslogrotate state -- version 2
"/var/log/samba/log" 2024-6-9-0:0:0
"/var/log/firewalld" 2024-6-9-0:0:0
"/var/log/boot.log" 2024-6-9-0:0:0
"/var/log/hawkey.log" 2024-6-9-0:0:0
"/var/log/sssd/.log" 2024-6-9-0:0:0
"/var/log/kvm_stat.csv" 2024-6-9-0:0:0
"/var/log/wtmp" 2024-6-9-0:0:0
"/var/log/chrony/.log" 2024-6-9-0:0:0
"/var/log/btmp" 2024-6-9-0:0:0
"/var/log/iscsiuio.log" 2024-6-9-0:0:0
"/var/log/wpa_supplicant.log" 2024-6-9-0:0:0
"/var/log/mariadb/mariadb.log" 2024-6-9-0:0:0
"/var/log/ppp/connect-errors" 2024-6-9-0:0:0
"/var/log/displaylink/*log" 2024-6-9-0:0:0
thats for status
ā logrotate.service - Rotate log files
Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static)
Drop-In: /usr/lib/systemd/system/service.d
āā10-timeout-abort.conf
Active: inactive (dead)
TriggeredBy: ā logrotate.timer
Docs: man:logrotate(8)
man:logrotate.conf(5)
boot time is about 30 seconds
in contrast boot time for windows 11 is 10 seconds
But from what I understand atomic desktop can be a bit slow?
ok what happens when you try run it manually?
sudo logrotate /etc/logrotate.conf
error: cannot stat /etc/logrotate.conf~: No such file or directory
you added a character at the end
try again
ah thanks
sudo cat /var/lib/logrotate/logrotate.status run this again after?
sure
im guessing logrotate had no output
logrotate state -- version 2
"/var/log/samba/log" 2024-6-9-0:0:0
"/var/log/firewalld" 2024-6-9-0:0:0
"/var/log/boot.log" 2024-6-12-1:25:16
"/var/log/hawkey.log" 2024-6-9-0:0:0
"/var/log/sssd/.log" 2024-6-9-0:0:0
"/var/log/kvm_stat.csv" 2024-6-9-0:0:0
"/var/log/wtmp" 2024-6-9-0:0:0
"/var/log/chrony/.log" 2024-6-9-0:0:0
"/var/log/btmp" 2024-6-9-0:0:0
"/var/log/iscsiuio.log" 2024-6-9-0:0:0
"/var/log/wpa_supplicant.log" 2024-6-9-0:0:0
"/var/log/mariadb/mariadb.log" 2024-6-9-0:0:0
"/var/log/ppp/connect-errors" 2024-6-9-0:0:0
"/var/log/displaylink/*log" 2024-6-9-0:0:0
im heading to bed in a sec though, got a busy day tomorrow
no it didnt
thanks
it seems to have rotated the logs, so not sure where it is failing then š¤
Ć logrotate.service - Rotate log files
Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static)
Drop-In: /usr/lib/systemd/system/service.d
āā10-timeout-abort.conf
Active: failed (Result: exit-code) since Wed 2024-06-12 01:01:13 CEST; 27min ago
TriggeredBy: ā logrotate.timer
Docs: man:logrotate(8)
man:logrotate.conf(5)
Process: 3929 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=>
Main PID: 3929 (code=exited, status=1/FAILURE)
CPU: 37ms
Jun 12 01:01:13 fedora systemd[1]: Starting logrotate.service - Rotate log files...
Jun 12 01:01:13 fedora logrotate[3929]: error: stat of /var/log/boot.log failed: Permissi>
Jun 12 01:01:13 fedora systemd[1]: logrotate.service: Main process exited, code=exited, s>
Jun 12 01:01:13 fedora systemd[1]: logrotate.service: Failed with result 'exit-code'.
Jun 12 01:01:13 fedora systemd[1]: Failed to start logrotate.service - Rotate log files.
from this: systemctl status logrotate.service
well there is the error
ls -laZ /var/log/boot.log
-rw-------. 1 root root system_u:object_r:var_t:s0 0 Jun 12 01:25 /var/log/boot.log
wrong selinux permissions
Sorry I m still pretty new to linux so I am not sure what that means
i think this might fix it
sudo semanage fcontext -a -t plymouthd_var_log_t /var/log/boot.log
i think that might be the right one
no idea how the selinux permissions brokeno output
running this: systemctl status logrotate.service
Ć logrotate.service - Rotate log files
Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static)
Drop-In: /usr/lib/systemd/system/service.d
āā10-timeout-abort.conf
Active: failed (Result: exit-code) since Wed 2024-06-12 01:01:13 CEST; 32m>
TriggeredBy: ā logrotate.timer
Docs: man:logrotate(8)
man:logrotate.conf(5)
Process: 3929 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exite>
Main PID: 3929 (code=exited, status=1/FAILURE)
CPU: 37ms
Jun 12 01:01:13 fedora systemd[1]: Starting logrotate.service - Rotate log file>
Jun 12 01:01:13 fedora logrotate[3929]: error: stat of /var/log/boot.log failed>
Jun 12 01:01:13 fedora systemd[1]: logrotate.service: Main process exited, code>
Jun 12 01:01:13 fedora systemd[1]: logrotate.service: Failed with result 'exit->
Jun 12 01:01:13 fedora systemd[1]: Failed to start logrotate.service - Rotate l>
lines 1-17/17 (END)
try
systemctl start logrotate.service
nowJob for logrotate.service failed because the control process exited with error code.
See "systemctl status logrotate.service" and "journalctl -xeu logrotate.service" for details.
journalctl -xeu logrotate.service
this will be the last bit for me, i have to go to sleepJun 12 01:35:53 fedora logrotate[26237]: error: stat of /var/log/boot.log faile>
Jun 12 01:35:53 fedora systemd[1]: logrotate.service: Main process exited, code>
āā Subject: Unit process exited
āā Defined-By: systemd
āā Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
āā
āā An ExecStart= process belonging to unit logrotate.service has exited.
āā
āā The process' exit code is 'exited' and its exit status is 1.
Jun 12 01:35:53 fedora systemd[1]: logrotate.service: Failed with result 'exit->
āā Subject: Unit failed
āā Defined-By: systemd
āā Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
āā
āā The unit logrotate.service has entered the 'failed' state with result 'exit->
Jun 12 01:35:53 fedora systemd[1]: Failed to start logrotate.service - Rotate l>
āā Subject: A start job for unit logrotate.service has failed
āā Defined-By: systemd
āā Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
āā
āā A start job for unit logrotate.service has finished with a failure.
āā
āā The job identifier is 10708 and the job result is failed.
lines 40-62/62 (END)
does
/var/log/boot.log
exist?
nvm it has toThanks for the help. This a no rush issue. We can try more tomorrow
idk why it crashes then, will have to look more into it later since i really need to sleep
im busy almost all of tomorrow and thursday
another day then
its also getting close to my vacation which means i will be gone for 3 weeks but i will try get some freetime before then to look at this sorry
Its no problem. Thank for helping so far.
You shouldn't change the context on /var/log/boot.log.
A restorecon will fix that. Sometimes it gets created with the wrong SELinux context and that will then cause logrotate to fail.
Thought restorecon didn't work on ostree
It works. You just shouldn't run it on /.
It won't work on things mounted RO. But var is RW
ak ok, well the command i made was based on the selinux context that my file had
so I should enter a command called restorecon?
Run restorecon on /var/log/boot.log
restorecon /var/log/boot.log
restorecon: Could not set context for /var/log/boot.log: Operation not permitted
I used sudo restorecon /var/log/boot.log and there was no output
You need sudo as you saw.
To get output use -v flag
usage: sudo -h | -K | -k | -V
usage: sudo -v [-ABkNnS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-ABkNnS] [-g group] [-h host] [-p prompt] [-U user]
[-u user] [command [arg ...]]
usage: sudo [-ABbEHkNnPS] [-r role] [-t type] [-C num] [-D directory]
[-g group] [-h host] [-p prompt] [-R directory] [-T timeout]
[-u user] [VAR=value] [-i | -s] [command [arg ...]]
usage: sudo -e [-ABkNnS] [-r role] [-t type] [-C num] [-D directory]
[-g group] [-h host] [-p prompt] [-R directory] [-T timeout]
[-u user] file ...
i used sudo -v restorecon /var...
sudo restorecon -v /var/log/boot.log
no output
on terminal
reboot and see if it still slows down boot
since -v will only show changes done, since you already ran it, there wont be anything to "fix"
so no output
you can also do
-vv
for more verbosity (not all programs support this, but i saw in the manual for restorecon that it does)i dont see the log rotate failure anymore and its seems to be booting a bit faster. still a bit slower than windows but that probably is just the os
might be other parts it is slowing down on if anything
Could be. Do you expect that the boottimes should be similar?
between windows and bazzite?
nope i never expect that since i need completely different services on the 2 oses to be useful for me
ā logrotate.service - Rotate log files
Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static)
Drop-In: /usr/lib/systemd/system/service.d
āā10-timeout-abort.conf
Active: inactive (dead)
TriggeredBy: ā logrotate.timer
Docs: man:logrotate(8)
man:logrotate.conf(5)
a normal windows install for me will use like 8-10gb memory idle just to have a functional workflow for me š¤¢
looks fine now on that, check log
Oh yea. Part of the reason I m trying to switch
yes it didnt have the error logs like before
then its fine
Alright. Then I will just assume the longer boot time is just bazzite on my system. Strange that its much slower than when I was booting other distros but as someone said earlier atomic desktop can be a bit slow
we include pretty much everything you need for gaming so would make sense its slower than something you tailor for yourself
Makes sense
but shouldnt be that much slower
its about a 10 or more second difference
oh yeah then its nothing to think about
ah ok thanks then
ill mark this as solved.
if it was like lets say 40 seconds slower then something is wrong
gotcha. No i would say between 10-20
10 seconds is just the sacrifice of extra drivers and modules and services i will say
its under the 30 second boot time now
or about that
got it
the way i see it, if a boot takes longer than 1.5minute then something is wrong, but i am a patient person i have been told so lets say 1 minute
and this is after getting past the post screen
Ah then I am well underneath that. I was only concerned cause it was slower than windows so I thought I did something wrong
since different hardware will slow down the uefi post and some uefi is just slow
nah you just had a missing context for the logfile, somehow
great. Thanks for the help again
np!
Following up as I had the same issue, output of the restorecon command is as follows:
Relabeled /var/log/boot.log from system_u:object_r:var_t:s0 to system_u:object_r:plymouthd_var_log_t:s0
I have android device tree PTSD now
Boot time is significantly improved
hi! do you recall how much the boot speed increased?
It was already fairly fast as I have a good nvme drive, but I'd say it took off about 10 seconds which is ~25% speed improvement for me
I have now started using Sleep for even faster wake times Vs booting each time I need my PC
alright. Would you happen to know how to check if /var/log/boot.log was relabeled?
ls -lZ /var/log/boot.log
thanks
Also from my side the error was no longer showing on boot so that will indicate the fix
same. no error and the readout was what you wrote