How to bypass or stop the very long run times of grub2/os-prober?

6,410

os-prober is used to find other operating systems you might have installed on your drives and add them to your grub menu during boot.

If you want to disable os-prober you can edit /etc/default/grub (with root privileges) and add this line:

GRUB_DISABLE_OS_PROBER=true
Share:
6,410

Related videos on Youtube

keepitsimpleengineer
Author by

keepitsimpleengineer

Retired from… System Admin (Unix/Linux) Oracle DBA/Developer GUI Application Developer Simulation Engineer·Real-time Hardware in Loop Technical Project Engineering College Instructor (programming) Flight Test Engineer Aerospace Engineer Flight Test Data Analysis …after 45 years. About time! Now I futz around with my six computers, two Windows systems and six Linux systems two archlinux, one Debian and two Ubuntus. Help out friends and post stuff that I have worked through and think might help others. Also dabble in cooking, photography, music and goofing off.

Updated on September 18, 2022

Comments

  • keepitsimpleengineer
    keepitsimpleengineer over 1 year

    Whenever I upgrade Ubuntu 16.04 and there is a kernel upgrade, the update process takes a very long time when running (os-prober) and also generates the grub configuration multiple times.

    os-prober Running

    And for some inexplicable reason to me it runs more than once...

    Setting up openssh-client (1:7.2p2-4ubuntu1) ...
    Setting up linux-image-4.4.0-22-generic (4.4.0-22.39) ...
    Running depmod.
    update-initramfs: deferring update (hook will be called later)
    Examining /etc/kernel/postinst.d.
    run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
    run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
    update-initramfs: Generating /boot/initrd.img-4.4.0-22-generic
    run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
    run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
    run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
    run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
    Generating grub configuration file ...
    Found linux image: /boot/vmlinuz-4.4.0-22-generic
    Found initrd image: /boot/initrd.img-4.4.0-22-generic
    Found linux image: /boot/vmlinuz-4.4.0-21-generic
    Found initrd image: /boot/initrd.img-4.4.0-21-generic
    Found memtest86+ image: /boot/memtest86+.elf
    Found memtest86+ image: /boot/memtest86+.bin
    grub-probe: error: cannot find a GRUB drive for /dev/sdf1.  Check your device.map.
    Found Windows 10 (loader) on /dev/sda1
    Found Arch on /dev/sdb2
    Found Ubuntu 14.04.4 LTS (14.04) on /dev/sdd2
    done
    Setting up linux-image-extra-4.4.0-22-generic (4.4.0-22.39) ...
    run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
    run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
    update-initramfs: Generating /boot/initrd.img-4.4.0-22-generic
    run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
    run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
    run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
    run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
    Generating grub configuration file ...
    Found linux image: /boot/vmlinuz-4.4.0-22-generic
    Found initrd image: /boot/initrd.img-4.4.0-22-generic
    Found linux image: /boot/vmlinuz-4.4.0-21-generic
    Found initrd image: /boot/initrd.img-4.4.0-21-generic
    Found memtest86+ image: /boot/memtest86+.elf
    Found memtest86+ image: /boot/memtest86+.bin
    

    Note: /dev/sdf is a USB thumb drive

    Is there anyway to stop this behavior or by-pass running grub2 altogether as it is not really used or needed?

  • keepitsimpleengineer
    keepitsimpleengineer almost 8 years
    Please, point your elbow at the ceiling and pat yourself on the back... .. ! Run time down from 15 minutes to less than a second... .. !
  • FrankO
    FrankO almost 8 years
    Correct: Use the terminal command (show the terminal with Ctrl+Alt+T) below to add the PPA to your repository: sudo add-apt-repository ppa:danielrichter2007/grub-customizer Then use the command below to install it: sudo apt-get update && sudo apt-get install grub-customizer