opensuse - Linux Tool to check for bad blocks (ext3 & FAT32 File Systems)

Jay Mistry
2009-07-02T06:50:59+00:00

I have a 500 GB SATA Hard Disk- this has partitions as follows:

12 GB, 18 GB, 20 GB, 35 GB, 55 GB - Linux (all ext3)
200 GB (FAT32)
160 GB (NTFS)

This HD is used for installing both Windows XP & openSUSE 11.1 (x86).
I suspect one or more partition (200 GB FAT & the 12 GB ext3) may have
developed bad blocks (sectors). Is there any program that can be used
off a Live CD to check for bad blocks for Linux (ext3) and Windows
File Systems (when booting Windows, Checkdisk begins checking the 200
GB partition and then hangs & re-boot is necessary to login to
Windows).

Re: opensuse - Linux Tool to check for bad blocks (ext3 & FAT32 File Systems) by Karl Sinn on 2009-07-02T10:03:45+00:00
Hi,

Am Donnerstag, 2. Juli 2009 08:50:49 schrieb Jay Mistry:
> This HD is used for installing both Windows XP & openSUSE 11.1 (x86).
> I suspect one or more partition (200 GB FAT & the 12 GB ext3) may have
> developed bad blocks (sectors). Is there any program that can be used
> off a Live CD to check for bad blocks for Linux (ext3) and Windows
> File Systems (when booting Windows, Checkdisk begins checking the 200
> GB partition and then hangs & re-boot is necessary to login to
> Windows).

badblocks is the name for the program that checks for bad bocks :-)

Karl

Re: opensuse - Linux Tool to check for bad blocks (ext3 & FAT32 File Systems) by Jay Mistry on 2009-07-04T06:44:36+00:00
>
> badblocks is the name for the program that checks for bad bocks :-)
>
> Karl

Will 'badblocks' be able to check Windows (FAT32, NTFS) file systems
as well as ext3 ?

Can it be run off a Live CD, and which Live CD has it ? (I tried
PCLinux OS 2009, but it was
not there).

Jay

Re: opensuse - Linux Tool to check for bad blocks (ext3 & FAT32 File Systems) by Karl Sinn on 2009-07-04T07:48:03+00:00
Hi,

Am Samstag, 4. Juli 2009 08:44:23 schrieb Jay Mistry:
> Will 'badblocks' be able to check Windows (FAT32, NTFS) file systems
> as well as ext3 ?

I think that badblocks only checks read and write access to every block on the 
disk without changing it, so it should be filesystem independant. But, I'm 
not an expert.

> Can it be run off a Live CD, and which Live CD has it ? (I tried
> PCLinux OS 2009, but it was
> not there).

Try Knoppix?

Karl

Re: opensuse - Linux Tool to check for bad blocks (ext3 & FAT32 File Systems) by Carlos E. R. on 2009-07-04T08:46:28+00:00
>
> Will 'badblocks' be able to check Windows (FAT32, NTFS) file systems
> as well as ext3 ?

Yes. It only checks, it does not repair or remap. The format is 
irrelevant, even if it does not exist. Read the manual. For 
repairing/remaping you need manual action with different tools.


There are also the SMART tests, using smartctl, or the utility from the 
manufacturer. Format is irrelevant, and can be tested "live".

- 

Re: opensuse - Linux Tool to check for bad blocks (ext3 & FAT32 File Systems) by David Bolt on 2009-07-04T17:30:54+00:00
On Sat, 4 Jul 2009, Carlos E. R. wrote:-

>
>
>On Saturday, 2009-07-04 at 12:14 +0530, Jay Mistry wrote:
>
>>> badblocks is the name for the program that checks for bad bocks :-)
>>>
>>> Karl
>>
>> Will 'badblocks' be able to check Windows (FAT32, NTFS) file systems
>> as well as ext3 ?
>
>Yes. It only checks, it does not repair or remap.

It'll do a read-only test, a non-destructive write test, or a
destructive write test. With the two write-tests, if it finds a bad
sector and the drive has spare sectors available to remap, the drive
itself will do the remapping.

The non-destructive write test means it reads what's there on the drive,
writes it back and checks it's written back properly, and so doesn't
wipe the data.

The destructive write test is more thorough, filling each sector of the
drive with the values 0x55 0xaa 0xff and 0x00 in turn, checking that
they are the same on read. End results is a completely wiped drive and,
as with the non-destructive write-test, if the drive is able to do so,
the spare sectors should be used to map out the bad ones.

>The format is irrelevant, even if it does not exist. Read the manual.
>For repairing/remaping you need manual action with different tools.

I don't bother with other tools, except maybe the manufacturers drive
test and formatting tools. If I find bad sectors on a drive that the
drive itself can't remap, it means that it's run out of unallocated
sectors to use in place of the bad sectors and that the number of bad
sectors is likely to get worse. I'll use the manufacturers tools and, if
that comes up saying the drive is bad, it gets replaced.

>There are also the SMART tests, using smartctl, or the utility from the
>manufacturer. Format is irrelevant, and can be tested "live".

And those tests can take considerably less time than a run through with
badblocks. Only problem is it doesn't test the drive surface, but does
tell you if the drive thinks it's failing.


Regards,
        David Bolt


