[Solved] update-grub: What to do to make it faster?



please take a look at this:
[monastir ~]# time update-grub -v
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-4.19-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-4.19-x86_64.img
Found initrd fallback image: /boot/initramfs-4.19-x86_64-fallback.img
Found Windows 7 on /dev/sda1
Found Debian GNU/Linux buster/sid on /dev/sda10
Found MX 18.2 Continuum (18.2) on /dev/sda11
Found elementary OS 5.0 Juno (5.0) on /dev/sda12
Found Arch Linux on /dev/sda13
Found Windows 10 on /dev/sda2
Found Manjaro Linux (18.0.4) on /dev/sda5
Found Linux Mint 19.1 Tessa (19.1) on /dev/sda6
Found Solus (4.0) on /dev/sda7
Found Ubuntu 19.04 (19.04) on /dev/sda8
Found Fedora 30 (Thirty) on /dev/sda9
Found Parrot 4.6 (4.6) on /dev/sdd3
Found memtest86+ image: /boot/memtest86+/memtest.bin

real 12m34,604s
user 0m51,968s
sys 0m30,373s

Okay I test a lot of distros, but nearly 13 minutes?
As I observed in a other term with top it needs more than 7 minutes for Arch Linux and around 2 minutes for Fedora the others go faster.

Some ideas?
What can be done to better this in automatic mode?




Good question, I literally have no idea.

I am not sure GRUB on Manjaro has been tested for the edge case of having 12 different operating systems on one single machine. Most people only have either Manjaro alone or Manjaro + Windows and that's it. :confused:

Do you really have 12 OSes?

(Sorry in advance for not being helpful.)


Add more kernels too it will be great


It seems to me that a major distribution is missing: Gentoo !


I would completely lose the plot with so many GRUB entries...
If it's just about checking out distros, then virtual machines are really much simpler to use.

On topic:
I assume the other OS get chainloaded?
13 minutes is indeed a bit much...


Yes, I have. But the question is not how many I have. The question is at first why the detection of Arch Linux lasts more than 7 minutes?

Did they test with a other Arch distribution also?


Sorry, I regret, but my CPU is to poor for a source based distro.


The GRUB entries are made automatically and I have no experience with virtual machines.

Windows gets chainloaded only, the others are all detected by GRUB and work.


because it's not just a chainload but takes options of the differents OS and writes grub parameters for thats I think


are you by any chance using grub customizer on any of these distros?


No, I don't so far. I let the distros work on their own.

Would you suggest it?


NO, it's like giving grub an STD :rofl:

i was only asking because grub customizer had previously caused an issue for me where update-grub would take >10 min. if you had said yes, my first suggestion would of been to get rid of any trace of it and do a clean grub install.

1 Like

I think OP should go visit : https://www.virtualbox.org/wiki/Downloads instead of try to do a world record of multi-booting OS :joy:

1 Like

But the way from @gohlip is much cleaner and I use it.


At Arch, install package lsb-release, do update-grub there and then at manjaro do update-grub again. The time will improve.

ps: answering you because @SGS put in my link and I got pinged.
You have another topic somewhere, too busy to reply. Say thanks to @SGS.

ps: I have more OS's than you.
But I don't do this way. I don't have to update-grub anywhere. My grub boots all OS's without needing update-grub anywhere.


It turns out that Arch Linux and Fedora had no lsb-release package installed which I have now installed in both cases.

In Arch Linux this creates a file /etc/lsb-release but in Fedora there is only a folder /etc/lsb-release.d created with two files: core-4.1-amd64 and core-4.1-noarch.
Both provide the file /etc/os-release but thats perhaps not interesting to update-grub.

After this I did a new run on Manjaro and the result is now:

real	5m2,472s
user	0m59,050s
sys	0m35,291s

This is much better and reasonable okay.

By the way:
Fedora was not be able to detect my Windows installations with their grub2-mkconfig command which uses also os-prober.


Thanks for contacting gohlip.

1 Like

Best you also make (manually) a lsb-release for it. Just follow the usual syntax for lsb-release. Not important what these contents are. The time will improve further.

As for Fedora not detecting Windows, ask fedora. They have very klever people there. But hint.. mount windows first before doing grub2-mkconfig at fedora. Maybe they have more klever solutions, komplicated, konvoluted, and need linux.efi and initrd.efi for it.


I took a short look on the virtualbox website but I got the impression that it is only used to run one guest system at one tine, right?

But I have the HDD space so far and can compare the installed systems one after another or the filesystems and installed files by mounting them in my file manager.


:grinning: Why should I care for fedora when I have Manjaro...