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
wolfyreload
wolfyreloadā€¢7mo ago
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.
Nasamund
NasamundOPā€¢7mo ago
i see failed to logrotate
antheas
antheasā€¢7mo ago
@HikariKnight can you look into this? Seems to be the issue with the logs
HikariKnight
HikariKnightā€¢7mo ago
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
Dobsgw
Dobsgwā€¢7mo ago
I have the same logrotate failing to start during boot - let me know if I can help by pulling logs
HikariKnight
HikariKnightā€¢7mo ago
does sudo cat /var/lib/logrotate/logrotate.status say anything? been awhile since i messed with logrotate and systemctl status logrotate.service i guess
Nasamund
NasamundOPā€¢7mo ago
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-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?
HikariKnight
HikariKnightā€¢7mo ago
ok what happens when you try run it manually? sudo logrotate /etc/logrotate.conf
Nasamund
NasamundOPā€¢7mo ago
error: cannot stat /etc/logrotate.conf~: No such file or directory
HikariKnight
HikariKnightā€¢7mo ago
you added a character at the end try again
Nasamund
NasamundOPā€¢7mo ago
ah thanks sudo cat /var/lib/logrotate/logrotate.status run this again after?
HikariKnight
HikariKnightā€¢7mo ago
sure im guessing logrotate had no output
Nasamund
NasamundOPā€¢7mo ago
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
HikariKnight
HikariKnightā€¢7mo ago
im heading to bed in a sec though, got a busy day tomorrow
Nasamund
NasamundOPā€¢7mo ago
no it didnt thanks
HikariKnight
HikariKnightā€¢7mo ago
it seems to have rotated the logs, so not sure where it is failing then šŸ¤”
Nasamund
NasamundOPā€¢7mo ago
Ɨ 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
HikariKnight
HikariKnightā€¢7mo ago
well there is the error ls -laZ /var/log/boot.log
Nasamund
NasamundOPā€¢7mo ago
-rw-------. 1 root root system_u:object_r:var_t:s0 0 Jun 12 01:25 /var/log/boot.log
HikariKnight
HikariKnightā€¢7mo ago
wrong selinux permissions
Nasamund
NasamundOPā€¢7mo ago
Sorry I m still pretty new to linux so I am not sure what that means
HikariKnight
HikariKnightā€¢7mo ago
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 broke
Nasamund
NasamundOPā€¢7mo ago
no 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)
HikariKnight
HikariKnightā€¢7mo ago
try systemctl start logrotate.service now
Nasamund
NasamundOPā€¢7mo ago
Job for logrotate.service failed because the control process exited with error code. See "systemctl status logrotate.service" and "journalctl -xeu logrotate.service" for details.
HikariKnight
HikariKnightā€¢7mo ago
journalctl -xeu logrotate.service this will be the last bit for me, i have to go to sleep
Nasamund
NasamundOPā€¢7mo ago
Jun 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)
HikariKnight
HikariKnightā€¢7mo ago
does /var/log/boot.log exist? nvm it has to
Nasamund
NasamundOPā€¢7mo ago
Thanks for the help. This a no rush issue. We can try more tomorrow
HikariKnight
HikariKnightā€¢7mo ago
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
Nasamund
NasamundOPā€¢7mo ago
another day then
HikariKnight
HikariKnightā€¢7mo ago
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
Nasamund
NasamundOPā€¢7mo ago
Its no problem. Thank for helping so far.
M2
M2ā€¢7mo ago
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.
HikariKnight
HikariKnightā€¢7mo ago
Thought restorecon didn't work on ostree
M2
M2ā€¢7mo ago
It works. You just shouldn't run it on /. It won't work on things mounted RO. But var is RW
HikariKnight
HikariKnightā€¢7mo ago
ak ok, well the command i made was based on the selinux context that my file had
Nasamund
NasamundOPā€¢7mo ago
so I should enter a command called restorecon?
M2
M2ā€¢7mo ago
Run restorecon on /var/log/boot.log
Nasamund
NasamundOPā€¢7mo ago
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
M2
M2ā€¢7mo ago
You need sudo as you saw. To get output use -v flag
Nasamund
NasamundOPā€¢7mo ago
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...
HikariKnight
HikariKnightā€¢7mo ago
sudo restorecon -v /var/log/boot.log
Nasamund
NasamundOPā€¢7mo ago
no output on terminal
HikariKnight
HikariKnightā€¢7mo ago
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)
Nasamund
NasamundOPā€¢7mo ago
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
HikariKnight
HikariKnightā€¢7mo ago
might be other parts it is slowing down on if anything
Nasamund
NasamundOPā€¢7mo ago
Could be. Do you expect that the boottimes should be similar? between windows and bazzite?
HikariKnight
HikariKnightā€¢7mo ago
nope i never expect that since i need completely different services on the 2 oses to be useful for me
Nasamund
NasamundOPā€¢7mo ago
ā—‹ 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)
HikariKnight
HikariKnightā€¢7mo ago
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
Nasamund
NasamundOPā€¢7mo ago
Oh yea. Part of the reason I m trying to switch yes it didnt have the error logs like before
HikariKnight
HikariKnightā€¢7mo ago
then its fine
Nasamund
NasamundOPā€¢7mo ago
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
HikariKnight
HikariKnightā€¢7mo ago
we include pretty much everything you need for gaming so would make sense its slower than something you tailor for yourself
Nasamund
NasamundOPā€¢7mo ago
Makes sense
HikariKnight
HikariKnightā€¢7mo ago
but shouldnt be that much slower
Nasamund
NasamundOPā€¢7mo ago
its about a 10 or more second difference
HikariKnight
HikariKnightā€¢7mo ago
oh yeah then its nothing to think about
Nasamund
NasamundOPā€¢7mo ago
ah ok thanks then ill mark this as solved.
HikariKnight
HikariKnightā€¢7mo ago
if it was like lets say 40 seconds slower then something is wrong
Nasamund
NasamundOPā€¢7mo ago
gotcha. No i would say between 10-20
HikariKnight
HikariKnightā€¢7mo ago
10 seconds is just the sacrifice of extra drivers and modules and services i will say
Nasamund
NasamundOPā€¢7mo ago
its under the 30 second boot time now or about that got it
HikariKnight
HikariKnightā€¢7mo ago
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
Nasamund
NasamundOPā€¢7mo ago
Ah then I am well underneath that. I was only concerned cause it was slower than windows so I thought I did something wrong
HikariKnight
HikariKnightā€¢7mo ago
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
Nasamund
NasamundOPā€¢7mo ago
great. Thanks for the help again
HikariKnight
HikariKnightā€¢7mo ago
np!
Dobsgw
Dobsgwā€¢7mo ago
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
Nasamund
NasamundOPā€¢7mo ago
hi! do you recall how much the boot speed increased?
Dobsgw
Dobsgwā€¢7mo ago
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
Nasamund
NasamundOPā€¢7mo ago
alright. Would you happen to know how to check if /var/log/boot.log was relabeled?
M2
M2ā€¢7mo ago
ls -lZ /var/log/boot.log
Nasamund
NasamundOPā€¢7mo ago
thanks
Dobsgw
Dobsgwā€¢7mo ago
Also from my side the error was no longer showing on boot so that will indicate the fix
Nasamund
NasamundOPā€¢7mo ago
same. no error and the readout was what you wrote
Want results from more Discord servers?
Add your server