Ubuntu 20.04 升级遇到 fsck 检查问题

Ubuntu 20.04 升级遇到 fsck 检查问题

我的问题与以下问题类似(即使不完全相同)Ubuntu 20.04,每次启动都会进行非常长的文件系统检查声誉不足以评论加入俱乐部。

使用 grub 引导加载程序在配备 HP SSD 的笔记本电脑上双启动 Linux/Windows 系统。与 19.04 完美配合。发布后不久就升级到了 20.04。在 grub 屏幕后的第二次(??)重新启动时,包含旋转器的文件系统检查消息不断出现。此外,承诺的“Ctrl-C”中断根本不起作用。

然后我重新安装了 19.04,它又能正常工作了。今天到达 19.04 的支持终止点,我以为 20.04 可能会有所改进,但无济于事!旋转器又无休止地转动 »Ctrl-C«,一点帮助都没有。

奇怪的是,升级到 20.04 后第一次重启就成功了:我看到文件系统检查消息在五秒钟后消失,正如预期的那样,然后成功继续重启过程。但第二次重启时我又卡住了。

我采用了GRUB_CMDLINE_LINUX_DEFAULT="fsck.mode=skip ..."解决方法,但显然建议在启动时进行文件系统检查。

My/etc/fstab包含四个条目,分别对应于、/和swap:/boot/efi/home

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p6 during installation
UUID=ca0eb0c0-9606-41e4-873f-de0e3ba10266 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=288C-F264  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/nvme0n1p7 during installation
UUID=743bb313-9845-4aed-a1ad-6b97ed4fac01 /home           ext4    defaults        0       2
# swap was on /dev/nvme0n1p5 during installation
UUID=f0f43222-3cdb-4059-acfc-af13b09190d9 none            swap    sw              0       0

fdisk -l相关部分:

Disk /dev/nvme0n1: 953,89 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: KXG50ZNV1T02 TOSHIBA                    
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: gpt
Disk identifier: 12EEC9A1-6277-423E-B253-0B603CF869C7

Device             Start        End    Sectors   Size Type
/dev/nvme0n1p1      2048    1023999    1021952   499M Windows recovery environment
/dev/nvme0n1p2   1024000    1228799     204800   100M EFI System
/dev/nvme0n1p3   1228800    1261567     showing 32768    16M Microsoft reserved
/dev/nvme0n1p4   1261568  204802047  203540480  97,1G Microsoft basic data
/dev/nvme0n1p5 204802048  206755839    1953792   954M Linux swap
/dev/nvme0n1p6 206755840  437909503  231153664 110,2G Linux filesystem
/dev/nvme0n1p7 437909504 2000408575 1562499072 745,1G Linux filesystem

使用实时启动系统fsck /dev/nvme0n1p6fsck /dev/nvme0n1p7执行几乎立即报告两个“干净”的文件系统。强制文件系统检查会为分区产生可纠正的警告/home

root@ubuntu:~# e2fsck -f /dev/nvme0n1p7
e2fsck 1.45.3 (14-Jul-2019)
Pass 1: Checking inodes, blocks, and sizes
Inode 43787646 extent tree (at level 1) could be shorter.  Optimize<y>? yes
Pass 1E: Optimizing extent trees
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/nvme0n1p7: ***** FILE SYSTEM WAS MODIFIED *****
/dev/nvme0n1p7: 240030/48832512 files (1.9% non-contiguous), 54063796/195312384 blocks

后续e2fsck -f /dev/nvme0n1p7没有报告警告。

tune2fs -l /dev/nvme0n1p6

tune2fs 1.45.3 (14-Jul-2019)
Filesystem volume name:   <none>
Last mounted on:          /
Filesystem UUID:          ca0eb0c0-9606-41e4-873f-de0e3ba10266
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
Filesystem flags:         signed_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              7225344
Block count:              28894208
Reserved block count:     1444710
Free blocks:              23465464
Free inodes:              6742890
First block:              0
Block size:               4096
Fragment size:            4096
Group descriptor size:    64
Reserved GDT blocks:      1024
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Flex block group size:    16
Filesystem created:       Fri Apr 24 05:43:28 2020
Last mount time:          Tue Jul 21 08:18:20 2020
Last write time:          Tue Jul 21 08:18:19 2020
Mount count:              5
Maximum mount count:      -1
Last checked:             Tue Jul 21 07:30:25 2020
Check interval:           0 (<none>)
Lifetime writes:          64 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:           256
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      23aac590-850f-4f42-9368-55601ba5eec0
Journal backup:           inode blocks
Checksum type:            crc32c
Checksum:                 0xbfd90acb
tune2fs -l /dev/nvme0n1p7


tune2fs 1.45.3 (14-Jul-2019)
Filesystem volume name:   <none>
Last mounted on:          /home
Filesystem UUID:          743bb313-9845-4aed-a1ad-6b97ed4fac01
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
Filesystem flags:         signed_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              48832512
Block count:              195312384
Reserved block count:     9765619
Free blocks:              141232260
Free inodes:              48592695
First block:              0
Block size:               4096
Fragment size:            4096
Group descriptor size:    64
Reserved GDT blocks:      1024
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Flex block group size:    16
Filesystem created:       Mon Dec 30 14:12:27 2019
Last mount time:          Tue Jul 21 08:18:21 2020
Last write time:          Tue Jul 21 08:18:21 2020
Mount count:              5
Maximum mount count:      -1
Last checked:             Tue Jul 21 07:30:33 2020
Check interval:           0 (<none>)
Lifetime writes:          359 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:           256
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      c6477151-86b4-4275-b627-ce2568be458f
Journal backup:           inode blocks
Checksum type:            crc32c
Checksum:                 0xa5c6ce45

智能检查:

nvme smart-log /dev/nvme0

Smart Log for NVME device:nvme0 namespace-id:ffffffff
critical_warning                    : 0
temperature                         : 31 C
available_spare                     : 100%
available_spare_threshold           : 5%
percentage_used                     : 1%
data_units_read                     : 3.459.789
data_units_written                  : 3.987.840
host_read_commands                  : 59.275.018
host_write_commands                 : 52.110.771
controller_busy_time                : 191
power_cycles                        : 863
power_on_hours                      : 1.091
unsafe_shutdowns                    : 147
media_errors                        : 0
num_err_log_entries                 : 0
Warning Temperature Time            : 0
Critical Composite Temperature Time : 0
Temperature Sensor 1                : 31 C
Thermal Management T1 Trans Count   : 0
Thermal Management T2 Trans Count   : 0
Thermal Management T1 Total Time    : 0
Thermal Management T2 Total Time    : 0

相关内容