答案1
启动另一个 Linux VM,并安装该磁盘以修复问题。
另外,为了避免在单用户模式下输入密码,请按以下方式更改/lib/systemd/system/rescue.service。
--- /lib/systemd/system/rescue.service.orig 2015-11-20 13:49:03.000000000 +0900
+++ /lib/systemd/system/rescue.service 2016-04-11 15:58:31.002000000 +0900
@@ -18,11 +18,11 @@
WorkingDirectory=/root
ExecStartPre=-/bin/plymouth quit
ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.'
-ExecStart=-/bin/sh -c "/usr/sbin/sulogin; /usr/bin/systemctl --fail --no-block default"
+ExecStart=-/bin/bash
Type=idle
StandardInput=tty-force
-StandardOutput=inherit
-StandardError=inherit
+StandardOutput=tty
+StandardError=tty
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes