or “How I’ve cut down the Linux boot time by 1 minute just switching from GRUB to rEFInd boot manager”
On my infamous HP Notebook I was experiencing a very long Linux boot time after a fresh install (many versions of Linux Mint or Ubuntu). Quite recently I’ve learned how to diagnose this kind of issues by using the command:
This command shows how much time subsequent Linux booting stages has taken:
- firmware – ?
- loader – my guess is this is a time spent by a boot loader to load an operating system kernel before running it
- kernel – time spent by the Linux kernel
- userspace – I guess this is time spent to start services
If your computer is using BIOS instead of UEFI you probably cannot see times spent in first 2 stages.
My problem was that reported loader time was something between 1 and 1.5 minute! All four times were summing up to about 2 minutes and this was consistent with a wall clock time measured from pushing power button to the moment when the login screen appeared.
It was the GRUB boot loader’s fault that Linux was starting so slow on my laptop. I found no explanation for this. Results reported by systemd-analyse for others had much shorter loader time, usually below 10 seconds.
I have replaced GRUB by the rEFInd Boot Manager. The loader time decreased from at least 1 minute to around 3 seconds!
$ systemd-analyze Startup finished in 3.681s (firmware) + 3.107s (loader) + 6.022s (kernel) + 19.344s (userspace) = 32.156s graphical.target reached after 19.256s in userspace
Amazing! At last!!! 😀
Installation of The rEFInd Boot Manager is quite simple and steps for Linux Mint are the same as for Ubuntu. You can find the instruction on the official page.
Removing GRUB was not obvious. It looked like alive and broken after uninstalling – GRUB command prompt was still appearing. But I was able to boot using the rEFInd Boot Manager after selecting it in the UEFI/BIOS setup (sic!). Then I ended up tweaking things using the command efibootmgr as given on the official page in the section “Using efibootmgr to Adjust Your Boot Priority”. In the end I’ve removed (literally!) the folder “ubuntu” under the path