vmware: 磁盘加载问题导致,emergency mode: login incorrect 滚动打印

news2024/9/25 13:18:57

文章目录

  • 问题
  • 调试&解释
  • 异常日志
  • 为什么进入Emergency shell 呢
  • 为什么local-fs.target 失败
  • 为什么storage.mount 超时
  • 服务单元的依赖关系
  • 那最后进入emergency mode 为什么会滚Login Incorrect 日志呢
    • plymouth
    • systemd-sulogin-shell
    • sulogin
  • 解决

问题

VM虚拟机启动不正常。正常ssh登录不上去,原因是没有IP,sshd没有启动。只能使用console进入,然后可用看到如下图这个的滚动Login incorrect。
在这里插入图片描述

调试&解释

这个完全不能做问题调试,只能重新reboot虚拟机。查看过往的系统日志。
看/var/log目录下的所有日志,都没有任何发现;
最后在journalctl的输出里看到异常的日志。

异常日志

Dec 02 11:37:09 sm-a systemd[1]: Started Emergency Shell.
Dec 02 11:37:09 sm-a systemd[1]: Reached target Emergency Mode.
Dec 02 11:37:11 sm-a systemd[871]: emergency.service: Executable /bin/plymouth missing, skipping: No such file or directory
当我们想做reboot的时候,它自己做了重启,可能是40分钟定时器,收到了SIGINT的信号,系统自动重启。
Dec 02 14:27:13 sm-a systemd[1]: Received SIGINT.

为什么进入Emergency shell 呢

往前看发现local-fs.target 没有启动起来;原因是依赖的服务单元没有准本好
Dec 02 11:37:09 sm-a systemd[1]: local-fs.target: Job local-fs.target/start failed with result ‘dependency’.
Dec 02 11:37:09 sm-a systemd[1]: local-fs.target: Triggering OnFailure= dependencies.

为什么local-fs.target 失败

发现storage.mount,服务单元失败;就是文件系统没有加载成功。超时。
Dec 02 11:37:09 sbc03-oam-a systemd[1]: storage.mount: Mount process exited, code=killed status=15
Dec 02 11:37:09 sbc03-oam-a systemd[1]: storage.mount: Failed with result ‘timeout’.

为什么storage.mount 超时

从系统日志里,没有看到原因。

服务单元的依赖关系

# cat systemd-remount-fs.service
#  SPDX-License-Identifier: LGPL-2.1+
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Remount Root and Kernel File Systems
Documentation=man:systemd-remount-fs.service(8)
Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
DefaultDependencies=no
Conflicts=shutdown.target
After=systemd-fsck-root.service
Before=local-fs-pre.target local-fs.target shutdown.target
Wants=local-fs-pre.target
ConditionPathExists=/etc/fstab

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/systemd/systemd-remount-fs

# file /usr/lib/systemd/systemd-remount-fs
/usr/lib/systemd/systemd-remount-fs: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=204ac45be5b808f1f1b907fc41a612c3dccbfbcd, stripped

# cat /usr/lib/systemd/system/local-fs.target
#  SPDX-License-Identifier: LGPL-2.1+
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Local File Systems
Documentation=man:systemd.special(7)
DefaultDependencies=no
Conflicts=shutdown.target
After=local-fs-pre.target
OnFailure=emergency.target
OnFailureJobMode=replace-irreversibly

那最后进入emergency mode 为什么会滚Login Incorrect 日志呢

emergency这个target有两个命令需要执行
ExecStartPre=-/bin/plymouth --wait quit 、、、这个没有找到文件;告诉plymouthd退出;
ExecStart=-@rootlibexecdir@/systemd-sulogin-shell emergency
/usr/lib/systemd/systemd-sulogin-shell

plymouth

这个找不到其实也没什么关系
[root@10 ~]# rpm -qf /bin/plymouth
plymouth-0.9.4-11.20200615git1e36e30.el8.x86_64

–wait
Wait for plymouthd to quit.
plymouth - Send commands to plymouthd;

systemd-sulogin-shell

executable(‘systemd-sulogin-shell’,
[‘src/sulogin-shell/sulogin-shell.c’],
include_directories : includes,
link_with : [libshared],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootlibexecdir)

sulogin

