how to scan hard drive for bad sectors
how to scan hard drive for bad sectors
I wanna know if there is a good and simple utility that runs with puppy linux and allow me to detect hard drive bad sectors and fix them.
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
I remember this has been discussed here already, but don't know where and when exactly.
Maybe you can find the posts with the puppysearch link in my sig.
Maybe you can find the posts with the puppysearch link in my sig.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]
Do some research on the command
Note that the target partition must be unmounted when you run e2fsck, so you will need to boot with the "puppy pfix=ram" option.
Code: Select all
e2fsck -c /dev/sdxy
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
How could I forget that obvious one.
rcrsn51 is right. The referenced command can take care of this.
rcrsn51 is right. The referenced command can take care of this.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]
-
- Posts: 282
- Joined: Wed 16 Dec 2009, 21:38
- Location: Earth
Re: how to scan hard drive for bad sectors
You need a low-level diagnostic program for correct testing HDD's surface.eXistenZ wrote:I wanna know if there is a good and simple utility that runs with puppy linux and allow me to detect hard drive bad sectors and fix them.
The bad sectors are different: some of them may be recovered but some - never.
I never heard of linux programs for such purposes but I know about programs for
DOS.
Which model of HDD You have?
SUUM CUIQUE.
I thought Linux folks cared about their HDDs. Is such things top secret held by the makers of hdds then? or why else doesn't such exists.I never heard of linux programs for such purposes but I know about programs for
DOS.
I want to be totally free of Ms things.
Maybe there exist FreeDOS programs on some rescue CD?
I use Google Search on Puppy Forum
not an ideal solution though
not an ideal solution though
- linuxsansdisquedur
- Posts: 248
- Joined: Tue 13 Jan 2009, 21:17
- Location: South of France
- Colonel Panic
- Posts: 2171
- Joined: Sat 16 Sep 2006, 11:09
The best way I know of to "treat" an old hard drive is (or was) Gibson Research's "Spinrite", but that's not free or cheap (if it's still available - it's been years since I last saw it).
Failing that, Norton Utilities used to do a program called "Calibrate" in their Utilities suite which did a similar job. I used it once or twice in the past.
Failing that, Norton Utilities used to do a program called "Calibrate" in their Utilities suite which did a similar job. I used it once or twice in the past.
Gigabyte M68MT-52P motherboard, AMD Athlon II X4 630, 5.8 GB of DDR3 RAM and a 250 GB Hitachi hard drive running Ubuntu 16.04.6, MX-19.2, Peppermint 10, PCLinuxOS 20.02, LXLE 18.04.3, Pardus 19.2, exGENT 200119, Bionic Pup 8.0 and Xenial CE 7.5 XL.
Re: how to scan hard drive for bad sectors
PANZERKOPF is correct. Some of the programs offered by the hardware vendor do, in fact, run under Linux but ALL are proprietary versions because they address the drive logic circuits directly.PANZERKOPF wrote:You need a low-level diagnostic program for correct testing HDD's surface.
If you have a Seagate drive, there is a Seagate utility (free) for testing, diagnostics and low level formatting.
If you have a Fujitsu drive, same thing.
If you have a Western Digital drive, same thing.
If you have ... yeah, same thing!
Check the web and download the image to build a CD for testing your particular hard drive. The biggest issue will be that most will assume you do that using a Windows PC and provide a suitable image. After building the CD from the image file you won't need Windows. If you're lucky your hdd manufacturer will supply an ISO image and you can use burniso2cd to make your CD.
FWIW, e2fsck is a file system checker and not a drive sector diagnostic. It's action is to look for inconsistencies in the file system tables in an ext2 file system (the 'e2' part of the name), not to check hard disk sectors for bad reads and writes. It may indicate problems in a given table, which may be due to problems with the drive, but it will never locate the specific sector or attempt to recover it at the hardware level. Still, it is a very useful utility for what it does.
Hope that helps.
[i]Actions speak louder than words ... and they usually work when words don't![/i]
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com
Detecting bad hard drive sectors is one thing;
"Repairing"......another.
http://forums.techarena.in/hardware-per ... 092536.htm
"Repairing"......another.
http://forums.techarena.in/hardware-per ... 092536.htm
Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs
-
- Posts: 282
- Joined: Wed 16 Dec 2009, 21:38
- Location: Earth
About secrets:nooby wrote: I thought Linux folks cared about their HDDs. Is such things top secret held by the makers of hdds then? or why else doesn't such exists.
I want to be totally free of Ms things.
Maybe there exist FreeDOS programs on some rescue CD?
Standard ATA commands are no secret but each HDD also has it's own specific commands which are manufacturer's secret. Standard testing programs use
only standard ATA commands and such testing is enough for usual user.
But if You want to test a HDD in advanced "technological mode", You need to
know these commands and also a structure of HDD.
For example: Linux has a "hdparm" utility which sends and receives ATA commands to/from HDD.
One of the best program for testing HDD in standard mode is "victoria" (Have attached here). Runs under FreeDOS.
P.S.
This program is freeware.
- Attachments
-
- vcr333re.zip
- (108.49 KiB) Downloaded 625 times
Last edited by PANZERKOPF on Sat 29 May 2010, 22:25, edited 1 time in total.
SUUM CUIQUE.
-
- Posts: 282
- Joined: Wed 16 Dec 2009, 21:38
- Location: Earth
You are right, "Repairing" is not a correct word but "replacing"rjbrewer wrote:Detecting bad hard drive sectors is one thing;
"Repairing"......another.
is more correct. Each HDD has few reserved sectors which can be used instead
of damaged sectors. All sectors are ordered in special tables.
SUUM CUIQUE.
-
- Posts: 33
- Joined: Wed 03 Feb 2010, 10:34
Smartmontools won't fix bad sectors, but will pick them up. This guide tells you how to manually reallocate bad blocks:
http://smartmontools.sourceforge.net/badblockhowto.html
And rather more straight forward, here's a HOWTO on using smartctl to run tests on SMART enabled hard drives:
http://blog.shadypixel.com/monitoring-h ... tmontools/
http://smartmontools.sourceforge.net/badblockhowto.html
And rather more straight forward, here's a HOWTO on using smartctl to run tests on SMART enabled hard drives:
http://blog.shadypixel.com/monitoring-h ... tmontools/
I've been using the following with success:
"To erase a HDD, and at the same time remap any bad blocks to have them taken out of use:
e.g."
badblocks -svw /dev/sdc
badblocks -svw /dev/sda
Where sda or sdc is the HDD identifier."
Got at http://www.murga-linux.com/puppy/viewtopic.php?t=38632
The OP didn't say whether the process was to be non-destructive.
"To erase a HDD, and at the same time remap any bad blocks to have them taken out of use:
e.g."
badblocks -svw /dev/sdc
badblocks -svw /dev/sda
Where sda or sdc is the HDD identifier."
Got at http://www.murga-linux.com/puppy/viewtopic.php?t=38632
The OP didn't say whether the process was to be non-destructive.
From the e2fsck man page:
-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 directory. If this option is specified twice, then the bad block scan will be done using a non-destructive read-write test.
Yes, "allocated" meaning at the software level. If the problem is at the hardware level the only way to recover is via a low-level format which locks out the bad sectors via the device firmware i.e. the OS never gets to "see" the excluded blocks much less allocate them.rcrsn51 wrote:From the e2fsck man page:-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 directory. If this option is specified twice, then the bad block scan will be done using a non-destructive read-write test.
BTW, AFAIK a "non-destructive read-write test" is not possible on occupied/allocated data blocks. Writing test data to a sector to read it back for accuracy MUST overwrite whatever data was already in that sector. It could be useful for checking an empty drive after reformatting though; IOW where the partition table data is not affected (hence non-destructive) ipso facto that specific area (boot/partition area) of the drive would also not be checked by the read-write test.
Maybe we're talking about different things, though, so I'm happy to A2D on the subject.
[i]Actions speak louder than words ... and they usually work when words don't![/i]
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com