2

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?

5

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
|improve this answer|||||
  • Please, point your elbow at the ceiling and pat yourself on the back... .. ! Run time down from 15 minutes to less than a second... .. ! – keepitsimpleengineer May 10 '16 at 18:10
0

I use an application called Grub-Customizer which allows you to disable the search for other operating systems and such. There are both 64 bit and 32 bit versions in the software center.

In the List Configuration tab, you can remove alternate kernel versions* from appearing, and in the General Settings tab, you can uncheck the box labelled "look for other operating systems." You can also change the amount of time the screen waits before automatically continuing the boot process on this same tab. Set it low enough that you still have time to select a memory test option if needed.

The app also allows you to select other background screens and fonts for the boot menu; make sure you read the warnings before doing that though.

I would not remove the grub screen, since you might some day wish you had quick access to memory tests and such things.

I hope this helps.

Frank

  • This does NOT remove the older kernel versions from your machine, however; it simply doesn't consider them during boot menu display.
|improve this answer|||||
  • Grub Customizer is only available from a PPA, not from the official Ubuntu repositories. – Byte Commander May 10 '16 at 18:09
  • 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 – FrankO May 14 '16 at 12:14
  • That's right, but please edit your question and add those commands there. People might miss them easily if they're only in the comments and not correctly formatted. Thank you! – Byte Commander May 14 '16 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.