我的电脑正在启动到紧急模式:无法挂载 /media/cdrom

我的电脑正在启动到紧急模式:无法挂载 /media/cdrom

当我打开电脑时,收到以下错误消息:

After logging in, type "journalctl -xb" to view system logs
'systemctl 1 reboot' to reboot, 'systemctl 1 default' 
or ^D to try again to boot into default mode.

输出journalctl -xb如下

包括“无法挂载 /media/cdrom”的红色文本

其中红色的部分我认为是导致紧急模式的原因。

我是 Ubuntu 新手。我正在使用 Ubuntu 16.04。

的输出cat /etc/fstab如下:

带有语法高亮的 fstab 内容 - 似乎是 vim,而不是所述的 cat 文件的输出

当我运行命令时vim /etc/fstab我收到了此消息。

325: ATTENTION
Found a swap file by the name "/etc/.fstab.swp"
owned by: root   dated: Tue Sep 12 18:39:36 2017
file name: /etc/fstab
modified: YES
user name: root   host name: pavan-desktop
process ID: 4439
[not usable on this computer]

While opening file "/etc/fstab"
             dated: Mon Sep 11 19:21:36 2017


(1) Another program may be editing the same file.  If this is the case,
    be careful not to end up with two different instances of the same
    file when making changes.  Quit, or continue with caution.

(2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r /etc/fstab"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file "/etc/.fstab.swp"
    to avoid this message.

Swap file "/etc/.fstab.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:

Swap file "/etc/.fstab.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:

Swap file "/etc/.fstab.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort: 

答案1

发生这种情况是因为您的系统出于某种原因附加了/dev/sr0/etc/fstab文件。您需要禁用此项。

  • 通过恢复模式启动计算机并进入root选项;
  • 键入mount -o remount, rw /以允许对 / 文件夹具有写权限;
  • 编辑/etc/fstab并评论引用/dev/sr0;
  • 保存此文件并重新启动系统。

相关内容