0

I tried to upgrade my installation of Ubuntu 19.10 to 20.04 today. After restarting, it could not boot into kernel 5.4.0-29-generic, not even in recovery mode. I could no longer boot into 5.3.0-51-generic, but I could boot into its recovery mode.

This machine has a Threadripper 3990X, and I had trouble booting into 19.10 months ago when I first installed it. I forget what measures I had to take to get it working, but I remember it involved some boot parameters (I think mce=off), and the new GRUB entry has the same parameters.

I have an encrypted disk. When booting into 5.3.0-51-generic in recovery mode, it pauses to prompt me for the key to decrypt my disk, but when booting into 5.4.0-29-generic, it doesn't. Here are the last messages that appear on my screen ("screenshots" here):

mce: Unable to init MCE device (rc: -5)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.4.0-29-generic #33-Ubuntu
Hardware name: Micro-Star International Co., Ltd. MS-7C59/Creator TRX40 (MS-7C59), BIOS 1.20 01/07/2020
muru
  • 197,895
  • 55
  • 485
  • 740
  • have you tried to use the latest kernel 5.4.0-31 as far as i know people have problems with threadripper and some have had to replace the CPU with a new one. – trond hansen May 16 '20 at 05:35

1 Answers1

0

I was given this tip elsewhere:

The reason it's kernel panicking is it can't mount root fs. It can't mount root fs because it's encrypted. It can't decrypt it without an initrd. Fix would be: add initrd line to grub config for 5.4.0.

I added this line to the GRUB entry for 5.4.0-29-generic, based on the one for 5.3.0-51-generic:

initrd /initrd.img-5.4.0-29-generic

I got the error message that the file was missing. I booted into 5.3.0-51-generic in recovery mode and dropped into a root shell. I checked /boot, and both initrd.img-5.3.0-51-generic and initrd.img-5.3.0-46-generic were there, but initrd.img-5.4.0-29-generic wasn't. I searched and came upon this question. Based on that, I tried apt reinstall -f linux-image-5.4.0-29-generic, but it quickly failed with an error message (I forget) and told me to run dpkg --configure -a. I did that. It ran through a bunch of packages, stopping for manual intervention only to let me decide whether to keep changes I had made to /etc/pulse/default.pa. I'm guessing Ubuntu didn't know how to handle this required manual intervention in the upgrade to 20.04 and just left the packages in a broken state before restarting. Anyways, after making my decision, dpkg continued and I saw these lines:

Processing triggers for linux-image-5.4.0-29-generic (5.4.0-29.33) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.4.0-29-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-29-generic

After it was finished, I exited the shell, resumed normal booting, and it worked! Then I restarted, booting into the 5.4.0-29-generic kernel, and it worked again.