UBUNTU 14.04/16.04 服务器启动:Dev Mount 失败,落入 initramfs

UBUNTU 14.04/16.04 Server Boot: Dev Mount failed, falls to initramfs

当使用 Ubuntu 14.04/16.04 引导虚拟服务器时(我在这两个方面都遇到了问题),它找不到 root 的 引导分区 并且系统崩溃到 initramfs shell 并出现以下错误:

(initframs) exit
Gave up waiting for root device. Common problems:
- Boot args (cat proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- Check root= (did the system wait for the right device?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/mapper/CAC_VG-CAC_LV does not exist. Dropping to a shell!

如果我输入

ls /dev/mapper/

我仍然可以看到错误中提到的分区(以及 GRUB 中)

root=/dev/mapper/CAC_VG-CAC_LV 

cat 输出如错误消息中所建议的那样

(initframs) cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-4.4.0-66-generic root=/dev/mapper/CAC_VG-CAC_LV ro

注意:它似乎以只读方式挂载设备(ro)。也许我应该在我设法启动系统后更改它...

如果我输入 exit,我会得到与上面相同的错误。 然后我尝试挂载:

mount -t ext4 /dev/mapper/CAC_VG-CAC_LV
mount: can't find /dev/mapper/CAC_VG-CAC_LV in /etc/fstab`

全新安装 Ubuntu 14.04 后我遇到了同样的问题 这确实有效!!

mount -o remount, rw /
lvm vgscan
lvm vgchange -a y
mount -t ext4 /dev/mapper/CAC_VG-CAC_LV /root
exit