tencent cloud

Cloud Virtual Machine

System initramfs or initrd File Damaged/Missing

PDF
Focus Mode
Font Size
Last updated: 2025-11-25 11:26:08

Symptom Description

An error message appears during command execution or system startup. For example, VFS: Unable to mount root fs on unknown-block or error: file '/boot/initramfs-`uname -r`.img' not found .

Possible Causes

1. If system startup fails and VFS: Unable to mount root fs on unknown-block is output, initramfs or initrd may have problems, and regeneration of initramfs or initrd is required, as shown below:



2. If system startup fails and error: file '/boot/initramfs-`uname -r`.img' not found is output, the initramfs or initrd file in the /boot directory may be missing, as shown below:



Both scenarios above can cause a system startup failure. You can follow instructions in Troubleshooting to perform checks and regenerate initramfs or initrd.

Troubleshooting

1. Enter the rescue mode as described in Using the Rescue Mode to Repair the System.
2. Run the mount and chroot commands.
mkdir -p /mnt/vm1
mount /dev/vda1 /mnt/vm1
mount -o bind /dev /mnt/vm1/dev
mount -o bind /dev/pts /mnt/vm1/dev/pts
mount -o bind /proc /mnt/vm1/proc
mount -o bind /run /mnt/vm1/run
mount -o bind /sys /mnt/vm1/sys
chroot /mnt/vm1 /bin/bash
3. Run the following command to regenerate initramfs or initrd.
wget http://mirrors.tencentyun.com/install/cts/linux/cvmrescue_main.sh && chmod +x cvmrescue_main.sh && ./cvmrescue_main.sh -m rebuild_initramfs
If you encounter a domain name resolution failure, configure 169.254.0.3 mirrors.tencentyun.com in /etc/hosts to resolve the software repository. The added content is shown in the following figure.

The following output indicates that initramfs or initrd has been successfully generated.



4. Exit the rescue mode as described in Using the Rescue Mode to Repair the System and start the system.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback