安装期间读取 /dev/sda 时出现输入/输出错误

安装期间读取 /dev/sda 时出现输入/输出错误

我一直在尝试安装 Ubuntu 18.04,但是在启动时出现以下错误消息:

Input/Output error during read on /dev/sda

我无法创建分区。我还尝试使用其他 Linux 发行版解决这个问题,比如 Manjaro GNOME,这是我之前使用的操作系统,但它完全搞砸了,所以不得不从磁盘中删除它。我需要一些帮助,因为我的硬盘似乎没问题。现在我正在使用上传此查询尝试 Ubuntu安装前。我检查了我的可启动闪存驱动器是否有问题,但没有问题。我的 SATA 配置也设置为 AHCI。我已经格式化了我的硬盘,并且操作系统可以识别它。

使用磁盘工具查看我的硬盘:

使用磁盘工具查看我的硬盘

使用磁盘实用程序查看 SMART 数据和自我测试

$ sudo fdisk -l
Disk /dev/loop0: 1.9 GiB, 2029981696 bytes, 3964808 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: 89.1 MiB, 93417472 bytes, 182456 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: 54.7 MiB, 57294848 bytes, 111904 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/loop3: 44.9 MiB, 47063040 bytes, 91920 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/loop4: 160.2 MiB, 167931904 bytes, 327992 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/loop5: 4.2 MiB, 4403200 bytes, 8600 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/loop6: 14.8 MiB, 15462400 bytes, 30200 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/loop7: 956 KiB, 978944 bytes, 1912 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/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 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
Disklabel type: gpt
Disk identifier: 4ACBAC48-BCA6-43C2-B3E6-35A0B2243FD7

Device       Start        End    Sectors  Size Type
/dev/sda1     2048    1050623    1048576  512M EFI System
/dev/sda2  1050624 1953523711 1952473088  931G Linux filesystem


Disk /dev/sdb: 14.5 GiB, 15597568000 bytes, 30464000 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
Disklabel type: dos
Disk identifier: 0x14f142f8

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1  *     2048 30463999 30461952 14.5G  c W95 FAT32 (LBA)


Disk /dev/loop8: 3.7 MiB, 3825664 bytes, 7472 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
ubuntu@ubuntu:~$ sudo fsck -f /dev/sda2
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda2

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

tail -f /var/log/syslog

Apr 22 16:51:44 ubuntu kernel: [  175.979044] ata1.00: failed command: WRITE FPDMA QUEUED
Apr 22 16:51:44 ubuntu kernel: [  175.979050] ata1.00: cmd 61/08:00:00:08:10/00:00:20:00:00/40 tag 0 ncq dma 4096 out
Apr 22 16:51:44 ubuntu kernel: [  175.979050]          res 40/00:08:00:64:70/00:00:74:00:00/40 Emask 0x10 (ATA bus error)
Apr 22 16:51:44 ubuntu kernel: [  175.979053] ata1.00: status: { DRDY }
Apr 22 16:51:44 ubuntu kernel: [  175.979055] ata1.00: failed command: WRITE FPDMA QUEUED
Apr 22 16:51:44 ubuntu kernel: [  175.979060] ata1.00: cmd 61/00:08:00:64:70/04:00:74:00:00/40 tag 1 ncq dma 524288 out
Apr 22 16:51:44 ubuntu kernel: [  175.979060]          res 40/00:08:00:64:70/00:00:74:00:00/40 Emask 0x10 (ATA bus error)
Apr 22 16:51:44 ubuntu kernel: [  175.979062] ata1.00: status: { DRDY }
Apr 22 16:51:44 ubuntu kernel: [  175.979065] ata1.00: failed command: WRITE FPDMA QUEUED
Apr 22 16:51:44 ubuntu kernel: [  175.979070] ata1.00: cmd 61/00:e8:00:08:10/04:00:00:00:00/40 tag 29 ncq dma 524288 out
Apr 22 16:51:44 ubuntu kernel: [  175.979070]          res 40/00:08:00:64:70/00:00:74:00:00/40 Emask 0x10 (ATA bus error)
Apr 22 16:51:44 ubuntu kernel: [  175.979072] ata1.00: status: { DRDY }
Apr 22 16:51:44 ubuntu kernel: [  175.979075] ata1.00: failed command: READ FPDMA QUEUED
Apr 22 16:51:44 ubuntu kernel: [  175.979080] ata1.00: cmd 60/08:f0:a0:61:70/00:00:74:00:00/40 tag 30 ncq dma 4096 in
Apr 22 16:51:44 ubuntu kernel: [  175.979080]          res 40/00:08:00:64:70/00:00:74:00:00/40 Emask 0x10 (ATA bus error)
Apr 22 16:51:44 ubuntu kernel: [  175.979082] ata1.00: status: { DRDY }
Apr 22 16:51:44 ubuntu kernel: [  175.979084] ata1.00: failed command: WRITE FPDMA QUEUED
Apr 22 16:51:44 ubuntu kernel: [  175.979088] ata1.00: cmd 61/08:f8:00:08:12/00:00:00:00:00/40 tag 31 ncq dma 4096 out
Apr 22 16:51:44 ubuntu kernel: [  175.979088]          res 40/00:08:00:64:70/00:00:74:00:00/40 Emask 0x10 (ATA bus error)
Apr 22 16:51:44 ubuntu kernel: [  175.979090] ata1.00: status: { DRDY }
Apr 22 16:51:44 ubuntu kernel: [  175.979096] ata1: hard resetting link

