Ubuntu 16.04 一开机时,突然出现了下面的讯息,再次重新开机也没用一样卡住无限鬼打牆
Welcome to emergency mode! After logging in, type “journalctl -xb” to view system logs, “systemctl reboot” to reboot, “systemctl default” or ^D to try again boot into default mode. Give root password for maintained (or press Control-D to continue).
输入 root 密码登入打入 journalctl -xb
检查开机讯息时,发现在 mount 硬碟时整个卡住,导致系统无法顺利启动
这个错误讯息常发生在载入 外部硬碟
、网路硬碟
等没有载入导致
解决方式
在 emergency mode
登入 root 帐号后输入下列指令让 /etc/fstab
档案有被写入的权限
$ mount -n -o remount,rw /
/etc/fstab
是自动 mount 的设定档案,使用 vi
或 vim
编辑此档案
$ sudo vim /etc/fstab
在 /etc/fstab
档案中将卡住的 mount 硬碟输入 #
註解掉
# 註解前
UUID=bcb03e9a-fa15-4a6d-a8ea-ac2c8180654d /data ext4 errors=remount-ro 0 0
# 註解后
# 这一行挂载出现问题,在前方加入註解取消挂载
# UUID=bcb03e9a-fa15-4a6d-a8ea-ac2c8180654d /data ext4 errors=remount-ro 0 0
註解挂载指令后 /etc/fstab
档案会长的像这样
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=4fb9f563-7ae4-4df9-a028-fdc6b9e4f1a5 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda3 during installation
UUID=cf0cf85a-6fed-4c43-901d-c946d6e1c5fa none swap sw 0 0
# 这一行挂载出现问题,在前方加入註解取消挂载
# UUID=bcb03e9a-fa15-4a6d-a8ea-ac2c8180654d /data ext4 errors=remount-ro 0 0
输入指令切换成预设模式
$ systemctl default
重新开机后就可以正常进入系统了
systemctl reboot
参考资料
- Boot Into Rescue Mode Or Emergency Mode In Ubuntu 20.04 / 18.04
- How to exit emergency mode and boot to default mode in Linux | Velan
- ubuntu啟動出現welcome to emergency mode! Press Enter for maintenance 的檔案。 | 程式前沿
- linux出現welcome to emergency mode! 解決方法 - IT閱讀
- 阿就操場啊~: Linux開機進入emergency mode
- Linux 开机显示:welcome to emergency mode 的解决方法_Lance的博客-CSDN博客
- 阿就操場啊~: /etc/fstab的dump與pass
Donate KJ 贊助作者喝咖啡
如果這篇文章對你有幫助的話,可以透過下面支付方式贊助作者喝咖啡,如果有什麼建議或想說的話可以贊助並留言給我
If this article has been helpful to you, you can support the author by treating them to a coffee through the payment options below. If you have any suggestions or comments, feel free to sponsor and leave a message for me!
方式 Method | 贊助 Donate |
PayPal | https://paypal.me/kejyun |
綠界 ECPay | https://p.ecpay.com.tw/AC218F1 |
歐付寶 OPay | https://payment.opay.tw/Broadcaster/Donate/BD2BD896029F2155041C8C8FAED3A6F8 |