Grub Configuration Hangs During Kernel Update On Ubuntu Running In Hyper-V

Published October 6th, 2015

There is an issue which you may encounter when updating an Ubuntu kernel when running Ubuntu in a Hyper-V environment. When trying to update a kernel you may encounter text such as that displayed below after which the update process will cease to continue and just stall at this spot.

Generating grub configuration file …
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-3.19.0-15-generic
Found initrd image: /boot/initrd.img-3.19.0-15-generic

What you will need to do in order to allow Grub to configure itself properly and continue on with updates is to stop the update process then add a line to the file /etc/default/grub.

sudo nano /etc/default/grub

Once the file /etc/default/grub is opened in your favorite text editor add the following line to the end of the file.


Once the file is saved run the next command in order to update Grub.

sudo update-grub

After making this change and running the grub updater you can continue on with your updates.

The following explains what GRUB_DISABLE_OS_PROBER is and does and is an excerpt from Ubuntu's help site on a page regarding the setup of Grub2.

"This entry is used to prevent GRUB from adding the results of os-prober to the menu. A value of "true" disables the os-prober check of other partitions for operating systems, including Windows, Linux, OSX and Hurd, during execution of the update-grub command."