在此处输入图片描述

Apr 24 04:11:48 ubuntu kernel: [  222.190508] ata1.00: detaching (SCSI 0:0:0:0)
Apr 24 04:11:48 ubuntu kernel: [  222.190714] blk_update_request: I/O error, dev sda, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
Apr 24 04:11:48 ubuntu kernel: [  222.190722] Buffer I/O error on dev sda, logical block 0, lost async page write
Apr 24 04:11:48 ubuntu kernel: [  222.190785] blk_update_request: I/O error, dev sda, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 0 prio class 0
Apr 24 04:11:48 ubuntu kernel: [  222.192117] sd 0:0:0:0: [sda] Synchronizing SCSI cache
Apr 24 04:11:48 ubuntu kernel: [  222.192227] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Apr 24 04:11:48 ubuntu kernel: [  222.192235] sd 0:0:0:0: [sda] Stopping disk
Apr 24 04:11:48 ubuntu kernel: [  222.192268] sd 0:0:0:0: [sda] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Apr 24 18:56:21 mayank-X510UNR kernel: [  208.822778] ata1: EH complete
Apr 24 18:56:21 mayank-X510UNR kernel: [  208.846957] ata1.00: exception Emask 0x10 SAct 0x0 SErr 0x450100 action 0x6 frozen
Apr 24 18:56:21 mayank-X510UNR kernel: [  208.846964] ata1.00: irq_stat 0x08000000, interface fatal error
Apr 24 18:56:21 mayank-X510UNR kernel: [  208.846969] ata1: SError: { UnrecovData PHYRdyChg CommWake Handshk }
Apr 24 18:56:21 mayank-X510UNR kernel: [  208.846976] ata1.00: failed command: WRITE DMA EXT
Apr 24 18:56:21 mayank-X510UNR kernel: [  208.846985] ata1.00: cmd 35/00:00:00:00:00/00:04:00:00:00/e0 tag 31 dma 524288 out
Apr 24 18:56:21 mayank-X510UNR kernel: [  208.846985]          res 50/00:03:00:00:00/00:00:00:00:00/a0 Emask 0x10 (ATA bus error)
Apr 24 18:56:21 mayank-X510UNR kernel: [  208.846989] ata1.00: status: { DRDY }
Apr 24 18:56:21 mayank-X510UNR kernel: [  208.846996] ata1: hard resetting link
Apr 24 18:56:21 mayank-X510UNR kernel: [  209.162445] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Apr 24 18:56:21 mayank-X510UNR kernel: [  209.174828] ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Apr 24 18:56:21 mayank-X510UNR kernel: [  209.174838] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Apr 24 18:56:21 mayank-X510UNR kernel: [  209.174845] ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.228657] ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.228674] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.228679] ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.257235] ata1.00: configured for UDMA/133
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.266501] ata1: EH complete
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.307284] ata1.00: exception Emask 0x10 SAct 0x0 SErr 0x450100 action 0x6 frozen
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.307292] ata1.00: irq_stat 0x08000000, interface fatal error
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.307297] ata1: SError: { UnrecovData PHYRdyChg CommWake Handshk }
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.307302] ata1.00: failed command: WRITE DMA EXT
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.307311] ata1.00: cmd 35/00:00:00:00:00/00:04:00:00:00/e0 tag 2 dma 524288 out
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.307311]          res 50/00:03:00:00:00/00:00:00:00:00/a0 Emask 0x10 (ATA bus error)
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.307315] ata1.00: status: { DRDY }
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.307324] ata1: hard resetting link
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.622114] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.634228] ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.634236] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.634240] ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.686520] ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.686528] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.686532] ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.714725] ata1.00: configured for UDMA/133
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.724038] ata1: EH complete
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.754765] ata1: limiting SATA link speed to 3.0 Gbps
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.754773] ata1.00: exception Emask 0x10 SAct 0x0 SErr 0x450100 action 0x6 frozen
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.754779] ata1.00: irq_stat 0x08000000, interface fatal error
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.754784] ata1: SError: { UnrecovData PHYRdyChg CommWake Handshk }
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.754790] ata1.00: failed command: WRITE DMA EXT
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.754804] ata1.00: cmd 35/00:00:00:00:00/00:04:00:00:00/e0 tag 4 dma 524288 out
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.754804]          res 50/00:03:00:00:00/00:00:00:00:00/a0 Emask 0x10 (ATA bus error)
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.754809] ata1.00: status: { DRDY }
Apr 24 18:56:22 mayank-X510UNR kernel: [  209.754820] ata1: hard resetting link
Apr 24 18:56:24 mayank-X510UNR kernel: [  211.967254] ata1: SATA link down (SStatus 1 SControl 320)
Apr 24 18:56:24 mayank-X510UNR kernel: [  211.977178] ata1: hard resetting link
Apr 24 18:56:26 mayank-X510UNR kernel: [  214.187128] ata1: SATA link down (SStatus 1 SControl 320)
Apr 24 18:56:26 mayank-X510UNR kernel: [  214.188545] ata1: hard resetting link
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395665] ata1: SATA link down (SStatus 1 SControl 320)
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395682] ata1.00: disabled
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395742] sd 0:0:0:0: [sda] tag#4 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395749] sd 0:0:0:0: [sda] tag#4 Sense Key : Not Ready [current] 
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395754] sd 0:0:0:0: [sda] tag#4 Add. Sense: Logical unit not ready, hard reset required
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395759] sd 0:0:0:0: [sda] tag#4 CDB: Write(10) 2a 00 00 00 00 00 00 04 00 00
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395765] blk_update_request: I/O error, dev sda, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 128 prio class 0
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395775] Buffer I/O error on dev sda, logical block 0, lost async page write
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395793] Buffer I/O error on dev sda, logical block 1, lost async page write
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395798] Buffer I/O error on dev sda, logical block 2, lost async page write
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395802] Buffer I/O error on dev sda, logical block 3, lost async page write
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395806] Buffer I/O error on dev sda, logical block 4, lost async page write
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395810] Buffer I/O error on dev sda, logical block 5, lost async page write
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395815] Buffer I/O error on dev sda, logical block 6, lost async page write
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395819] Buffer I/O error on dev sda, logical block 7, lost async page write
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395823] Buffer I/O error on dev sda, logical block 8, lost async page write
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.395827] Buffer I/O error on dev sda, logical block 9, lost async page write
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396026] ata1: EH complete
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396038] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396051] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396070] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396075] blk_update_request: I/O error, dev sda, sector 131072 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396185] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396200] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396207] blk_update_request: I/O error, dev sda, sector 536870912 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396242] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396250] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396257] sd 0:0:0:0: [sda] Read Capacity(16) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396261] sd 0:0:0:0: [sda] Sense not available.
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396267] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396275] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396282] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396288] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396291] sd 0:0:0:0: [sda] Sense not available.
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396297] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396305] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396314] sd 0:0:0:0: [sda] 0 512-byte logical blocks: (0 B/0 B)
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396318] sd 0:0:0:0: [sda] 4096-byte physical blocks
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396324] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396332] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396340] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396347] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396353] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396362] sda: detected capacity change from 1000204886016 to 0
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396420] sd 0:0:0:0: rejecting I/O to offline device
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396435] blk_update_request: I/O error, dev sda, sector 1953523712 op 0x1:(WRITE) flags 0x100000 phys_seg 14 prio class 0
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.396983] ata1.00: detaching (SCSI 0:0:0:0)
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.398145] sd 0:0:0:0: [sda] Stopping disk
Apr 24 18:56:29 mayank-X510UNR kernel: [  216.398193] sd 0:0:0:0: [sda] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK

