LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   how can i partition around a bad sector ? (http://www.linuxquestions.org/questions/linux-hardware-18/how-can-i-partition-around-a-bad-sector-388127/)

nephish 11-30-2005 10:23 PM

how can i partition around a bad sector ?
 
hey there,
i believe i have a problem with some bad sectors on my only installed hard disk
right now its formatted as hda1 / almost 40 gb
and hda2 /swap 250 mb

how could i find out what part of the disk is corrupt so i can format partitions around it and install linux on my computer ?

thanks

teddymills 12-01-2005 12:39 AM

Short answer is.... dont
 
The drive will quite likely failure with more bad sectors, or fail completely.
Just get another new drive.

J.W. 12-01-2005 01:32 AM

man badblocks

Also, most disk manufacturers offer diagnostics for their drives; you might want to check that out as well. Good luck with it. As a general comment, if the bad sectors are numerous, it's probably a good idea to just replace it. Like a favorite pair of Levis, you might try to patch things up once or twice, but at some point, you just need to face the fact that you need a new pair of pants

nephish 12-01-2005 08:03 AM

thanks, and rats !
guess i will bump over to newegg.

Diagmato 12-01-2005 10:36 AM

Why not simply do a zero write, or low level format? If its a maxtor drive, go to maxtors site and get the disc tools. Other manufacturers have versions for their hard drives.

nephish 12-01-2005 10:45 AM

ok, i dont know if its a maxtor drive but i can open the case and look. no problem.
is there a command line tool that will let me do a zero write ? the hard drive is only a year and a half old. will a zero write fix bad sectors ?
thanks, by the way.
not like replacing it would be too much, but 40 bucks is 40 bucks, right ?

finklewicz 12-01-2005 10:57 AM

I don't know if it's worth the $89, but SpinRite has quite a reputation for repairing damaged harddisks. May be worth giving a try.

nephish 12-01-2005 11:14 AM

probably a good idea, but not cost effective for me right now. i have all the data backed up. (thankfully) and right now its even operating, even though there is a 500 meg partition that i set up that i am not using right now. no big deal, but if i can fix it, i would like to.

thanks

Diagmato 12-01-2005 12:44 PM

the tools provided by manufacturers for performing low level formats are free.

When you do a low level format, you are completely re-writing the low level of the drive. This is replacing the level written by the factory, which is why it must be the tool from the manufacturer.

On the top of the hard drive, it will say the make/model of the drive.

Linuxquestions has a tutorial on zero writing Here. It is probably worth doing a zero write before a low level format (the latter takes a seriously long time - 40GB would probably take overnight and half a day). Zero write writes every single bit on the hard drive to a 0, so there would be absolutely nothing on the drive.

nephish 12-01-2005 01:19 PM

looked at the tutorial, and it looks like what i am going to do first. i doubt that i will do the low level format. at all. just the zero write and see what i come up with. thanks

nephish 12-01-2005 01:48 PM

ok another quick question.
whatever is wrong with the hard drive stays wrong with it after i reformat with ext3.
i tried this with the ubuntu install disk to just have it reformat and install and it failed.
but after i created the "bad partition" and used a different part of the drive to mount as / ,
it worked.

is a bad block or bad sector a physical problem on the drive or is it something that the zero might can fix ?

thanks

Diagmato 12-01-2005 02:41 PM

a zero write will return all bits on the drive to 0 - a normal format would just overwrite them. As it doesnt effect all bits, it most probably wont write over the bad sector.

Where that tutorial doesnt recommend low level format (which is true) its not caused problems here. Done it twice to one disc, before i heard of zero write. If there is a bad sector, and nothing else will fix it, then it wouldnt be much to lose to try it.

nephish 12-01-2005 03:13 PM

solid advice, i will do the zero when i get home, and if it doesn't work, go ahead and do the low level.
maybe i will learn something. (rather fix the drive though)

thanks again

nephish 12-02-2005 08:45 AM

hey gents,

did the zero fill last night and it seems to have worked. i was able to install ubuntu and run some programs this morning ( couldnt do that before) so looks as if everything is going to be ok.

thanks for your help !


All times are GMT -5. The time now is 08:15 PM.