 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

4th April 2012, 08:39 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: segovia
Posts: 4

|
|
|
HDD Bad Sectors
First of all, sorry if this is a recurrent topic and has been previously answered, I did search and could not find a solution.
For some time my hdd has been giving me headaches, my computer were sooo slow to turn on, and I got notifies about problems with hdd.
The other day, I couldnt even turn on my laptop, it just didnt boot. I decided to reinstall F16 and got no problems, but when I restarted the computer, it didnt boot again.
So Im now with the F16 liveCD and it seems the main problem is about bad sectors (maybe important data for boot is allocated in a bad sector), the disk utilities says it is 177 bad sectors.
How can I repair this? I know this may be a Hardware error and cannot be repaired, but I read too that bad sectors can be reallocated so you lose that space in disk but can continue using the hdd.
Thank you,
|

4th April 2012, 08:48 PM
|
|
Registered User
|
|
Join Date: Aug 2011
Posts: 694

|
|
|
Re: HDD Bad Sectors
The reallocation of sectors is an internal process of the hard disk and isn't something that one can do manually.
The best thing to do is to replace the drive.
|

4th April 2012, 09:50 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: segovia
Posts: 4

|
|
|
Re: HDD Bad Sectors
I have read something about tools like smartctl, badblocks + mkfs. But I dont know what tool to use (if there is one usefull for this purpose) or how to.
|

4th April 2012, 11:57 PM
|
 |
Administrator
|
|
Join Date: Jun 2006
Location: Paris, TX
Posts: 22,309

|
|
|
Re: HDD Bad Sectors
The only tool which is going to help you is money to buy a new disk. Nothing can fix physical damage or wear to a drive, and they certainly don't heal. You may chase such repair rabbits as you wish, but in the end, I think you're wasting your time trying to repair a disk with a lot of bad sectors ... which are increasing. I advise spinning down the disk, and not working with it at all until you have a replacement installed. Then only spin the old drive up to recover what files are actually recoverable -- in one session -- and then remove and destroy the old drive so you'll never be tempted to trust it again.
There are some extremely powerful and useful magnets in old drives, so taking it apart to fetch those would be my course of action before I trashed the rest of it.
|

5th April 2012, 01:54 AM
|
 |
Registered User
|
|
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,298

|
|
|
Re: HDD Bad Sectors
Quote:
Originally Posted by Dutchy
The reallocation of sectors is an internal process of the hard disk and isn't something that one can do manually.
The best thing to do is to replace the drive.
|
That's not entirely true. When a block can't be read it can cause a boot-fail and will be added to a list of failing (not failed) blocks. The disk controller policy *may* reallocate the block after N failed reads. An uncorrectble failure to write will cause an immediate reallocation IF POSSIBLE.
You can also use the "hdparm --make-bad-sector ..." command to manually force a sector fail - BUT it is highly NOT RECOMMENDED.
You can also use
for((n=0;n<10000;n++)) ; do hdparm --write-sector $n; done
to zero the first 10k sectors and force a remap (if possible).
Quote:
Originally Posted by Mycoplasma
I have read something about tools like smartctl, badblocks + mkfs. But I dont know what tool to use (if there is one usefull for this purpose) or how to.
|
smartctl -H /dev/sda
Will show the drive health (the manufacturers idea of go/no-go).
smartctl -a /dev/sda
will show more details (post for an interpretation).
Unless you are vastly lucky, this problem likely does spell the end of your drive. If i's under warrantee - run the mfgrs tests and return it.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
|

5th April 2012, 11:02 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: segovia
Posts: 4

