问题:
系统无法进入图形界面,只有命令行模式
系统信息:
Linux version 4.15.0-151-generic (buildd@lgw01-amd64-042) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #157-Ubuntu SMP Fri Jul 9 23:07:57 UTC 2021
查看日志信息:
tail -n 100 /var/log/boot.log
[FAILED] Failed to start File System Check on /dev/disk/by-uuid/f36c4769-075f-4103-b9c6-a37f67d194f1.
See 'systemctl status "systemd-fsck@dev-disk-by\x2duuid-f36c4769\x2d075f\x2d4103\x2db9c6\x2da37f67d194f1.service"' for details.
[DEPEND] Dependency failed for /home.
[DEPEND] Dependency failed for Local File Systems.
[DEPEND] Dependency failed for Clean up any mess left by 0dns-up.
进入命令行查看挂在信息:
df -h
Filesystem Size Used Avail Use% Mounted on
udev 12G 0 12G 0% /dev
tmpfs 2.3G 1.7M 2.3G 1% /run
/dev/sda3 94G 45G 45G 50% /
tmpfs 12G 135M 12G 2% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 12G 0 12G 0% /sys/fs/cgroup
/dev/loop6 33M 33M 0 100% /snap/snapd/12398
/dev/loop2 55M 55M 0 100% /snap/picgo/x1
/dev/loop5 56M 56M 0 100% /snap/core18/2074
/dev/loop9 33M 33M 0 100% /snap/snapd/12704
/dev/loop8 56M 56M 0 100% /snap/core18/2066
/dev/loop0 66M 66M 0 100% /snap/gtk-common-themes/1515
/dev/loop3 65M 65M 0 100% /snap/gtk-common-themes/1514
/dev/loop7 163M 163M 0 100% /snap/gnome-3-28-1804/145
/dev/loop1 471M 471M 0 100% /snap/redis-desktop-manager/541
/dev/loop4 471M 471M 0 100% /snap/redis-desktop-manager/546
/dev/loop10 165M 165M 0 100% /snap/gnome-3-28-1804/161
cgmfs 100K 0 100K 0% /run/cgmanager/fs
tmpfs 2.3G 160K 2.3G 1% /run/user/1000
看到home节点没有挂在;
继续查看home节点挂在信息:
vim /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda3 during installation
UUID=756101fe-30c3-4ed5-8ac7-11dd1088a2e5 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda4 during installation
UUID=f36c4769-075f-4103-b9c6-a37f67d194f1 /home ext4 defaults 0 2
# swap was on /dev/sda6 during installation
UUID=aec78e4a-a37e-4539-827c-f997d2a1bcf9 none swap sw 0 0
现在问题就明确了是home节点的分区损坏,需要修复:
fsck -t ext4 -r /home
一路yes,重启系统,界面正常