Find the answer to your Linux question:
Results 1 to 10 of 10
Like Tree2Likes
  • 2 Post By Rubberman
Sir I am having a segate harddisk of size 250GB which is old and contains many bad sectors. I want to use this disk as secondary storage in Linux. Currently ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! rupeshforu3's Avatar
    Join Date
    Dec 2012
    Location
    India
    Posts
    62

    how to partition a harddisk containing bad sectors.


    Sir I am having a segate harddisk of size 250GB which is old and contains many bad sectors. I want to use this disk as secondary storage in Linux. Currently I have installed OpenSuse 13.1 on another harddisk.

    Can you please suggest how to Format the damaged disk and use the disk efficiently without any errors in the future.



    Regards,
    Rupesh.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,591
    Create a partition on it. Create a file system on the partition, and then run "fsck -c -f" on the file system. It will read the partition and map out the bad blocks from use. You only have a problem if the system has a bad block in block 0 (the partition table), in which case the disc is fubar unless it has a SMART controller, in which case, it can be remapped to a good sector.
    sidzen and Lakshmipathi like this.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    943
    Depends on at what level are the partitions bad, there are two. Most bad partitions are high level and wiping out the partitions and repartitioning and reformating the drive should map out any bad partitions. Sometime the bad partitions are lower at the platter level this was more commom with old MFM drives and you most controllers you could do low level format and remap the platters. These days that is rarely needed, but most hard drive makers to have tools to do a low-level format. If that is what you think you need then Google around for a low-level format tool for your drive.

  4. #4
    Just Joined! rupeshforu3's Avatar
    Join Date
    Dec 2012
    Location
    India
    Posts
    62
    The disk is not much damaged.
    It is IDE drive.
    Is there any tool or software in Linux to achieve the above.

  5. #5
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    943
    Quote Originally Posted by rupeshforu3 View Post
    The disk is not much damaged.
    It is IDE drive.
    Is there any tool or software in Linux to achieve the above.
    Gparted can do all the high level partitioning.

    GParted -- A free application for graphically managing disk device partitions

  6. #6
    Just Joined! rupeshforu3's Avatar
    Join Date
    Dec 2012
    Location
    India
    Posts
    62
    Any further help please.

  7. #7
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    Have you tried the commands suggested by Rubberman. I don't think any reason - why that shouldn't work. Just attach the external hard-drive - Find the partition name and then run ""fsck -c -f /device/name" . That should fix any bad-blocks

    HTH
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  8. #8
    Just Joined! rupeshforu3's Avatar
    Join Date
    Dec 2012
    Location
    India
    Posts
    62
    Sorry I have not seen his post and actually I am seeking his help because his answers are most helpful. Is the tip suggested by rubberman is sufficient why I am questioning because many people suggested to throw it into dustbin.

  9. #9
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    Quote Originally Posted by rupeshforu3 View Post
    Sorry I have not seen his post and actually I am seeking his help because his answers are most helpful. Is the tip suggested by rubberman is sufficient why I am questioning because many people suggested to throw it into dustbin.
    Give it a try and then see whether its work or not. If you are lucky - It should be more than enough
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  10. #10
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    943
    What is confusing to me about this thread is really where is the problem the filesystem or the physical hard drive? I read the OP's first post and it sounds like a old hard drive that is developing bad blocks. But most are talking about fsck but that is filesystem check. That's why I was thinking if drive isn't being used repartition it to get something to check the hard drive blocks then reformat the drive which will get the filesystem to map out bad blocks. Another approach there is a Linux tool called badblocks that can be run and output can be redirected to a file, then that file can be given to fsck so the filesystem will map out the bad blocks.

    To me it all depends on if issue is hard drive or filesystem that determines how low to go to start fixing the issue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •