I am on unstable, and after a recent update (last few days), I’ve discovered that updating grub takes about five minutes to complete while OS-Prober does its thing. I do have a multi-boot setup with two SSDs. This happens on my Dell Latitude E6540 laptop, but it does not happen on my Lenova ThinkCentre pc.
(Pastebin says the output is offensive and made it private, so here’s the full code):
GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3"
# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
# Preload both GPT and MBR modules so that they are not missed
# Uncomment to enable booting from LUKS encrypted devices
# Uncomment to use basic console
# Uncomment to disable graphical terminal
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'
# Uncomment to allow the kernel use the same resolution used by grub
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
# Uncomment to disable generation of recovery mode menu entries
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
# Uncomment to ensure that the root filesystem is mounted read-only so that
# systemd-fsck can run the check automatically. We use 'fsck' by default, which
# needs 'rw' as boot parameter, to avoid delay in boot-time. 'fsck' needs to be
# removed from 'mkinitcpio.conf' to make 'systemd-fsck' work.
# See also Arch-Wiki: https://wiki.archlinux.org/index.php/Fsck#Boot_time_checking
I added the line for GRUB_DISABLE_OS_PROBER=false because OS-Prober failed to engage with update-grub – also resulting from a recent system update. OS-Prober was also taking forever to process once I got it to engage again.
Makes sense, although for me on this laptop, it went from about 30 seconds to several minutes after a single update. On my pc and a slower laptop, it still only takes 30 seconds for OS-Prober to detect two or three other systems.
I just checked and lsb-release is installed on three Arch-based distros on this machine (two Manjaro, one Arch). I’ll need to check Fedora and Debian. The controlling Grub is on the Manjaro XFCE that I’m using now, and lsb-release is already installed.
@mparillo , thanks for your suggestion. However, it’s manjaro xfce that controls grub so it’s arch based grub that is in question, not other distros’ grub.
In any case, I’ve got my custom.cfg nailed down already. All distros only need to update its own grub.cfg without OS prober detecting others. My custom entries then boot straight into the grub.cfg of each of these distros.
I always point people to the great work of our former member gohlip, who was the undisputed grub guru here previously. It’s now in the archived forum:
Read through the whole thread to examine the various examples of grub entries he provided. While I never bothered to make an os-independent bootloader in a separate partition, I based my entries in my /boot/grub/custom.cfg file on his examples.
The benefit of the custom.cfg file (you have to save it in your distro that’s controlling grub) is that it’s automatically read by the 41_custom script in /etc/grub.d folder and displayed whenever you boot up your machine.
Whenever you edit it, there is no need to run sudo update-grub, as this command merely re-generates grub.cfg, which is a separate file, read and displayed by the 10_linux script in /etc/grub.d folder.
To ensure that my custom.cfg entries are displayed in the boot menu before the grub.cfg entries, I run a
so that the custom.cfg script comes before 10_linux script and is read first. I have to redo this whenever there is a update to the grub package and they repopulate the scripts in /etc/grub.d/ [or rather, after the repopulation, I have to delete the extraneous 41_custom script since 09_custom already exists.]
Excellent — many thanks! Gholip indeed helped me on several occasions “back in the day,” including the complete removal of Grub Customizer early in my Manjaro career. He had a gift, for sure. I will study his instructions here after work…