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
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.
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.