Ubuntu fails to start by default after upgrade 18.04 to 20.04

Asked by Joachim Lindenberg on 2021-06-01

I tried to upgrade an Ubuntu 18.04 to 20.04 two weeks ago. The system is a server type installation running as a virtual machine on Hyper-V, primarily running letsencrypt and nginx.

Actually I tried twice, both upgrades left me with a system that doesn´t boot by default. The first iteration was I tried to accept maintainer version for the boot/grub menu, and as that didn´t restart properly, I tried another time, this time keeping my own version. Both upgrades left me with a system that was not booting.

With the second upgrade, I experimented a little more. When the system restarts, I am stuck with it doesn´t boot. When I then power off and power on again, I get a boot menu with the options Ubuntu, Advanced options for Ubuntu, and UEFI Firmware Settings. With Advanced I get Ubuntu with various kernel options, with Linux 5.4.0-73-generic w/o recovery mode, and Linux 4.15.0-143-generic w/o recovery mode. The variants with 4.15.0-143 actually work, whereas 5.4.0-73 doesn´t work.

I do have some VMs that run 20.04 with kernel 5.4.0-something, thus I assume it is an issue caused by the upgrade or previous installation.

Any idea what to look for?

I asked this already at https://askubuntu.com/questions/1338236/ubuntu-fails-to-start-by-default-after-upgrade-18-04-to-20-04 but didn´t get a response that helped me to resolve the issue.

Thanks, Joachim

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

What exactly happens when you try booting normally?

Have you tried booting in "advanced - older kernel" and then re-installed the grub and kernel packages?

Revision history for this message
Joachim Lindenberg (jlindenberg) said :
#2

booting normally => system hangs already on BIOS screen.
reinstallation of grub as indicated on https://askubuntu.com/questions/1338236/ubuntu-fails-to-start-by-default-after-upgrade-18-04-to-20-04 didn´t solve the issue. Also I assume I am using grub2 already, but not 100% sure.
No idea, thus any hint appreciated.
Thanks, Joachim

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

For diagnostic purposes, what is the output of the commands

uname -a
lsb_release -crid
sudo dpkg --audit
dpkg -l | grep grub

(You may redact proprietary information if you deem that necessary)

Revision history for this message
Joachim Lindenberg (jlindenberg) said (last edit ):
#4

root@letsencrypt:~$ uname -a
Linux letsencrypt 4.15.0-143-generic #147-Ubuntu SMP Wed Apr 14 16:10:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
root@letsencrypt:~$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
root@letsencrypt:/home/joachim# dpkg --audit
root@letsencrypt:/home/joachim# dpkg -l | grep grub
ii grub-common 2.04-1ubuntu26.11 amd64 GRand Unified Bootloader (common files)
ii grub-efi-amd64 2.04-1ubuntu44 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
ii grub-efi-amd64-bin 2.04-1ubuntu44 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 modules)
ii grub-efi-amd64-signed 1.167+2.04-1ubuntu44 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version, signed)
ii grub-legacy-ec2 1:1ubuntu1 all Handles update-grub for ec2 instances
rc grub-pc 2.02-2ubuntu8.2 amd64 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub2-common 2.04-1ubuntu26.11 amd64 GRand Unified Bootloader (common files for version 2)

No idea what the output were in case I´d pick the 5.4 kernel during boot..
Thanks, Joachim

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

Your output confirms that you are running grub2.

"system hangs already on BIOS screen."
If the system is really hanging during the BIOS start phase, then this is not an Ubuntu problem, because Ubuntu is started only after BIOS.

Revision history for this message
Joachim Lindenberg (jlindenberg) said :
#6

I disagree. The BIOS screen of Hyper-V is just shown until it is replaced by something else - and before the upgrade or with kernel 4.15 the screen is replaced with startup messages. This just indicates the upgrade caused an error very early in startup.
And whether it is BIOS, kernel, or upgrade - I don´t know.
Thanks, Joachim

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

Can you describe what exactly happens when you force the grub menu to show when booting, and then select to boot "Ubuntu"?

Revision history for this message
Joachim Lindenberg (jlindenberg) said :
#8

when I go via Grub Menu and select first "Advanced options for Ubuntu", then "Ubuntu with Linux 5.4.073-generic" (this is the default)
then I get

Loading Linux 5.4.0-73-generic ...
Loading initial ramdisk ...

and then system dead. Actually the BIOS screen disappeared this time, but I have seen other instances that left it in place, and also no message. I guess this was a good take however.

Same sequence with "Ubuntu with Linux 4.15.." and the system boots successfully.

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

This may indicate that there is something wrong in the kernel files for booting.

My suggestion:
Boot into the 4.15 kernel and reinstall all kernel packages from version 5.4.0-73-generic

The command
dpkg -l | grep 5.4.0-73-generic
will list them, and then execute the command
sudo apt install --reinstall linux-image-5.4.0-73-generic linux-modules-5.4.0-73-generic linux-modules-extra-5.4.0-73-generic
(Adapt the list to match what you already have installed)

Revision history for this message
Joachim Lindenberg (jlindenberg) said :
#10

tried that, including headers, but system still does not boot with 5.4.

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

I am sorry, but I am at my wits' end.

Maybe future kernel versions may help, there is already 5.4.0-74 in focal-proposed.

And a complete different approach would be to switch to the hwe kernel series (currently 5.8.0-54) by installing linux-generic-hwe-20.04

Revision history for this message
Joachim Lindenberg (jlindenberg) said :
#12

I tried hwe kernel right now and same problem. Also I don´t really think newer (virtual) drivers are required for Hyper-V.
Any idea how to proceed? A bug report? what component?
Thanks, Joachim

Revision history for this message
Manfred Hampl (m-hampl) said :
#13

If you already have done all suggestions that are listed in the askubuntu question (update-grub, grub-install, etc.), then I do not know what else can be done.
For creating a bug report I would have suggested the kernel packages "linux" as target, but if you have the same effects also with hwe, then the culprit may be somewhere else.

Can you help with this problem?

Provide an answer of your own, or ask Joachim Lindenberg for more information if necessary.

To post a message you must log in.