Give root password for maintenance (Or press Control-D to continue)
virtualBox 升级的时候,以前的许多虚拟机来回折腾,有的恢复了,有的干脆删除了!
有一个虚拟 CentOS 7 密码不记得了 centos7系统忘记root密码
有一个虚拟 Ubuntu Server 18.04,启动后总是出现以下错误
Give root password for maintenance
(Or press Control-D to continue)昨天恢复了CentOS 的 root 密码,重设了 ubuntu 18.04 的 root 密码(因为 之前ubuntu 18.04 root 密码是随机的)Ubuntu 忘记密码
今天来对付这个错误!
输入 root 密码后,启动进入 root 登录
查看网卡地址 192.168.1.193 , ping 网关也通!但是 ssh 连不上!
先开启sshd 服务
#service sshd restart打开Terminale ,ssh 登录
$ ssh user@192.168.1.193
"System is booting up. See pam_nologin(8)"Connection closed by 192.168.1.193 port 22
一直使用的 user 不能 ssh ,尝试修改 sudoers 和 允许 sshd 登录账户,好像不管用!
$ ssh root@192.168.1.193
这个是可以的,但是需要输入密码
如果禁止过 root 的 ssh 远程登录,先修改 sshd_config
之前系统是设置了公钥的,因为 root 用户没有用过,自然也就没有在 root 用户的 home 目录(/root)中保存公钥
查看系统日志
#journalctl -xb耐心翻阅,找到错误的地方(我这里Terminal 会红色标注出来)
文字内容如下
...-- Unit systemd-journal-flush.service has finished starting up.-- -- The start-up result is RESULT.Sep 18 08:43:10 ubuntu1804193 systemd[1]: dev-disk-by\x2duuid-c8330235\x2d7b61\x2d4b0a\x2d8d0f\x2d7988a8bba2ad.device: Job dev-disSep 18 08:43:10 ubuntu1804193 systemd[1]: Timed out waiting for device dev-disk-by\x2duuid-c8330235\x2d7b61\x2d4b0a\x2d8d0f\x2d798-- Subject: Unit dev-disk-by\x2duuid-c8330235\x2d7b61\x2d4b0a\x2d8d0f\x2d7988a8bba2ad.device has failed-- Defined-By: systemd-- Support: http://www.ubuntu.com/support-- -- Unit dev-disk-by\x2duuid-c8330235\x2d7b61\x2d4b0a\x2d8d0f\x2d7988a8bba2ad.device has failed.-- -- The result is RESULT.Sep 18 08:43:10 ubuntu1804193 systemd[1]: Dependency failed for /data02.-- Subject: Unit data02.mount has failed-- Defined-By: systemd-- Support: http://www.ubuntu.com/support-- -- Unit data02.mount has failed.-- -- The result is RESULT.Sep 18 08:43:10 ubuntu1804193 systemd[1]: Dependency failed for Local File Systems.-- Subject: Unit local-fs.target has failed-- Defined-By: systemd-- Support: http://www.ubuntu.com/support-- -- Unit local-fs.target has failed....
原来问题出在 Unit data02.mount 失败!
修改文件配置
#vim /etc/fstabUUID=c9db3d96-f9f2-11e8-b72e-0800274e1103 / ext4 defaults 0 0# add by wzh 20200119 # must mkdir data02 first# wzh 20210918 Unit data02.mount has failed.# UUID=c8330235-7b61-4b0a-8d0f-7988a8bba2ad /data02 ext4 defaults 0 0/swap.img none swap sw 0 0
看到一年前的注解 must mkdir data02 first ,我也忘记了当时是为什么加了这个 data02 ,也不记得他是个什么东西了,可能当时想使用 U 盘启动 ?
既然 data02 出错,那么,就注释掉,保存退出!
reboot
现在恢复正常了!之前使用的 user 也可以 公钥方式ssh 登录
$ ssh user@192.168.1.193
解决过程参考了以下几个博客
http://www.qzhuji.com/problem/571.html
https://www.cnblogs.com/s-sx/p/11818532.html
https://blog.csdn.net/weixin_45492179/article/details/102709752
Give root password for maintenance (Or press Control-D to continue)相关推荐
- Give root password for maintenance(or type control -D to continue)
2017-09-30 18:12:08 1:错误如图,本来开机准备用一下虚拟机,就出现一个这,为啥记录一下呢,因为网上好多不是很靠谱. 原因可能是之前关闭虚拟机的时候不小心出现异常了: 2:解决办法: ...
- centos——开机显示 give root password for maintenance
Linux服务器断电后系统文件错误,开机后显示checking file on dask,但是不能自我修复完,提示如下: give root password for maintenance(or p ...
- linux系统无法启动提示give root password for maintenance的解决方法
linux系统无法启动提示give root password for maintenance的解决方法 由于非法重启或硬盘故障,会导致linux系统无法启动,无法进入操作系统.当你看到提示:give ...
- linux 系统出现Give root password for maintenance 问题
2019独角兽企业重金招聘Python工程师标准>>> linux 系统出现Give root password for maintenance 问题的解决方法 : 问题原因应该是/ ...
- Give root password for maintenance 问题解决.
LINUX 服务器,不能远程登录,本机也不能登录,只看到满屏的 16位数据...... 后重启动,发现硬盘检测不能通过, 按以下方法解决. Give root password for mainten ...
- linux开机出现一下错误Give root password for maintenance (or type Control-D to continue):
linux开机出现一下错误Give root password for maintenance (or type Control-D to continue): 第一种错误的情况: 由于错误的编辑/e ...
- Give root password for maintenance 问题的解决方法
Give root password for maintenance 问题的解决方法 应该是/usr /home /boot分区磁盘检测出了问题. Give root password for mai ...
- linux系统无法启动提示give root password for maintenance的多种解决方法
终端输入reboot后出现 GIVE root password for maintenance(or type control-D to continue): 输入密码出现提示符后再reboot才能 ...
- Linux 启动时,出现give root password for maintenance处理方法
报错 某天由于openstack资源不足,导致了宿主机杀死了上面的部分虚拟机.刚好杀死了nginx和监控各微服务存活的一个服务.导致了整个平台大部分对外服务的访问异常. 大部分服务由于配置了开机自启, ...
- centos 7系统Give root password for maintenance解决办法
当系统出现Give root password for maintenance这个问题: 1,系统因不正常的方式重启或关机,造成系统文件出错(/usr , /home)一般是这两个文件 2,系统挂载的 ...
最新文章
- LEMP构建高性能WEB服务器(第三版)
- Hadoop集群环境搭建之伪分布式搭建流程
- 看得懂的设计模式 享元模式python3 最基本(简单)实现
- [JavaWeb-MySQL]MySQL服务启动和关闭
- wpa_supplicant与wpa_cli之间通信过程
- VS2017安装配置Qt
- 白嫖一时爽,一直白嫖......?
- 推荐一款优雅的日历控件
- QT中串口通信程序(转)
- 微信停止服务印度手机号注册用户!
- JavaEE程序员必读图书大推荐
- UML基本表示法(转载)
- C++入门系列博客二 C++ 控制流
- 编译DPDK遇到make: *** /lib/modules/3.10.0-693.el7.x86_64/build: no such file or dirortory
- 如何在小程序wxml文件中编写js代码
- 无刷直流电机换相原理
- java解惑--谜题11:最后的笑声
- SQL文件太大怎么打开(推荐一款工具EmEditor)
- [LED]如何配置LCD背光和LED,调试方法
- 12【组合设计模式】