centos7如何進(jìn)入緊急修復(fù)模式?centos7進(jìn)入緊急修復(fù)模式
來源: 三好IT網(wǎng) 2023-01-05 14:21:40
centos7如何進(jìn)入緊急修復(fù)模式?
打開centos7頁面出現(xiàn):
welcome to emergency mode!after logging in ,type “journalctl -xb” to view system logs,“systemctl reboot” to reboot ,“systemctl default” to try again to boot into default mode。
give root password for maintenance
(?? Control-D???):
解決方法:
執(zhí)行 runlevel 顯示unknown
修改默認(rèn)啟動級別
a. 先刪除: mv /etc/systemd/system/default.target /etc/systemd/system/default.target.back #將文件重命名即可
b. 創(chuàng)建軟連接文件: ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
或者
ln -sf /lib/systemd/system/runlevel3.target /etc/systemd/system/default.target
也可以使用systemctl命令:
systemctl set-default graphical.target
systemctl isolate multi-user.target
執(zhí)行過程中報(bào)錯:Error getting authority: Error initializing authority: Could not connect: Resource temporarily unavailable (g-io-error-quark, 1)
查看日志 journalctl -xb
發(fā)現(xiàn)日志中掛載出錯:
可以看出是掛載問題,是/home文件沒有掛載上
編輯自動掛載的文件 vi /etc/fstab
把掛載/home的那行注釋掉(先備份)
#/dev/mapper/centos-home /home xfs default 0 0
重啟服務(wù)器 reboot
啟動成功后,頁面卡在白條不動了,可以按esc鍵查看啟動詳情,是在/etc/rc.d/rc.local卡住了,重啟進(jìn)入單用戶模式:
(1).開機(jī)時(shí)在默認(rèn)項(xiàng)選e
(2).找到ro的那一行
(3)把ro改成 rw init=/sysroot/bin/sh ,按ctrl+x啟動
(4)進(jìn)入單用戶頁面后,要執(zhí)行chroot /sysroot,獲取root權(quán)限
進(jìn)入單用戶模式后編輯rc.local文件,把跟/home有關(guān)的啟動項(xiàng)都注釋掉,重啟服務(wù)器
重啟成功后進(jìn)入正常模式,這時(shí)可以查看/home掛載的問題
(1).lvs -a -o +devices查看磁盤詳細(xì)信息,可以看到home的attr參數(shù)沒有a(激活)未激活狀態(tài)
(2).lvchange -a y /dev/mapper/centos-home 激活home
(3).掛載home,mount /dev/mapper/centos-home /home
(4).掛載成功,把原來fstab和rc.local里注釋的在改回去
猜你喜歡

centos7如何進(jìn)入緊急修復(fù)模式?centos7進(jìn)入緊急修復(fù)模式
2023-01-05 14:21:40

兄弟7360打印機(jī)如何加粉清零?兄弟7360打印機(jī)加粉清零方法
2023-01-05 14:21:11

PS提示暫存盤已滿怎么辦?PS提示暫存盤已滿解決方法
2023-01-05 14:24:44

ip電話機(jī)如何安裝?ip電話機(jī)安裝步驟
2023-01-05 14:19:46

電話會議系統(tǒng)怎么用?電話會議系統(tǒng)使用方法
2023-01-05 14:19:14

電腦風(fēng)扇轉(zhuǎn)速慢了怎么解決?CPU風(fēng)扇調(diào)節(jié)的方法
2023-01-05 14:18:52

usb鼠標(biāo)驅(qū)動怎么設(shè)置?微軟鼠標(biāo)驅(qū)動安裝方法
2023-01-05 14:18:29

三維制圖軟件推薦學(xué)哪個?三維制圖軟件介紹
2023-01-05 14:17:03

電腦主板診斷卡怎么用?教你如何看電腦診斷卡?
2023-01-05 14:16:12

office2005怎么激活?激活office辦公軟件方法
2023-01-05 14:15:33

什么是雙絞線?雙絞線傳輸距離多長?
2023-01-05 14:14:43

cf卡屏不流暢怎么辦?玩cf卡屏一頓一頓的解決方法
2023-01-05 14:14:21

降噪耳罩哪種效果最好?降噪耳罩品牌推薦
2023-01-05 14:13:53

電腦的發(fā)展史怎么樣?最全計(jì)算機(jī)發(fā)展簡史
2023-01-05 14:13:28

什么叫電子分頻?電子分頻器是什么原理?
2023-01-05 14:12:59

鼠標(biāo)單擊變成雙擊怎么調(diào)回來?鼠標(biāo)單擊變成雙擊調(diào)回來方法
2023-01-05 14:12:12

世界杯營銷白熱化,“心動觀賽季”如何跑出新增量
2023-01-04 17:11:16

無線路由器可連接網(wǎng)絡(luò)的距離是多少?無線路由器可連接網(wǎng)絡(luò)的距離介紹
2023-01-04 14:18:52

如何清除win10系統(tǒng)所有搜索歷史記錄?win10系統(tǒng)所有搜索歷史記錄操作步驟
2023-01-04 14:18:29

win7如何安裝HP打印機(jī)?win7安裝HP打印機(jī)步驟
2023-01-04 14:18:05

diskgenius怎么恢復(fù)數(shù)據(jù)和分區(qū)?diskgeniu恢復(fù)數(shù)據(jù)和分區(qū)方法
2023-01-04 14:17:39

怎么批量刪除電腦桌面文件圖標(biāo)?批量刪除電腦桌面文件圖標(biāo)操作步驟
2023-01-04 14:17:10

電腦視頻截圖后圖片變成全黑怎么辦?電腦視頻截圖圖片變成全黑解決方法
2023-01-04 14:16:06

網(wǎng)關(guān)是什么?常見網(wǎng)關(guān)類型
2023-01-04 14:15:25

windows10資源管理器在哪里?windows10資源管理器打開方法
2023-01-04 14:15:04