从sulogin的代码里看还是有机会出现这次滚动日志的。如果从console上读取到垃圾数据,很有可能就死循环了。

			while (1) {
				const char *passwd = pwd->pw_passwd;
				const char *answer;
				int failed = 0, doshell = 0;
				int deny = !opt_e && locked_account_password(pwd->pw_passwd);

				doprompt(passwd, con, deny);

				if ((answer = getpasswd(con)) == NULL)
					break;
				if (deny)
					exit(EXIT_FAILURE);

				/* no password or locked account */
				if (!passwd[0] || locked_account_password(passwd))
					doshell++;
				else {
					const char *cryptbuf;
					cryptbuf = crypt(answer, passwd);
					if (cryptbuf == NULL)
						warn(_("crypt failed"));
					else if (strcmp(cryptbuf, pwd->pw_passwd) == 0)
						doshell++;
				}

				if (doshell) {
					sushell(pwd);
					failed++;
				}
				if (failed) {
					fprintf(stderr, _("cannot execute su shell\n\n"));
					break;
				}
				fprintf(stderr, _("Login incorrect\n\n"));
			}

解决

根本原因磁盘加载有问题;需要解决这个磁盘问题。当然如果磁盘都出问题了,可能console也会有问题(根据问题扎堆原理);
绕开不停滚动的日志需要:
When the user exits from the single-user shell, or presses control-D at the prompt, the system will continue to boot.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/56581.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

[附源码]计算机毕业设计作业查重系统Springboot程序

项目运行 环境配置: Jdk1.8 Tomcat7.0 Mysql HBuilderX(Webstorm也行) Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。 项目技术: SSM mybatis Maven Vue 等等组成,B/S模式 M…

[附源码]计算机毕业设计疫情管理系统Springboot程序

项目运行 环境配置: Jdk1.8 Tomcat7.0 Mysql HBuilderX(Webstorm也行) Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。 项目技术: SSM mybatis Maven Vue 等等组成,B/S模式 M…

JS高级:Git

目录 集中式版本控制 ​编辑 分布式版本控制 Git 安装 bash-cmd-gui 基本使用 文件状态 git忽略文件 版本回退 远程仓库 gitee 凭证 SSH秘钥 管理远程仓库 开源协议 github git标签 git 分支 master 分支 分支操作 集中式版本控制 分布式版本控制 Git 安装 G…

景联文科技:一文读懂火爆全网的AIGC和背后的数据标注技术!

“在过去的几个月中,AIGC发展速度惊人,DALL-E、Midjourney和Stable Diffusion等技术的快速发展,创作出了许多由AI生成的艺术品。本文中,我们将为您阐述AIGC技术和背后所涉及的数据标注技术。" 今年八月,美国的一位…

计算机网络学习笔记(I)——概述

文章目录第一章—概述1.1、什么是Internet?从具体构成角度:什么是协议?从服务角度:1.2、网络边缘网络结构:网络边缘:网络边缘:采用网络设施的面向连接服务网络边缘:采用基础设施的无…

GIS工具maptalks开发手册(四)01——渲染地图信息框之添加绘制工具、获取点的坐标数据信息框进行展示

GIS工具maptalks开发手册(四)01——渲染地图信息框之添加绘制工具、获取点的坐标数据信息框进行展示 1、官网示例 官网示例-地图信息框——https://maptalks.org/examples/cn/ui-control/ui-map-infownd/#ui-control_ui-map-infownd 效果 代码 index.html <!DOCTYPE ht…

Vue 官方文档2.x教程学习笔记 1 基础 1.3 Vue 实例 1.3.1 创建一个Vue 实例 1.3.2 数据与方法

Vue 官方文档2.x教程学习笔记 文章目录Vue 官方文档2.x教程学习笔记1 基础1.3 Vue 实例1.3.1 创建一个Vue 实例1.3.2 数据与方法1 基础 1.3 Vue 实例 1.3.1 创建一个Vue 实例 每个 Vue 应用都是通过用 Vue 函数创建一个新的 Vue 实例开始的&#xff1a; var vm new Vue({/…

阿里云ACP云计算的实验考的是什么?

目前阿里云ACP云计算实验共计四个 1 使用负载均衡实现https与http的混合访问 本实验使用负载均衡配置监听&#xff0c;利用Nginx实现HTTP请求向HTTPS请求的转化&#xff0c;从而完成HTTP和HTTPS的混合访问。 实验概述 互联网巨头雅虎官方对外发布消息&#xff0c;承认在201…

Yolo算法检测之NMS(非极大值抑制)原理详解

刚开始学习算法的时候&#xff0c;nms非极大值一直学不明白&#xff0c;今天终于搞明白了&#xff0c;大致总结一下。 首先我们简单看一下NMS使用的这个背景 按照yolo目标检测算法的初步思想来说&#xff0c;把图片分成19*19网格之后&#xff0c;理论上这个19*19个网格里面包含…