|
|
|
Re: HDD Bad Sectors
Code:
[root@localhost liveuser]# smartctl -a /dev/sda
smartctl 5.42 2011-10-20 r3458 [i686-linux-3.1.0-7.fc16.i686] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Scorpio Blue Serial ATA
Device Model: WDC WD3200BEVT-22A23T0
Serial Number: WD-WXD1A7002658
LU WWN Device Id: 5 0014ee 6ab06715b
Firmware Version: 01.01A01
User Capacity: 320,072,933,376 bytes [320 GB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Thu Apr 5 05:55:21 2012 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 241) Self-test routine in progress...
10% of test remaining.
Total time to complete Offline
data collection: ( 7980) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 95) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x7037) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 190 190 051 Pre-fail Always - 59578
3 Spin_Up_Time 0x0027 154 132 021 Pre-fail Always - 1300
4 Start_Stop_Count 0x0032 099 099 000 Old_age Always - 1408
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 096 096 000 Old_age Always - 3065
10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 897
191 G-Sense_Error_Rate 0x0032 001 001 000 Old_age Always - 470
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 65
193 Load_Cycle_Count 0x0032 189 189 000 Old_age Always - 35237
194 Temperature_Celsius 0x0022 098 094 000 Old_age Always - 45
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 197 197 000 Old_age Always - 197
198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 1
200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed: read failure 10% 3038 77008
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
It PASSES the test, but I cannot boot from hdd, so I dont think it would have to pass it...
Quote:
You can also use
for((n=0;n<10000;n++)) ; do hdparm --write-sector $n; done
to zero the first 10k sectors and force a remap (if possible).
|
I didnt understand this
Yes, I will buy another hdd, but I would like to save this, besides, its just one year old...
Thank You
|

5th April 2012, 11:22 AM
|
 |
Administrator
|
|
Join Date: Dec 2004
Location: Canada
Age: 22
Posts: 9,224

|
|
|
Re: HDD Bad Sectors
As stevea mentioned, drives sometimes remap a sector upon N failed reads, but it's usually only upon a failed write that this happens.
If the drive has bad sectors but those sectors have never been written to, only read, and those sectors are holding files the computer needs to boot then it is entirely possible that the drive passes all SMART tests (since it shows 0 remapped sectors) but it still has physical damage.
I would recommend you get a copy of a Fedora 16 Live CD (on another computer) and avoid using this one until you can boot from the live CD. One booted from the live CD, use data image tools such as ddrescue to create an image of the bad drive that you can use to recover data from later.
(Pending) dead sectors are generally a sign of a dying drive and generally it won't get any better. As the drive continues to fail, more sectors will be discovered leaving more and more of your data unrecoverable. It's best to act now while most of the data is still OK.
|

5th April 2012, 03:37 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: segovia
Posts: 4

|
|
|
Re: HDD Bad Sectors
Ok, I will go today for a new hdd.
Is it complicated to replace the hdd of a laptop? I have never opened a laptop before.
Besides, this hdd is just 1 year old, is it normal for a hdd just to live one year? I guess not, what have I done wrong, what should I do to improve my new hdd livetime?
Thank you all
|

5th April 2012, 04:01 PM
|
 |
Administrator (yeah, back again)
|
|
Join Date: Jul 2004
Location: Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
Age: 67
Posts: 21,201

|
|
|
Re: HDD Bad Sectors
Before you run out and buy a new hard drive, check here: http://support.wdc.com/warranty/index_end.asp?lang=en If it's only a year old, it should be under warranty and they'll send you a replacement. I had a WD die in a couple of months and after it failed their diagnostic test, they quickly replaced it.
It shouldn't be hard to open and replace the laptop hard drive. Check the website for your machine and search online for instructions. Just as info, you probably did NOTHING wrong. These drives can last for years or die in months. Sometimes you just get a lemon! Of course, if you drop it, that's going to be one sure way to shorten the life.
__________________
Linux & Beer - That TOTALLY Computes!
Registered Linux User #362651
Don't use any of my solutions on working computers or near small children.
Last edited by bob; 5th April 2012 at 04:04 PM.
|

5th April 2012, 06:05 PM
|
|
Registered User
|
|
Join Date: Dec 2006
Posts: 1,718

