EC2实例,"一般错误安装文件系统"

时间:2014-08-27 20:55:46

标签: linux ubuntu amazon-web-services ssh amazon-ec2

我有一个运行Ubuntu 12.04 LTS的AWS微实例,昨晚我在SSH时,我做了apt-get update,它给了我一个错误(我不记得哪个)。所以我想我会重新启动我的实例。今天早上,它说我的实例失败了一个Instance Sstaus Check,我无法通过SSH进入它。系统日志的底部如下。有没有办法保存这个,如果没有,无论如何都要保存数据?

谢谢!

Loading, please wait...
[35914369.823672] udevd[81]: starting version 175
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
[35914370.187877] EXT4-fs (xvda1): mounted filesystem with ordered data mode. Opts: (null)
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... done.
[35914373.347844] init: mountall main process (183) terminated with status 1
General error mounting filesystems.
A maintenance shell will now be started.
CONTROL-D will terminate this shell and reboot the system.
Give root password for maintenance
(or type Control-D to continue): 

2 个答案:

答案 0 :(得分:0)

这取决于文件系统的破坏程度。

您可以在AWS中启动新实例,然后将EBS卷附加到新实例。这可能有助于您恢复数据。

不要终止实例,否则你可能会完全丢失文件系统。

答案 1 :(得分:0)

在执行apt-get更新/升级或yum更新/升级之前,始终使用正在运行的实例的“创建AMI”选项。这样,如果您的系统在重新启动后(更新后)无法启动,您可以使用刚刚创建的AMI启动'之前'版本(即可启动)实例。

在这种情况下,Ubuntu可能尝试安装新的内核和/或ram文件系统(ramfs),因为这是一个具有内核和ramfs依赖关系的AWS虚拟机,标准的Ubuntu构建可能不符合这些依赖关系和你的虚拟机现在是吐司。

如上所述,如果您需要从无法启动的系统恢复数据,请将其EBS卷安装到正常工作的系统。它可能会抱怨它正在使用中。如果是这样,并且要保留EBS卷,则必须选中允许您在终止卷之前保留卷的选项。终止实例时的默认设置是销毁它的EBS卷,因为假设您从之前(或经常)创建的EBS支持的AMI启动。