Linux 发行版:Fedora 31 Mate 编译版。
win10双启动。(已启用 UEFI 安全启动)。
所以问题是从 Lightdm 开始的。
2)在下次启动时,出现紧急模式,我按照journalctl操作并发现我必须使用我所做的fsck来修复分区,并且在下次启动时它卡在登录服务步骤上:(无法获取tty)
3)我尝试启动紧急模式来检查journalctl(systemd.unit=emergency.target),我得到了这个:
编辑:(使用实时USB)
$fdisk - l
Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: TOSHIBA MQ04ABF1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 7B2B9D8A-6958-447F-8199-612492FE6C18
Device Start End Sectors Size Type
/dev/sda1 2048 1023999 1021952 499M Windows recovery environment
/dev/sda2 1024000 1228799 204800 100M EFI System
/dev/sda3 1228800 1261567 32768 16M Microsoft reserved
/dev/sda4 1261568 356085759 354824192 169.2G Microsoft basic data
/dev/sda5 356085760 358182911 2097152 1G Linux filesystem
/dev/sda6 358182912 1213837311 855654400 408G Linux LVM
Disk /dev/sdb: 7.51 GiB, 8053063680 bytes, 15728640 sectors
Disk model: Flash Disk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x03f6914f
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 15728639 15726592 7.5G c W95 FAT32 (LBA)
Disk /dev/mapper/fedora_localhost-root: 200 GiB, 214748364800 bytes, 419430400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora_localhost-home: 200 GiB, 214748364800 bytes, 419430400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora_localhost-swap: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/loop0: 1.91 GiB, 2032271360 bytes, 3969280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 7 GiB, 7518289920 bytes, 14684160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop2: 32 GiB, 34359738368 bytes, 67108864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/live-rw: 7 GiB, 7518289920 bytes, 14684160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/live-base: 7 GiB, 7518289920 bytes, 14684160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
低位块
$lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 1.9G 1 loop
loop1 7:1 0 7G 1 loop
├─live-rw 253:3 0 7G 0 dm /
└─live-base 253:4 0 7G 1 dm
loop2 7:2 0 32G 0 loop
└─live-rw 253:3 0 7G 0 dm /
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 499M 0 part
├─sda2 8:2 0 100M 0 part
├─sda3 8:3 0 16M 0 part
├─sda4 8:4 0 169.2G 0 part
├─sda5 8:5 0 1G 0 part
└─sda6 8:6 0 408G 0 part
├─fedora_localhost-root 253:0 0 200G 0 lvm
├─fedora_localhost-home 253:1 0 200G 0 lvm
└─fedora_localhost-swap 253:2 0 8G 0 lvm [SWAP]
sdb 8:16 1 7.5G 0 disk
└─sdb1 8:17 1 7.5G 0 part /run/initramfs/live
sr0 11:0 1 2.6M 0 rom /run/media/liveuser/HiSuite
我检查了 /bin 目录,发现它bash
不在那里,所以我复制了 live-usb 中提供的那个。我能够再次登录,但我发现很多命令都没有找到,并且在每个打开的终端中我得到这个错误:
bash: /usr/bin/register-python-argcomplete: /usr/bin/python3: bad interpreter: No such file or directory
bash: awk: command not found
bash: /usr/bin/powerline-daemon: /usr/bin/python3: bad interpreter: No such file or directory
bash: /usr/bin/powerline-config: /usr/bin/python3: bad interpreter: No such file or directory
bash: /usr/bin/powerline-config: /usr/bin/python3: bad interpreter: No such file or directory
[cuore@localhost ~]$ dnf
bash: /usr/bin/dnf: /usr/bin/python3: bad interpreter: No such file or directory
[cuore@localhost ~]$ cat
bash: cat: command not found
[cuore@localhost ~]$
$ sudo rpm --verify --all
missing /usr/bin/aulastlog
missing /usr/bin/ausyscall
missing /usr/bin/auvirt
missing a /usr/lib/.build-id/10/0eaa49fad105bff332a1e61f1ac5b761872c5f
missing /usr/bin/audit2allow
missing /usr/bin/audit2why
missing /usr/bin/chcat
missing /usr/bin/checkisomd5
missing /usr/include/arpa
missing /usr/include/arpa/ftp.h
missing /usr/include/arpa/inet.h
missing /usr/include/arpa/nameser.h
missing /usr/include/arpa/nameser_compat.h
missing /usr/include/arpa/telnet.h
missing /usr/include/arpa/tftp.h
missing /usr/include/bits
missing /usr/include/bits/a.out.h
missing /usr/include/bits/argp-ldbl.h
missing /usr/include/bits/byteswap.h
missing /usr/include/bits/cmathcalls.h
missing /usr/include/bits/confname.h
missing /usr/include/bits/cpu-set.h
missing /usr/include/bits/dirent.h
missing /usr/include/bits/dirent_ext.h
missing /usr/include/bits/dlfcn.h
missing /usr/include/bits/elfclass.h
missing /usr/include/bits/endian.h
missing /usr/include/bits/environments.h
missing /usr/include/bits/epoll.h
missing /usr/include/bits/err-ldbl.h
missing /usr/include/bits/errno.h
missing /usr/include/bits/error-ldbl.h
missing /usr/include/bits/error.h
.......... **And MORE**
看来我遇到了同样的问题这里。
我能想到的唯一可能导致删除多个关键文件的事情是在我手动运行 fsck 的步骤fedora_localhost-root
fedora_localhost-home
。
可以是吗?
答案1
根据您的错误消息,文件中似乎未正确设置 root 用户的登录 shell /etc/passwd
。
你ctrl+alt+f2,f3,f4
能联系到tty吗?