Solution to an error that occurs when you upgrade the kernel of an Alibaba Cloud Linux 3.8 image
Alibaba Cloud has confirmed that an error occurs when you upgrade the kernel of an Alibaba Cloud Linux 3.8 image. This topic describes the impact of the issue and provides a solution.
Problem description
When you upgrade the kernel of an Alibaba Cloud Linux 3.8 image, an error message appears during the kernel package installation. However, the kernel package is installed successfully. The error message is similar to the one shown in the following figure.

Cause
To support more instance types, the Alibaba Cloud Linux 3.8 image includes extra kernel modules in its dracut configuration. Some of these modules are already built into the kernel vmlinuz file. As a result, the dracut tool reports an error during kernel package installation because it cannot find the corresponding module files. However, this error does not affect the installation or upgrade of the kernel package.
Scope of impact
This issue affects the following versions of Alibaba Cloud Linux 3 images with an image ID date between 20230727 and 20230925:
Alibaba Cloud Linux 3.2104 LTS 64-bit
Alibaba Cloud Linux 3.2104 LTS 64-bit Quick Launch Edition
Alibaba Cloud Linux 3.2104 LTS 64-bit MLPS 2.0 Level 3 Edition
Alibaba Cloud Linux 3.2104 LTS 64-bit UEFI Edition
Alibaba Cloud Linux 3.2104 LTS 64-bit for ARM
Alibaba Cloud Linux 3.2104 LTS 64-bit for ARM MLPS 2.0 Level 3 Edition
Run the cat /etc/image-id command to query the image ID and image version. The output is similar to the following:
image_name="Alibaba Cloud Linux 3.2104 LTS 64 bit"
image_id="aliyun_3_x64_20G_alibase_20230727.vhd"
release_date="20230728162541"Solution
Remotely log on to the ECS instance that uses the Alibaba Cloud Linux 3.8 image.
For more information, see Log on to a Linux instance using Workbench.
Run the following command to remove the duplicate kernel modules.
x86 architecture
sudo sed -i "s/virtio_blk//" /etc/dracut.conf.d/virt-drivers.confARM architecture
sudo sed -i "s/xen-blkfront xen-netfront//" /etc/dracut.conf.d/virt-drivers.conf
Run the following command to upgrade the kernel again and confirm that the error is resolved.
sudo yum install kernel