我陷入了这个问题。桌面计算机上的fsck命令显示挂载根目录的文件系统错误。所以,我创建了 Ubuntu 的可启动 U 盘,并让它启动。然后,我尝试通过在 USB 记忆棒上执行fsck来修复文件系统错误,因为fsck无法修复已安装的目录。但是,U 盘上的fsck没有显示错误。我应该如何修复这个文件系统错误?
(台式电脑上的fsck )
$ sudo fsck -nf /dev/nvme0n1p2
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
Warning! /dev/nvme0n1p2 is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
Pass 1: Checking inodes, blocks, and sizes
Inodes that were part of a corrupted orphan linked list found. Fix? no
Inode 6816186 was part of the orphaned inode list. IGNORED.
Inode 6816770 was part of the orphaned inode list. IGNORED.
Inode 6883264 was part of the orphaned inode list. IGNORED.
Inode 6883789 was part of the orphaned inode list. IGNORED.
Inode 6887919 was part of the orphaned inode list. IGNORED.
Inode 6887920 was part of the orphaned inode list. IGNORED.
Inode 6887925 was part of the orphaned inode list. IGNORED.
Inode 6887929 was part of the orphaned inode list. IGNORED.
Deleted inode 6887947 has zero dtime. Fix? no
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences: -(9588738--9588745) -(9588760--9588764) -(9597955--9597964) -(9998851--9998855) -(27306830--27306834) -(27307548--27307557) -34598400
Fix? no
Free blocks count wrong (43144465, counted=43144229).
Fix? no
Inode bitmap differences: -6816186 -6816770 -6883264 -6883789 -(6887919--6887920) -6887925 -6887929 -6887947
Fix? no
Free inodes count wrong (14401240, counted=14401183).
Fix? no
/dev/nvme0n1p2: ********** WARNING: Filesystem still has errors **********
/dev/nvme0n1p2: 557352/14958592 files (0.5% non-contiguous), 16670447/59814912 blocks
(可启动 U 盘上的fsck )
ubuntu@ubuntu:~$ sudo fsck -fy /dev/nvme0n1p2
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/nvme0n1p2: 557879/14958592 files (0.6% non-contiguous), 16680714/59814912 blocks
ubuntu@ubuntu:~$ sudo fsck -fn /dev/nvme0n1p2
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/nvme0n1p2: 557879/14958592 files (0.6% non-contiguous), 16680714/59814912 blocks
ubuntu@ubuntu:~$
供参考:
适用于桌面和可启动 U 盘的 Ubuntu 18.04 LTS
xterm 可以打开时,终端窗口无法打开。我认为文件系统错误可能会影响此打开失败。