I just recently install fedora 11 and on boot it told me that my 120 gb hdd may be starting to go bad. So my question is is there a way that I can recover the sector with a low level format, I would really like to do this in linux. I have found some software that is not linux based but I would much rather be able to run it from a live disk. As i have another HDD i want to do the same to. thank you. If their is a command in the console that will do this please tell me Im not an expert with the command line yet
Check out the Parted Magic LiveCD to see if it might work for you.
It has some very good recovery tools on it such as testdisk and photorec.
Hope it all goes well.
Edit: oops, sorry... it looks like I might have misread the question. I was thinking you wanted to recover data from the sector.
You can zero out a hard drive, which should cause the controller to remap bad sectors. It will take a long time, and will require you to recreate the partition table of the drive and then format any partitions you want to use. Before you do this, you need to unmount any file systems on the drive, or simply boot into a recovery disc. Then, from the root command line:
Note that /dev/sdx is the device name for the hard drive that you want to zero out. Careful that you don't zero out another drive that you want to keep! Or, in technical terms, Caveat User! :-) Do read the dd man page. It will tell you how to get it to output progress information while it is running.
dd if=/dev/zero of=/dev/sdx
I'd be tempted to start at the OEM website and see if they have utility software to check/remap bad sector information or run other diagnostics on the hard drive. They are certainly best paced for this since they know the controller etc ... they may have something you can run from a floppy for example.
If your trying to recover data from the drive then I'd use PartedMagic as ozar indicated.
I've done that extensively. It used to be that drive manufacturers had special software/firmware to format and remap bad sectors, but that is all pretty much automatic these days. Even Seagate's Sea-Tools suite of diagnostic and disc formatting software only zeros out the drive when you ask to "reformat" it. In their documentation, it is clear that the controller will deal with bad-block remapping during this operation. I consult for Seagate's manufacturing software division and basically, using dd to zero out a drive is pretty much the same as what they do, which is nothing special, effectively.
Originally Posted by Jonathan183
Thanks for the info Rubberman :cool:
Originally Posted by Rubberman