What are these errors on apt upgrade?

I did an "apt update" and an "upgrade upgrade" to my Ubuntu 20.x server. It ran ok, but hung for a while at 65%. What do these errors mean and should I be concerned about them? What is the "RESUME variable?"

Unpacking linux-firmware (1.187.16) over (1.187.15) ...
Preparing to unpack .../6-sysstat_12.2.0-2ubuntu0.1_amd64.deb ...
Unpacking sysstat (12.2.0-2ubuntu0.1) over (12.2.0-2) ...
Setting up motd-news-config (11ubuntu5.4) ...
Setting up linux-firmware (1.187.16) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-81-generic
cryptsetup: ERROR: Couldn't resolve device /dev/root
cryptsetup: WARNING: Couldn't determine root device
I: The initramfs will attempt to resume from /dev/sdb
I: (UUID=0a32d7ba-885c-473d-a894-0010b32eb177)
I: Set the RESUME variable to override this.
update-initramfs: Generating /boot/initrd.img-5.4.0-80-generic
cryptsetup: ERROR: Couldn't resolve device /dev/root
cryptsetup: WARNING: Couldn't determine root device
I: The initramfs will attempt to resume from /dev/sdb
I: (UUID=0a32d7ba-885c-473d-a894-0010b32eb177)
I: Set the RESUME variable to override this.

update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-81-generic
cryptsetup: ERROR: Couldn't resolve device /dev/root
cryptsetup: WARNING: Couldn't determine root device
I: The initramfs will attempt to resume from /dev/sdb
I: (UUID=0a32d7ba-885c-473d-a894-0010b32eb177)
I: Set the RESUME variable to override this.

6 Replies

You have an encrypted filesystem that's not configured correctly. Hoo boy…are you in for some fun times… I hope you have (unencrypted) backups!

See: https://askubuntu.com/questions/316486/problems-with-cryptsetup-during-update

See: https://unix.stackexchange.com/questions/625490/cryptsetup-error-couldnt-resolve-device-combined-with-cryptsetup-warning

IMHO, if you can't fix this in an hour, you're probably looking at rebuilding your Linode…

Word to the wise…unless your boss tells you that you're fired unless you set up an encrypted file system or you're involved in spook-/black-ops work, encrypted file systems offer very little in terms of enhanced security. What they do offer is a whole lotta headaches…and Linus screams bloody murder whenever someone asks him about ZFS!

-- sw

Hmmm. I never set up anything encrypted. I spun up a plain vanilla Ubuntu 20.x LTS server just for a few websites. How it got encrypted is beyond me and I have no idea how to 'fix' it. I surely don't want to take the time to spin up a new server.

Is there a further diagnosis I can do to see where these encrypted files are? I guarantee you that I didn't encrypt them. (I have no idea even how to encrypt them!) I have no need for encryptino as there is nothing 'target rich' on this server, and the sites function just fine.

I hope you can further enlighten me on this. I'm confused.

(I opened up a support tix so maybe the Linode folks will help.)

There’s some information here on Debian’s forum about that error message. See if this helps. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=607307

Here is the answer I got back from the Linode support staff about these errors… in two parts:

Thanks for passing along that output, and I'd be happy to look this over with you. Please keep in mind that as this issue pertains to your Linodes internal configuration, it does fall outside of our scope of support. While we'll always do our best to provide resources and a point in the right direction, there may come a point where we are no longer able to assist with issues such as this.

I was unfamiliar with this error myself, and after doing some research I came across the following Community Post

https://www.linode.com/community/questions/17283/apt-get-update-and-upgrade-question-on-ubuntu-18#answer-67300

as well as the following Stack Overflow post.

https://stackoverflow.com/questions/36826284/how-can-i-resolve-these-cryptsetup-warning-messages-following-ubuntu-server-u

The key takeaway I got from reading these over is that the package cryptsetup is checking your /etc/fstab for drive UUIDS, which Linode does not use as part of its infrastructure and thus the error message is being generated. These should be safe to ignore, though you'll likely see this error whenever an apt upgrade brings along an update to grub or the kernel.

I hope this information helps. If you have any additional questions or concerns be sure to let us know. We're happy to assist.

=========================

First, I wanted to share some additional information about initrd. Linux uses initrd (initial ramdisk) as a method for loading a temporary root file system into memory, which may be used as part of the Linux startup process. Essentially it is used by the server to make preparations before the real root file system can be mounted. More information is available in the Debian documentation.

While I don't have a concrete answer whether multiple kernels exist within your Linode, this sort of situation is typically caused by the apt package manager not cleaning up pre-existing files during the upgrade process. After upgrading to a new Linux kernel, old kernels are not automatically deleted. They remain in your disk (/boot partition) and you have to delete them manually. From reviewing the text file and outputs you've shared this appears to be the likely culprit behind the behavior you are experiencing.

As Mike, and the Community Post he referenced, mentioned, these error messages are likely innocuous. With that said, I totally get how this situation could be less than ideal. My research does suggest that your thinking about sudo apt-get auto-remove may be able to resolve this situation. You could try running the following command with sudo privileges:

sudo apt-get auto-remove && apt-get clean && apt-get update && apt-get upgrade

This command should resolve the errors you are encountering, and then perform a fresh update and upgrade. If the issue persists then you may want to consult this post on the AskUbuntu forums for additional troubleshooting options:

Apt Initramfs Error When Installing/Updating - AskUbuntu

https://askubuntu.com/questions/1136480/initramfs-error-when-installing-updating

Hopefully I've got you pointed in the direction of a solution here. If you have any additional questions or concerns, please let us know. We're here to help in any way that we can.

===================

I've not done the apt auto remove commands yet I'll wait until the next update (next Sunday) and if I still get the update error I'll try it. I'm thinking that it may be due to the fact that there was an update to several versions of /initrd.img-5.4.0-81-generic as well as to the fact that "cryptsetup is checking your /etc/fstab for drive UUIDS, which Linode does not use as part of its infrastructure and thus the error message is being generated."

I hope this helps someone out there… I've spent hours and hours researching these errors!!!

Thanks for the legwork on this @acanton77

I too see similar messages when I do an apt upgrade. I too used a Ubuntu 20.04 LTS from linode.

The following note from support seems to indicate that the errors will not effect a linode.

cryptsetup is checking your /etc/fstab for drive UUIDS, which Linode >does not use as part of its infrastructure and thus the error message >is being generated. These should be safe to ignore, though you'll >likely see this error whenever an apt upgrade brings along an update >to grub or the kernel.

I'd like to fix it it I could. Did you have any luck with running the clean up commands?

sudo apt-get auto-remove && apt-get clean && apt-get update &&
apt-get upgrade

Alternatively I wonder if cryptsetup could be removed. I'll never used it and it appears to be installed by default.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct