One of my long-running hosts cannot boot into the system. After preliminary judgment, there may be a problem with the hard disk. Start with the startup disk and scan with Disk Utility to get the following results:
DiskGenius 磁盘检测结果:
被检测磁盘:HD129:(932GB)
检测范围:柱面 0 - 121601 (该磁盘柱面总数:121601)
完成时间:2022-10-16 09:15:57
共检测到 6 个坏道区域。详细坏道信息如下:
柱面号 磁头号 扇区号 扇区数目 耗时(毫秒) 修复情况 错误信息
1044 未检测 未检测 未检测 8670 未处理 10: Data Error(Bad CRC or ECC)
1058 未检测 未检测 未检测 8680 未处理 10: Data Error(Bad CRC or ECC)
1264 未检测 未检测 未检测 8670 未处理 10: Data Error(Bad CRC or ECC)
1370 未检测 未检测 未检测 8560 未处理 10: Data Error(Bad CRC or ECC)
7375 未检测 未检测 未检测 8620 未处理 10: Data Error(Bad CRC or ECC)
21614 未检测 未检测 未检测 8670 未处理 10: Data Error(Bad CRC or ECC)
Bad sectors have indeed occurred. Usually only BOINC is running and nothing important, so it doesn't matter if this hard drive is reinstalled. If your situation is different from mine, please back up your data before proceeding. The solution is not difficult, which is to divide an empty partition to cover the bad sectors and only use the remaining partition. The premise is that the bad sectors of the hard disk are relatively concentrated. If they are evenly distributed throughout the hard disk, there will be no solution. The disadvantage of this method is that some hard drive capacity will be lost.
echo $((932 * 21614 / 121601))
My hard drive has a capacity of 932GB, with a total of 121,601 cylinders. The last bad sector is on 21,614 cylinders. A simple calculation is around 165GB. Select "Do not use this partition" and divide it into an empty partition of about 200GB, which is farther away from bad sectors and safer.
After such partitioning, the system can be successfully reinstalled and run stably.