ubuntu-12.04 – 星期一早上的错误:sudo rm -rf –no-preserve-root /

Please note: The answers and comments to this question contains content from another,similar question that has received a lot of attention from outside media but turned out to be hoax question in some kind of viral marketing scheme. As we don’t allow ServerFault to be abused in such a way,the original question has been deleted and the answers merged with this question.

这是一个有趣的悲剧.今天早上,当我错误地执行以下命令时,我在生产服务器上进行了一些维护:

sudo rm -rf –no-preserve-root / mnt / hetznerbackup /

我没有发现之前的最后一个空间/几秒钟之后,当警告充斥着我的命令行时,我意识到我刚刚点击了自毁按钮.这里有一些烧在我眼中的东西:

rm: cannot remove `/mnt/hetznerbackup': Is a directory
rm: cannot remove `/sys/fs/ecryptfs/version': Operation not permitted
rm: cannot remove `/sys/fs/ext4/md2/inode_readahead_blks': Operation not permitted
rm: cannot remove `/sys/fs/ext4/md2/mb_max_to_scan': Operation not permitted
rm: cannot remove `/sys/fs/ext4/md2/delayed_allocation_blocks': Operation not permitted
rm: cannot remove `/sys/fs/ext4/md2/max_writeback_mb_bump': Operation not permitted
rm: cannot remove `/sys/fs/ext4/md2/mb_stream_req': Operation not permitted
rm: cannot remove `/sys/fs/ext4/md2/mb_min_to_scan': Operation not permitted
rm: cannot remove `/sys/fs/ext4/md2/mb_stats': Operation not permitted
rm: cannot remove `/sys/fs/ext4/md2/trigger_fs_error': Operation not permitted
rm: cannot remove `/sys/fs/ext4/md2/session_write_kbytes': Operation not permitted
rm: cannot remove `/sys/fs/ext4/md2/lifetime_write_kbytes': Operation not permitted
# and so on..

当我发现生产服务仍在运行时,我停止了任务并放心了.遗憾的是,服务器不再通过SSH接受任何用户的公钥或密码.

你怎么会从这里前进?我将在铁丝网的海洋中游泳以获得SSH访问权限.

服务器正在运行Ubuntu-12.04并在Hetzner上托管.

启动Hetzner提供的救援系统并检查您所造成的伤害.
将所有文件转出到安全位置,然后重新部署服务器.

我担心这是你个案中最好的解决方案.

相关文章

文章浏览阅读2.3k次,点赞4次,收藏22次。最近安装了CARLA预...
文章浏览阅读6.3k次,点赞5次,收藏15次。在清华镜像中下载U...
文章浏览阅读5k次。linux环境, python3.7.问题描述: 安装...
文章浏览阅读4.2k次,点赞4次,收藏17次。要安装这个 standa...
文章浏览阅读894次,点赞51次,收藏31次。在安卓使用vscode主...