无法安装引导加载程序,grub dev/sda

无法安装引导加载程序,grub dev/sda

我在安装 Ubuntu 时遇到了麻烦。每次都一切顺利,直到它尝试执行grub-install /dev/sda。大约一个半小时后,它说:

Unable to install GRUB in /dev/sda
Executing `grub-install /dev/sda` failed.
This is a fatal error.

我的计算机无法启动 - 我已经连续三次遇到此问题:

[   82.890016] blk_update_request: I/O error, dev sda, sector 63
[   82.890021] Buffer I/O error on dev sda, logical block 7, async page read
[   82.890040] ata1: EH complete
[  138.832445] ata1.00: exception Emask 0x0 SAct 0x1c0000 SErr 0x0 action 0x0
[  138.832516] ata1.00: irq_stat 0x40000008
[  138.832554] ata1.00: failed command: READ FPDMA QUEUED
[  138.832604] ata1.00: cmd 60/08:90:38:00:00/00:00:00:00:00/40 tag 18 ncq4096 in
                        res 41/40:00:3f:00:00/00:00:00:00:00/40 Emask 0x409 (media error) <F>
[  138.832727] ata1.00: status: { DRDY ERR }
[  138.832762] ata1.00: error: { UNC }
[  138.838261] ata1.00: configured for UDMA/133
[  138.838285] sd 0:0:0:0: [sda] tag#18 FAILED Result: hostbyte=DID_OK 
driverbyte=DRIVER_SENSE
[  138.838289] sd 0:0:0:0: [sda] tag#18 Sense Key : Medium Error [current] 
[descriptor] 
[  138.838293] sd 0:0:0:0: [sda] tag#18 Add. Sense: Unrecovered read error - auto reallocate failed
[  138.838298] sd 0:0:0:0: [sda] tag#18 CDB: Read(10) 28 00 00 00 00 38 00 00 08 00
[  138.838301] blk_update_request: I/O error, dev sda, sector 63
[  138.838358] Buffer I/O error on dev sda, logical block 7, async page read
[  138.838444] ata1: EH complete

我尝试格式化整个磁盘,但它显示:

Error wiping device: Command-line `wipefs -a "/dev/sda"' exited with non-zero exit status 1: wipefs: error: /dev/sda: probing initialization failed: Device or resource busy
 (udisks-error-quark, 0)

答案1

错误消息似乎表明故障的磁盘驱动器具体存在访问 MBR 内的第 63 扇区的问题,不幸的是,如果出现这种情况,则排除了像坏块这样的解决方法。

我建议您使用智能来测试驱动器,使用实时 CD 启动机器,然后键入此命令将智能工具安装到实时 CD 环境中:

sudo apt-get install smartmontools

安装后,您可以运行以下命令来让驱动器自行测试是否存在问题:

sudo smartctl -t long /dev/sda

此过程将需要一些时间,因为驱动器将对驱动器的每个扇区执行测试,测试完成后,您可以使用以下方式检查结果:

sudo smartctl -l selftest /dev/sda

如果智能测试报告驱动器存在物理错误,您可能需要认真考虑更换硬件,一旦出现物理扇区错误,而驱动器无法通过内部重新映射到备用扇区自动修复,这通常是一个不好的迹象,会影响驱动器的持续寿命和可靠性,即使有某种方法可以解决这个问题。

相关内容