You may need to re-run your boot loader[grub]

February 19, 2015

Image for You may need to re-run your boot loader[grub] from unsplash.com

After updating an Ubuntu server I occasionally see the message you may need to re-run your boot loader[grub] after updating the kernel:

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.13.0-44-generic
Found initrd image: /boot/initrd.img-3.13.0-44-generic
Found linux image: /boot/vmlinuz-3.11.0-12-generic
Found initrd image: /boot/initrd.img-3.11.0-12-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old
  you may need to re-run your boot loader[grub]
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old
  you may need to re-run your boot loader[grub]

To actually perform the update you need to run the following command:

sudo update-grub

This will regenerate the Grub config file:

# sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.13.0-44-generic
Found initrd image: /boot/initrd.img-3.13.0-44-generic
Found linux image: /boot/vmlinuz-3.11.0-12-generic
Found initrd image: /boot/initrd.img-3.11.0-12-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done

Hope this helps somebody!