When upgrading Ubuntu 18.04 or Ubuntu 20.04 on your BinaryLane cloud server, you may see a message like this:
Setting up grub-efi-amd64-signed (1.142.6+2.04-1ubuntu26.4) ... Unknown device "/dev/disk/by-id/*": No such file or directory dpkg: error processing package grub-efi-amd64-signed (--configure): installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: grub-efi-amd64-signed E: Sub-process /usr/bin/dpkg returned an error code (1)
This error occurs because of a recent change to Ubuntu repository that marks EFI boot packages as essential, but our VPS do not use EFI. To correct this fault, run the following commands separately as root:
apt-get install -y grub-pc 'grub-efi*-' --allow-remove-essential && grub-install /dev/vda GRUB_CMDLINE='s/^(GRUB_CMDLINE_LINUX_DEFAULT=)"[^"]*"/\1"quiet nosplash net.ifnames=0 vga=770"/' sed -Ei "$GRUB_CMDLINE" /etc/default/grub && update-grub