Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fixing bad sectors on a Linux drive 1

Status
Not open for further replies.

monkeysolder

Electrical
Dec 19, 2005
77
I have a question about a Linux (EXT3) drive that we are using in a 3rd party embedded application, concerning how the 'bad sector' table is stored.

1) I remove the HD from the embedded Linux hardware, remove the Linux partition, run chkdsk and repair bad sectors. I do this because I have no way of checking or repairing bad sectors in the embedded OS.

2) When I reinstall the HDD into the embedded OS hardware and it reformats (quick-type) to ext3, is the bad sector table "lost"? I.e., is that 'bad sector' table somehow preserved even after the HDD format?

I am not familiar with this topic, so apologies for any confusing descriptions.

Thanks,

 
Replies continue below

Recommended for you

So far as I know, DOS does not use a special table to mark bad sectors. It uses a special entry in its FAT; for 16 bit FATs, hex FFF7 says the associated cluster contains at least one bad sector. Erase the FAT, and you don't know where the bad sectors are.

Perhaps you need to implement a slow Linux format, or reformat the drives slowly on a Linux box.









Mike Halloran
Pembroke Pines, FL, USA
 
Hiya-

During the "typical" linux installation you can check for
bad sectors during the format of the drive. I assume
that if you do the following:

I use Red Hat. YMMV. But I *DO* know that you have the
option for checking for bad sectors during the format
phase.

1. Try a "fresh" install of the linux with the typical
partitions. Doing it this way, you should be able
to do the bad sector checking by checking the prompting.
Partition the drive as you wish it to be for the
target system.

2. Mount the drive as a second drive (i.e. /dev/hdb with
the appropriate jumpers set for secondary drive, etc.)

3. Erase all of the files on the freshly formatted/
installed drive.

This should leave you an ext3 filesystem format without
any data on it. You can then transfer the oem software
to this "empty" drive. Don't forget to load the boot
image on it!

4. Rejumper the "new" HD and install in the target system.

I'm *SURE* that there is a way to easily format the
HD drive, however, I can't give you a high degree of
certianty on HOW. I usually find that sparing out the
bad sectors during installation is sufficient for my
needs. Sorry this is a kludgy way of doing it, but it's
got a high degree of success.

Best of luck!

Cheers,

Rich S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor