Symptom
When the Linux system boots, Dracut reports an error indicating that a partition cannot be found, and the system fails to enter emergency mode, as shown in the following figure:
Reason
1. Due to a Grub configuration file error, a wrong root partition is set, and thus Dracut cannot find the root partition when trying to mount it.
2. The system cannot recognize the hard disk and cannot mount the root partition for some reason. For example, the new kernel has no corresponding RAID card driver for kernel upgrading.
Possible Reasons
Run ls /dev/ or lsblk in shell in the dracut emergency mode to check whether the hard disk is visible. If the hard disk is visible, this problem is caused by reason 1. Otherwise, it is caused by reason 2.
Solution
For the problem caused by reason 1:
· Method 1: Refer to the solution to Problem 1, reboot the system and use grub shell to enter the system, and update grub.cfg
· Method 2: In shell in dracut emergency mode, try to manually modify grub.cfg. See the following shell command.
blkid # Use blkid to get UUID of the root partition
GRUB_CFG=$(find /boot -name "grub.cfg")
vi $GURB_CFG # Find the string with root= in grub.cfg and change it to root=UUID=<UUID that can be queried in blkid>
reboot # Reboot the system
For the problem caused by reason 2:
If you have upgraded the kernel, reboot the system, select the old kernel from the grub boot menu (generally, the boot item of the old kernel is below the grub boot menu), and try to boot the kernel. After logging in to the system, you can update the hardware driver, for example, the RAID card.
If you cannot boot the system using the above method, or you have not upgraded the kernel, contact eSurfing Cloud for more help.