Re: opensuse - Linux Tool to check for bad blocks (ext3 & FAT32 File Systems) by Jim Flanagan on 2009-07-04T18:19:38+00:00
Jay Mistry wrote:
> I have a 500 GB SATA Hard Disk- this has partitions as follows:
>
> 12 GB, 18 GB, 20 GB, 35 GB, 55 GB - Linux (all ext3)
> 200 GB (FAT32)
> 160 GB (NTFS)
>
> This HD is used for installing both Windows XP & openSUSE 11.1 (x86).
> I suspect one or more partition (200 GB FAT & the 12 GB ext3) may have
> developed bad blocks (sectors). Is there any program that can be used
> off a Live CD to check for bad blocks for Linux (ext3) and Windows
> File Systems (when booting Windows, Checkdisk begins checking the 200
> GB partition and then hangs & re-boot is necessary to login to
> Windows).
>   
There is a utility that will check the surface of the disk, and repair 
it if possible. It is called SpinRite, http://www.grc.com/spinrite.htm. 
It does not check the file system, but repairs the data on the surface 
of the drive. It is non-destructive and re-writes data on your dive 
without loss (unless the sector is in very bad shape). I've used it many 
times with good success. It is not a free product, you have to pay for 
it. However, they have a money back guarantee, if you don't like it, 
they will refund your money. Runs on a boot CD.

Jim F

Re: opensuse - Linux Tool to check for bad blocks (ext3 & FAT32 File Systems) by Carlos E. R. on 2009-07-04T21:35:24+00:00
>> manufacturer. Format is irrelevant, and can be tested "live".
>
> And those tests can take considerably less time than a run through with
> badblocks. Only problem is it doesn't test the drive surface, but does
> tell you if the drive thinks it's failing.

It depends on the manufacturer and the date; seagates do.

- ---

Re: opensuse - Linux Tool to check for bad blocks (ext3 & FAT32 File Systems) by David Bolt on 2009-07-04T23:13:38+00:00
On Sat, 4 Jul 2009, Carlos E. R. wrote:-

>
>
>On Saturday, 2009-07-04 at 18:29 +0100, David Bolt wrote:
>
>...
>
>>> There are also the SMART tests, using smartctl, or the utility from the
>>> manufacturer. Format is irrelevant, and can be tested "live".
>>
>> And those tests can take considerably less time than a run through with
>> badblocks. Only problem is it doesn't test the drive surface, but does
>> tell you if the drive thinks it's failing.
>
>It depends on the manufacturer and the date; seagates do.

I think we may not be thinking about the same thing here. I was thinking
about the SMART tests when I said they don't do a surface scan. I know
the manufacturers utilities do because I've used a couple of them. The
last on a 200GB Maxtor that decided to die very nastily just outside its
warranty period. Even using the utility to reformat the drive didn't
help and, after it complained that the drive had failed, it was totally
disassembled and trashed.

As for what happened with that drive, after several system crashes I
looked into what was going on with it and found there were several
hundred sectors that had gone bad and weren't able to be re-mapped.
These bad sectors were smack bang in the middle of the swap partition,
and within 2GB of the start of the drive. As the system occasionally
used a large amount of swap, sometimes it would try reading/writing to
one of these bad sectors and would result in a crash. Sometimes it was
just the application that died, and sometimes it brought the system
down.


Regards,
        David Bolt


Re: opensuse - Linux Tool to check for bad blocks (ext3 & FAT32 File Systems) by Carlos E. R. on 2009-07-05T00:37:36+00:00
>>> And those tests can take considerably less time than a run through with
>>> badblocks. Only problem is it doesn't test the drive surface, but does
>>> tell you if the drive thinks it's failing.
>>
>> It depends on the manufacturer and the date; seagates do.
>
> I think we may not be thinking about the same thing here. I was thinking
> about the SMART tests when I said they don't do a surface scan.

Right. But, for example, the seagate drives I have bought since two or 
four years back do run a surface test as part of the smart tests done by 
the HD firmware. It is easy to notice because they take about two hours to 
test, and the system becomes highly unresponsive during that time (too 
busy). I only know it is a non destructive test, but I don't know if it is 
read only or read/write.

> I know
> the manufacturers utilities do because I've used a couple of them. The
> last on a 200GB Maxtor that decided to die very nastily just outside its
> warranty period. Even using the utility to reformat the drive didn't
> help and, after it complained that the drive had failed, it was totally
> disassembled and trashed.
>
> As for what happened with that drive, after several system crashes I
> looked into what was going on with it and found there were several
> hundred sectors that had gone bad and weren't able to be re-mapped.
> These bad sectors were smack bang in the middle of the swap partition,
> and within 2GB of the start of the drive. As the system occasionally
> used a large amount of swap, sometimes it would try reading/writing to
> one of these bad sectors and would result in a crash. Sometimes it was
> just the application that died, and sometimes it brought the system
> down.

Too bad.

- ---

Re: opensuse - Linux Tool to check for bad blocks (ext3 & FAT32 File Systems) by Jay Mistry on 2009-07-09T06:36:57+00:00
On Sat, Jul 4, 2009 at 2:15 PM, Carlos E. R.<robin.listas@telefonica.net> wrote:
> Jay

opensuse - Re: Linux Tool to check for bad blocks (ext3 & FAT32 File Systems) by Charles Philip Chan on 2009-07-09T07:17:17+00:00
Jay Mistry <jaylinux53@gmail.com> writes:

> Are there any tools (Linux programs run from Live CD's) available that
> will check for & -repair- (or re-allocate automatically) bad sectors ?

Not exactly. However, you can use the "-c" option in e2fsck for
ext2/3. This will invoke "badblocks" automatically and use the info to
mark the blocks that are bad.

For dosfsck, try the "-t" option.=20

Please read the manpages.

Charles

=2D-=20
The nice thing about Windows is - It does not just crash, it displays a
dialog box and lets you press 'OK' first.
(Arno Schaefer's .sig)
Loading


$ This page is proudly powered by www.pubbs.net, you can see more at opensuse archive | Partners: Global Manufacturers