After the primary (root) disk was replaced by a new disk with a bigger size, the update-initramfs command started to throw warnings to stdout.
Note: This was seen when a new Kernel (linux-image) package was installed through apt, as this triggers an update-initramfs in the background.
Of course the output from apt can be reproduced, by launching update-initramfs manually:
root@focal:~# update-initramfs -k all -u
update-initramfs: Generating /boot/initrd.img-5.4.0-88-generic
cryptsetup: ERROR: Couldn't resolve device
UUID=22b84831-047a-4ce4-a083-3d1999b6b3a7
W: initramfs-tools configuration sets RESUME=UUID=22b84831-047a-4ce4-a083-3d1999b6b3a7
W: but no matching swap device is available.
I: The initramfs will attempt to resume from /dev/sdd2
I: (UUID=eb73c48f-3c85-41df-a5f4-004c8aa264b1)
I: Set the RESUME variable to override this.
update-initramfs: Generating /boot/initrd.img-4.15.0-159-generic
cryptsetup: ERROR: Couldn't resolve device
UUID=22b84831-047a-4ce4-a083-3d1999b6b3a7
W: initramfs-tools configuration sets RESUME=UUID=22b84831-047a-4ce4-a083-3d1999b6b3a7
W: but no matching swap device is available.
I: The initramfs will attempt to resume from /dev/sdd2
I: (UUID=eb73c48f-3c85-41df-a5f4-004c8aa264b1)
I: Set the RESUME variable to override this.
update-initramfs: Generating /boot/initrd.img-4.4.0-166-generic
modinfo: ERROR: could not get modinfo from 'crc32': No such file or directory
cryptsetup: ERROR: Couldn't resolve device
UUID=22b84831-047a-4ce4-a083-3d1999b6b3a7
W: initramfs-tools configuration sets RESUME=UUID=22b84831-047a-4ce4-a083-3d1999b6b3a7
W: but no matching swap device is available.
I: The initramfs will attempt to resume from /dev/sdd2
I: (UUID=eb73c48f-3c85-41df-a5f4-004c8aa264b1)
I: Set the RESUME variable to override this.
Although the warnings might sound cryptic, they are actually self-explaining: The current initramfs config (in /etc/initramfs-tools) points to another device (the previous primary disk) in the RESUME variable. But as the previous disk was replaced, it cannot be found anymore. The warning/information goes on that it would proceed with /dev/sdd2 (the current swap partition) but that the new UUID of /dev/sdd2 should be set in the RESUME variable.
Taking a look at the current UUIDs shows:
root@focal:~# ll /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Oct 14 12:04 0aeef443-e48a-4023-9776-e0f492833dac -> ../../dm-2
lrwxrwxrwx 1 root root 10 Oct 14 12:04 0df59b8a-4285-404d-942f-6d2b8293f653 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Oct 14 12:04 210e1adf-38f7-40b8-b612-55b693c71943 -> ../../sdd1
lrwxrwxrwx 1 root root 10 Oct 14 12:04 3dbd5c6d-4ef6-4600-9013-f9360fcc668f -> ../../dm-0
lrwxrwxrwx 1 root root 10 Oct 14 12:04 eb73c48f-3c85-41df-a5f4-004c8aa264b1 -> ../../sdd2
As an alternative, you can also use lsblk -f to see the UUIDs of the partitions (which also shows which partition is used as swap):
root@focal:~# lsblk -f
NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
fd0
sda LVM2_member eVjEig-Hgfi-cEjU-kPKR-GMQ8-rr3k-jiF3eF
|-vges-lves ext4 0aeef443-e48a-4023-9776-e0f492833dac 2.1T 68% /var/lib/elasticsearch
sdb LVM2_member efCcB1-7pmb-SVy5-AB1h-Lgli-J651-b5UYtW
|-vges-lves ext4 0aeef443-e48a-4023-9776-e0f492833dac 2.1T 68% /var/lib/elasticsearch
sdc LVM2_member cvB1oD-G4Mg-aEGI-aoKl-K2MA-Fzei-Ga2tNh
|-vges-lves ext4 0aeef443-e48a-4023-9776-e0f492833dac 2.1T 68% /var/lib/elasticsearch
sdd
|-sdd1 ext4 210e1adf-38f7-40b8-b612-55b693c71943 9.7G 29% /
|-sdd2 swap eb73c48f-3c85-41df-a5f4-004c8aa264b1 [SWAP]
|-sdd3
|-sdd5 LVM2_member VJnIWZ-x7sJ-vdYP-X3m6-zCAQ-3zYr-Qj3rHm
|-vgsystem-lvtmp ext4 3dbd5c6d-4ef6-4600-9013-f9360fcc668f 894.1M 0% /tmp
|-vgsystem-lvvar ext4 0df59b8a-4285-404d-942f-6d2b8293f653 4.8G 54% /var
sr0
Now let's take a look at the RESUME variable of the initramfs config:
root@focal:~# cat /etc/initramfs-tools/conf.d/resume
RESUME=UUID=22b84831-047a-4ce4-a083-3d1999b6b3a7
Indeed, this UUID does not exist on the system anymore. Let's use the new swap UUID:
root@focal:~# vi /etc/initramfs-tools/conf.d/resume
root@focal:~# cat /etc/initramfs-tools/conf.d/resume
#RESUME=UUID=22b84831-047a-4ce4-a083-3d1999b6b3a7
RESUME=UUID=eb73c48f-3c85-41df-a5f4-004c8aa264b1
And then run update-initramfs again:
root@focal:~# update-initramfs -k all -u
update-initramfs: Generating /boot/initrd.img-5.4.0-88-generic
update-initramfs: Generating /boot/initrd.img-4.15.0-159-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-166-generic
modinfo: ERROR: could not get modinfo from 'crc32': No such file or directory
This time, initramfs ran through without RESUME warnings.
Note: The crc32 error can be ignored. It shows up since Ubuntu 20.04 (Focal Fossa).
Then run update-grub:
root@focal:~# update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-88-generic
Found initrd image: /boot/initrd.img-5.4.0-88-generic
Found linux image: /boot/vmlinuz-4.15.0-159-generic
Found initrd image: /boot/initrd.img-4.15.0-159-generic
Found linux image: /boot/vmlinuz-4.4.0-166-generic
Found initrd image: /boot/initrd.img-4.4.0-166-generic
WARNING: PV /dev/sda in VG vges is using an old PV header, modify the VG to update.
WARNING: PV /dev/sdb in VG vges is using an old PV header, modify the VG to update.
WARNING: PV /dev/sdc in VG vges is using an old PV header, modify the VG to update.
done
Note: The LVM warnings show that the volume group is using an old PV header. <- Click on the link to find out how to solve this.
And just to be on the safe side, install grub on the primary disk (/dev/sdd on this particular server):
root@focal:~# grub-install /dev/sdd
Installing for i386-pc platform.
Installation finished. No error reported.
xfox from China wrote on Jul 5th, 2023:
Thanks, It help me slove a warming when I install podman.
I past some log at this :
/*
Setting up gsettings-desktop-schemas (3.38.0-2) ...
Processing triggers for initramfs-tools (0.140) ...
update-initramfs: Generating /boot/initrd.img-5.10.0-22-amd64
W: initramfs-tools configuration sets RESUME=UUID=ce6293d2-c011-4352-b2b9-d97e62080902
W: but no matching swap device is available.
I: The initramfs will attempt to resume from /dev/vda2
I: (UUID=ba3fb0ef-6939-4094-806f-0b60ed7d8f0f)
I: Set the RESUME variable to override this.
*/
ck from Switzerland wrote on Mar 24th, 2023:
Jalil, I am not sure about this one: Warning: Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified, as I have not seen this one before. The other warning (Warning: os-prober will not be executed to detect other bootable partitions.) can definitely be ignored as this is a common message seen in Ubuntu 22.04 systems. Usually a warning does not stop the creation or creates a faulty initramfs, only errors do.
Jalil from wrote on Mar 24th, 2023:
Hi,
After using the update-grub command, I get this error on my ubuntu 22.04:
# update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Warning: Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used.
Found linux image: /boot/vmlinuz-5.15.0-67-generic
Found initrd image: /boot/initrd.img-5.15.0-67-generic
Found linux image: /boot/vmlinuz-5.4.0-144-generic
Found initrd image: /boot/initrd.img-5.4.0-144-generic
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
Is it safe to ignore this warning?
Thanks for your answers.
Pixor from FR wrote on Feb 24th, 2023:
Thanks ! That helped me to solve my problem.
Knutowskie from wrote on Aug 5th, 2022:
Thank you for the working solution. I had this issue today on a uptodate debian vm. Seems like there happened something weird during install, because meanwhile nothing disk related was changed. Somehow the SWAP got a new UUID.
Stu from wrote on May 27th, 2022:
Thanks
Reggie T from wrote on Mar 24th, 2022:
Good contribution to the world. Thanks you.
Osvaldo Mello from wrote on Jan 14th, 2022:
Thank you!
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Containers CouchDB DB DNS Database Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera Git GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Influx Internet Java KVM Kibana Kodi Kubernetes LVM LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Office PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Python Rancher Rant Redis Roundcube SSL Samba Seafile Security Shell SmartOS Solaris Surveillance Systemd TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder