Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 2471  / 1 Year ago, tue, may 9, 2023, 11:45:32

I am dual booting Ubuntu 12.04 and Windows 8. Earlier today, after restarting due to some input issues, I started getting the message upon selecting Ubuntu from GRUB, "errors were found while checking the disk drive for /". I opted to ignore it, and Ubuntu loaded as normal. Upon checking the Disk Utility tool, I see the SMART status "Disk has a few bad sectors". When checking the specific information, I am given a warning for "Current Pending Sector Count". What does this mean? Should I allow an automated attempt to fix the issue? I've had further trouble caused by allowing automated fixes to run before because of conflicts with Windows 8 and UEFI, but I have no idea if there is any association between that and this issue. I can't imagine this is due to physical hard drive damage, as it is very new hardware. Thanks to anyone who can explain it.


More From » hard-drive

 Answers
4

Sometimes sudden power failure can result in one sector being reported as bad because it didn't get completely written. You can run sudo smartctl -t long /dev/sda to ask the drive to test itself. Check the status every once in a while with sudo smartctl -a /dev/sda and when it finds a bad sector, note the sector number, then do:



sudo dd iflag=direct if=/dev/sda count=1 skip=sector of=/dev/null


That should report an IO error, if not then something is wrong and you should not proceed.



sudo dd if=/dev/zero count=1 oflag=direct of=/dev/sda seek=sector


This will try to re-write that sector full of zeros. This should succeed and the SMART pending_sector count should drop by one. If the sector was physically damaged, then the reallocated_count will go up by one. Repeat the process until you have no more pending sectors and if you have no reallocated sectors either, then it was just sudden power loss, and the drive is fine. If you do have reallocated sectors, then then drive may be on its way out and you should replace it.


[#28981] Thursday, May 11, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
repend

Total Points: 195
Total Questions: 113
Total Answers: 107

Location: Nicaragua
Member since Tue, Dec 8, 2020
3 Years ago
repend questions
Thu, May 11, 23, 09:38, 1 Year ago
Thu, Jan 5, 23, 21:41, 1 Year ago
Mon, Nov 22, 21, 19:37, 2 Years ago
Mon, Jan 24, 22, 11:26, 2 Years ago
;