答案1

NCQ 错误

您收到了 NCQ 错误...

Apr 22 16:51:44 ubuntu kernel: [  175.979055] ata1.00: failed command: WRITE FPDMA QUEUED
Apr 22 16:51:44 ubuntu kernel: [  175.979060] ata1.00: cmd 61/00:08:00:64:70/04:00:74:00:00/40 tag 1 ncq dma 524288 out
Apr 22 16:51:44 ubuntu kernel: [  175.979060]          res 40/00:08:00:64:70/00:00:74:00:00/40 Emask 0x10 (ATA bus error)
Apr 22 16:51:44 ubuntu kernel: [  175.979062] ata1.00: status: { DRDY }

本机命令队列 (NCQ) 是串行 ATA 协议的扩展,允许硬盘驱动器内部优化接收的读写命令的执行顺序。

我们必须暂时尝试这个……

  • 启动 Ubuntu Live DVD/USB
  • 在 GRUB 菜单屏幕上,按“e”键进入编辑模式
  • 使用箭头键找到“quiet splash”
  • 将其更改为“quiet splash libata.force = noncq”
  • 按 control+x 或 F10 继续启动
  • 尝试完成我的其余答案
  • 我们会在您安装 Ubuntu 后使 ncq 补丁永久生效

那就试试这个...

  • 创建外部可启动 USB Ubuntu 安装
  • 编辑 /etc/default/grub ( sudo -H gedit /etc/default/grub)
  • 找到“安静的飞溅”
  • 将其更改为“quiet splash libata.force = noncq”
  • 保存文件并退出gedit
  • sudo update-grub
  • reboot
  • 然后重试gpartedfsck并且bad blocking
  • 如果一切正常,请将 Ubuntu 安装到内部硬盘上
  • 如果有效,启动 Ubuntu 并应用此永久 ncq 补丁

