Very slow boot loading of Linux Mint on a laptop

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:

systemd-analyze

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.

The problem

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.

Conclusion

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.

The solution

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!!! 😀

P.S.

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 /boot/efi/EFI.

About krzysztoftomaszewski

I've got M.Sc. in software engineering. I graduated in 2005 at Institute of Computer Science, Warsaw University of Technology, Faculty of Electronics and Information Technology. I'm working on computer software design and engineering continuously since 2004.
This entry was posted in BIOS, Linux and tagged , , , . Bookmark the permalink.

1 Response to Very slow boot loading of Linux Mint on a laptop

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s