16.04 - Is it possible to speed up kernel boot time?
You can trim down the initramfs to speed up boot by editing /etc/initramfs-tools/initramfs.conf and setting MODULES=dep
.
Then run the following to update the initramfs to hopefully make a smaller one:
sudo update-initramfs -u
Related videos on Youtube
glen abdelnoor
Saved former Windows user, Ubuntu saved my dying computer, never looked back!
Updated on September 18, 2022Comments
-
glen abdelnoor over 1 year
I am working on trying to get my boot up time as short as possible. I have done several changes that got my time from 3 minutes down to about 14 seconds. All of the changes seem to affect the userspace startup portion. The one thing that I noticed remains constant is the kernel startup speed.
systemd-analyze
gives me the following results:Startup finished in 11.162s (kernel) + 3.239s (userspace) = 14.402s
I have tried setting
GRUB_TIMEOUT=1
in /etc/default/grub but that did not influence the startup time for the kernel.I am running 16.04 on a Lenovo U510 with a 1TB hybrid drive, no other OS on board. Thanks!
-
j0h about 7 yearsSome linux distros are better for this. Gentoo for example. Load fewer modules on boot, and boot time should decrease. grub doesn't have much to do with the kernel. perhaps migrate this to Unix & linux SE
-
Panther about 7 yearsThe only way is to build your own kernel . The benefits will be modest at best.
-
Fabby about 7 years14 seconds is great! Congrats! Don't change anything!
-
glen abdelnoor about 7 yearsThanks, always looking to improve though, kind of the Millennium Falcon approach; keep tweaking it until I break/learn something.
-
-
glen abdelnoor about 7 yearsThat seemed to work! My new startup numbers are
Startup finished in 10.685s (kernel) + 2.321s (userspace) = 13.006s
When I did the update I had to add "-u" to the end for it to work, sosudo update-initramfs -u
, do you know why that is? -
Colin Ian King about 7 yearsSorry, my instructions were wrong, you do need a -u to trigger the update. I'll update the instructions. My bad.