JavaWeb(二)

下面的知识主要就是Servlet&#xff0c;JSP&#xff0c;EL这个顺序去总结&#xff0c;把基础打扎实 Servlet 首先咱们肯定一直听说Servlet&#xff0c;经常说servlet容器&#xff0c;但是具体Servlet是个啥呢。咱们今天就去深入探讨一下。 咱们看一下菜鸟权威教程的解释 Java…

高通平台稳定性分析-CFI failure

一、查看 dmesg_TZ.txt中的错误: Kernel panic - not syncing: CFI failure (target: 0xffffff804323a848) Call trace: dump_backtrace.cfi_jt+0x0/0x8 dump_stack_lvl+0x94/0xe0 panic+0x1a0/0x468 cfi_module_add+0x0/0x24 find_check_fn+0x0/0x258 cam_subdev_ioct…

Kanzi:项目实例:智能灯光SmartControl界面设计

概述&#xff1a; 智能灯光是指&#xff1a;在满足一定条件下&#xff0c;自动显示一些 智能开关&#xff08;如&#xff1a;自动远光灯开关&#xff0c;延时下电开关&#xff0c;智能熄火开关&#xff0c;智能顶灯开关&#xff09;。 他们点亮的共同点是 1&#xff1a;标定…

[附源码]JAVA毕业设计红河旅游信息服务系统(系统+LW)

[附源码]JAVA毕业设计红河旅游信息服务系统&#xff08;系统LW&#xff09; 目运行 环境项配置&#xff1a; Jdk1.8 Tomcat8.5 Mysql HBuilderX&#xff08;Webstorm也行&#xff09; Eclispe&#xff08;IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持&#xff09;。 项目…

[附源码]计算机毕业设计springboot项目管理系统的专家评审模块

项目运行 环境配置&#xff1a; Jdk1.8 Tomcat7.0 Mysql HBuilderX&#xff08;Webstorm也行&#xff09; Eclispe&#xff08;IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持&#xff09;。 项目技术&#xff1a; SSM mybatis Maven Vue 等等组成&#xff0c;B/S模式 M…

【MySQL Router】使用 systemd 管理 MySQL Router

使用 systemd 管理 MySQL Router 文章目录使用 systemd 管理 MySQL Router排错过程升级操作系统内核未修改相关文件的属主&#xff0c;直接用 mysqlrouter 重新引导配置操作系统 limit 相关参数用户及其权限问题结语在之前的文章 【 InnoDB Cluster 】安装部署 MySQL Router 中…

Elasticsearch_第2章_ elasticsearch_进阶

Elasticsearch_第2章_ elasticsearch_进阶 文章目录Elasticsearch_第2章_ elasticsearch_进阶0.学习目标1.数据聚合1.1.聚合的种类1.2.DSL实现聚合1.2.1.Bucket聚合语法1.2.2.聚合结果排序1.2.3.限定聚合范围1.2.4.Metric聚合语法1.2.5.小结1.3.RestAPI实现聚合1.3.1.API语法1.…

Conv2Former

又发现了一个说比Transformer好的,通过充分利用卷积探索一种更高效的编码空域特征的方式&#xff1a;通过组合ConvNet与ViT的设计理念&#xff0c;本文利用卷积调制操作对自注意力进行了简化&#xff0c;进而构建了一种新的ConvNet架构Conv2Former超简Transformer风格ConvNet&a…

Python基础之MySql数据库交互

Python基础之MySql数据库交互一、使用MySql进行持久化存储二、安装MySql数据库和Python库PyMySQL三、使用pymysql链接mysql数据库四、创建表五、插入数据六、后记一、使用MySql进行持久化存储 在任何应用中&#xff0c;都需要持久化存储。一般有 3 种基础的存储机制&#xff1…

oepncv c++ 连通组件扫描

1、概念 连通组件指在图像上通过四邻域或八邻域法&#xff0c;连接起来的像素值大于某一阈值的区域&#xff08;这些像素点被称为前景像素&#xff09;&#xff0c;而小于阈值的区域被称为背景。如下图的4个连通组件。 四邻域、八邻域&#xff1a; 2、常用算法 a&#xff09;基…

35岁程序员,都到哪儿去了?

在很多人眼里&#xff0c;程序员的薪资就是普通人的天花板。关于程序员35岁被优化这个亘古不变的话题&#xff0c;也有不少人冷嘲热讽&#xff1a;你花10年的时间赚到了我30年、40年都赚不到的钱&#xff0c;有什么好焦虑不满呢&#xff1f;钱还不够用吗&#xff1f; 而那些年纪…