|
|
|
Re: HDD Bad Sectors
Try not to drop your computer ;-)
The G-Sense_Error_Rate indicates death was caused by externally-induced shock or vibration.
So you probably won't get any warranty for this.
|

6th April 2012, 03:02 AM
|
 |
Administrator (yeah, back again)
|
|
Join Date: Jul 2004
Location: Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
Age: 67
Posts: 21,201

|
|
|
Re: HDD Bad Sectors
Well, it's worth the effort to submit the test to WD and confirm their approval or rejection. Drives are reasonable these days and WD may value your business more than one lousy drive. Worst case, you're off to the store to buy a new one a day later. (Edit: Holy Smokes! Just noticed that post was #20,000 ! Man, I gotta get a LIFE! )
__________________
Linux & Beer - That TOTALLY Computes!
Registered Linux User #362651
Don't use any of my solutions on working computers or near small children.
|

6th April 2012, 03:13 AM
|
 |
Administrator
|
|
Join Date: Jun 2006
Location: Paris, TX
Posts: 22,309

|
|
|
Re: HDD Bad Sectors
Kinda long in the old cyber-tooth, there Bob. <..  ..>
Mycoplasma, if you'll post the particulars on your laptop, such as make and model, you might get more info on how hard it is to change out the HDD. That being said, it's normally very easy.
|

6th April 2012, 04:56 AM
|
 |
Registered User
|
|
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,298

|
|
|
Re: HDD Bad Sectors
These are the only numbers worth of any great concern....
Code:
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
191 G-Sense_Error_Rate 0x0032 001 001 000 Old_age Always - 470
197 Current_Pending_Sector 0x0032 197 197 000 Old_age Always - 197
Your drive has been "banged" while spinning 470 times. The really looks abusive. I have a Lenovo laptop and it has accelerometers that are supposed to detect a jolt in acceleration and retract the heads. Since I installed an SSD drive I don't really care - except I was testing the accelerometers and they don't cause a retract unless you bang the laptop pretty hard. Dropping it from say ~4 inches above a hard surface - or giving it a good pop with the heel of your hand.
The Current Pending Sector says there are 197 sectors that have had read-errors but '0' sectors have been remapped. This is b/c there was no write error.
Here is a description of parameter 197
Quote:
|
Count of "unstable" sectors (waiting to be remapped, because of read errors). If an unstable sector is subsequently read successfully, this value is decreased and the sector is not remapped. Read errors on a sector will not remap the sector (since it might be readable later); instead, the drive firmware remembers that the sector needs to be remapped, and remaps it the next time it's written.[25]
|
I would certainly try to get a warrantee replacement - HOWEVER you can zero the drive and likely this will remap the bad sectors.
http://en.wikipedia.org/wiki/Bad_sector
As root from a live Linux CD ...
dd if=/dev/zero of=/dev/sda bs=10M
Afterward run smartctl -a again and see what you have.
---------- Post added at 11:56 PM ---------- Previous post was at 11:52 PM ----------
Quote:
Originally Posted by bob
(Edit: Holy Smokes! Just noticed that post was #20,000 ! Man, I gotta get a LIFE! )
|
Doncha get a ticker-tape parade or something ?
I've found "a life" like "maturity" is highly over-rated.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Last edited by stevea; 6th April 2012 at 04:54 AM.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
HDD Bad Sectors
|
drnetsys |
Using Fedora |
4 |
22nd January 2012 12:59 AM |
|
F11 bad sectors HD
|
Tornike |
Installation and Live Media |
20 |
20th June 2009 05:58 AM |
|
Need help to fix bad sectors
|
Joffer |
Using Fedora |
4 |
19th April 2006 10:38 PM |
|
Bad Sectors?
|
justincataldo |
Using Fedora |
7 |
21st June 2005 09:15 PM |
|
sectors < 63
|
kaushik |
Installation and Live Media |
0 |
14th January 2005 08:38 AM |
Current GMT-time: 17:18 (Saturday, 18-05-2013)
|
|
 |
 |
 |
 |
|
|