Question

apt update breaks grub on Ubuntu 20.04

Posted July 31, 2020 895 views
Ubuntu 20.04

I created an Ubuntu 20.04 droplet and followed the How To Install and Configure Laravel with Nginx on Ubuntu 20.04 and when I logged in I saw:

96 updates can be installed immediately.
34 of these updates are security updates.

So first thing I did was run

apt-get update 
apt-get upgrade

I get a package configuration for Configuring grub-pc,

GRUB failed to install to the following devices:                                     

/dev/sda                                                                             

Do you want to continue anyway? If you do, your computer may not start up properly. 

Writing GRUB to boot device failed - continue?

If I choose yes, complete the upgrade, then reboot it doesn’t come back. When I look in the console from the droplet menu I have a grub error.

error: symbol 'grub_calloc' not found.
Entering Rescue mode...
grub rescue>

How am I supposed to update my droplet from a base image without triggering this landmine?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi there @tysonvanover,

I just created a brand new Ubuntu 20.04 Droplet and ran apt update and apt upgrade and it all went through as normal:

Processing triggers for linux-image-5.4.0-42-generic (5.4.0-42.46) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-42-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-42-generic
Found initrd image: /boot/initrd.img-5.4.0-42-generic
Found linux image: /boot/vmlinuz-5.4.0-29-generic
Found initrd image: /boot/initrd.img-5.4.0-29-generic
done

Did you have any other packages that you installed before running the upgrades?

On another note, I could suggest trying out this Laravel image from the marketplace:

https://marketplace.digitalocean.com/apps/laravel

It comes with LEMP and Laravel installed and preconfigured.

Regards,
Bobby

Submit an Answer