笔记:由于 HDD 是空的,使用gparted,放下一个新的 MBR/GPT 分区表(这将擦除磁盘),然后创建一个大的 ext4 分区...

文件系统检查

首先我们检查您的文件系统...

  • 以“试用 Ubuntu”模式启动 Ubuntu Live DVD/USB
  • terminalCtrl+ Alt+打开窗口T
  • 类型sudo fdisk -l
  • 识别“Linux 文件系统”的 /dev/sdXX 设备名称
  • 输入sudo fsck -f /dev/sdXX,替换sdXX为您之前找到的数字
  • fsck如果有错误则重复命令

坏阻塞

您有读取错误、寻道错误和 234 个坏扇区。

然后我们对磁盘进行坏块处理......

注意:不要中止坏块扫描!

注意:不要对 SSD 造成坏块

注意:请先备份您的重要文件!

注意:这将花费很多小时

注意:您可能面临硬盘故障

在“尝试 Ubuntu”模式下启动 Ubuntu Live DVD/USB。

terminal...

sudo fdisk -l# 识别所有“Linux 文件系统”分区

sudo e2fsck -fcky /dev/sdXX# 只读测试

或者

sudo e2fsck -fccky /dev/sdXX# 非破坏性读写测试(受到推崇的)

-k 很重要,因为它会保存之前的坏块表,并将任何新的坏块添加到该表中。如果没有 -k,您将丢失所有之前的坏块信息。

-fccky 参数...

   -f    Force checking even if the file system seems clean.

   -c    This option causes e2fsck to use badblocks(8) program to do a
         read-only scan of the device in order to find any bad blocks.
         If any bad blocks are found, they are added to the bad block
         inode to prevent them from being allocated to a file or direc‐
         tory.  If this option is specified twice, then the bad block
         scan will be done using a non-destructive read-write test.

   -k    When combined with the -c option, any existing bad blocks in the
         bad blocks list are preserved, and any new bad blocks found by
         running badblocks(8) will be added to the existing bad blocks
         list.

   -y    Assume an answer of `yes' to all questions; allows e2fsck to be
         used non-interactively. This option may not be specified at the
         same time as the -n or -p options.

更新#1:

在 ncq、fsck 和坏阻塞之后,看起来 HDD 需要更换。

相关内容