系统不再启动,放弃等待root设备,(initramfs),/ dev / mapper / gnome-root不存在

安装更新后,我的系统不再启动。 我启用了全磁盘加密(安装程序为您设置的加密),因此通常在启动GRUB后仅几秒钟就会询问密钥。 现在,它跳过要求输入密钥,尝试加载Gnome,然后进入下图所示的屏幕。 该系统是运行Ubuntu Gnome 13.04的64位System76机器。 这在过去曾经发生在我身上,在运行Ubuntu Gnome Remix 12.10的戴尔XPS 8300 64位上。 在那种情况下,我重新安装了操作系统。 但是我想这次实际修复问题所以我知道将来如何处理它。 此外,从头开始重新安装非常不方便。

我的怀疑是,某些东西搞砸了/ boot中的配置文件,以至于它没有意识到磁盘是加密的,但是当我在那里闲逛时我没有看到任何东西。 你有什么想法解决它(除了重新安装操作系统)?

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/gnome-root does not exist. Dropping to a shell! BusyBox v.1.20.2 (Ubuntu 1:1.20.2-1ubuntu1) built-in shell (ash) Enter 'help' for list of built-in commands. (initramfs) 

我修好了!!! 对于后代,所以你不必经历痛苦的​​日子和无休止的时间,我做了:

首先,通过键入以下内容(我将此论坛页面用作拐杖),我能够从(initramfs)提示启动系统:

 cryptsetup luksOpen /dev/sda5 sda5_crypt lvm vgchange -ay exit 

这使我的系统正常启动。 启动后,我修改了/etc/crypttab以指向与以前不同的UUID。 我从/etc/fstab选择了UUID。 保存原始UUID值。 您只需几步即可完成。 我然后跑(从终端):

 update-initramfs -k all -c 

如果您收到类似这样或类似的警告:

 WARNING: invalid line in /etc/crypttab 

然后回到开头而不是sda5_crypt ,使用你的crypttab中的crypttab

然后我重新启动了。 这次我得到了密码的提示! 但是不要太兴奋,因为它不起作用。 我输入了正确的密码大约7次,它全部拒绝了。 然后在大约90秒后返回到(initramfs)提示符。

我重复了第一步并重新启动了它。 然后我将原始 UUID值恢复到crypttab ,然后重新启动第二步。 然后我重新启动,并成功!

由于全盘加密是Ubuntu 14.04中的一个选项,我只是想指出我是如何解决这个问题的,因为我的initramfs终端不允许我使用cryptsetup

  1. 从Live DVD / USB启动(USB将快得多)。

  2. 打开终端并键入以下内容:

     sudo -i cryptsetup luksOpen /dev/sda5 sda5_crypt # (do any lvm management you need here, I didn't need any.) mkdir /mnt/system mount /dev/mapper/ubuntu--vg-root /mnt/system mount /dev/sda2 /mnt/system/boot mount /dev/sda1 /mnt/system/boot/efi (May or may not be needed.) for i in /dev/pts /dev /proc /sys; do mount -B $i /mnt/system$i; done chroot /mnt/system update-initramfs -k all -c exit for i in /dev/pts /dev /proc /sys; do umount /mnt/system$i; done umount /mnt/system/boot/efi # (If you have UEFI.) umount /mnt/system/boot umount /mnt/system 
  3. 重启并希望它有效。

通过live-cd / live-usb启动修复你的grub。 有关此过程的详细信息,请参阅此页面 。 请参阅页面上的“通过LiveCD终端”部分。

修复grub应修复grub配置中可能存在的任何格式错误的文件。