Page 1 of 2 1 2 LastLast
Results 1 to 20 of 21

Thread: HDD failing

  1. #1
    Zerix01's Avatar
    Join Date
    Mar 2007
    Posts
    1,459

    HDD failing

    I am fixing my fathers computer. I was getting sick of dealing with Windows and the crapware my step sister was getting on it so I installed Kubuntu 7.04 on it, a week later I get a call saying the computer is not booting. When I turn it on it just hangs at loading Grub. I also remember when installing Kubuntu the installer hung while formating the drive the first time but completed fine after the second time.

    This is feeling like a failing hard drive to me. I booted the computer from the Kubuntu Live cd and ran

    dd if=/dev/zero of=/dev/sda
    (Warning to those that don't know, this wipes out everything on the drive)

    to write all zeros to the disk and basically check for bad sectors. It stopped at 6.4MB's with an input/output error. To me this confirms my initial thoughts, but I'm going to put the drive in my computer and enable SMART and try dd again and what ever else I can think of.

    Does anyone have any other Linux based methods of checking for hard drive failure?

  2. #2
    Senior Member MRD's Avatar
    Join Date
    Feb 2003
    Location
    CT
    Posts
    7,023
    fsck is what you should use. There are options in it (see man fsck) to do full surface scans, mark bad sectors, etc. You probably need a filesystem first... not sure... but if so, that's easy enough (mke2fs /dev/sda will format it with an ext2 filesystem, mke2fs -j /dev/sda will format it with an ext 3).

  3. #3
    Member
    Join Date
    Jun 2006
    Posts
    296
    Bad sectors means the drive's going out. Even if you map them there's a high chance of more popping up soon.

  4. #4
    Senior Member MRD's Avatar
    Join Date
    Feb 2003
    Location
    CT
    Posts
    7,023
    Sometimes... not always. I've found drives with bad sectors where the rest of the drive stays fine for many years.

  5. #5
    Member ShadowPho's Avatar
    Join Date
    Jun 2005
    Location
    I am in your stack, SUBbing your registers!
    Posts
    2,548
    This is like the fifth time I see people posting about HDD trouble without posting the SMART parameters. SMART WILL tell you if your HDD is semi good or horrible. It is the THING you check when your HDD does bad stuff.

    Use mhdd(low system HDD access), get the SMART log, check it up there.
    "Take only that which you can give"
    Need Help? IM me! I want to help the OC community!

    MainComputer:
    E6400@2.69-4.0 gig RAM-8800GT
    ASUS P5N-E SLI


  6. #6
    Zerix01's Avatar
    Join Date
    Mar 2007
    Posts
    1,459
    I haven't had a whole lot of time to work on this issue (car issues trump computer issues). I did get the drive into my computer but I can't seem to access it in any way. I have smartmontools installed but it does not see the drive. I tried fdisk and it tells me no such device. This is the first time I've had an SATA drive connected to this computer, but the BIOS does see the drive and gave me a brand and a model and when I check KDE's version of a device manager (I'm at work and forgot what it is called, K something, ha) it shows me the drive connected on my SATA 3 port (which it is). But software wise I can't seem to see it, even in the dev folder I don't see sdc or any sd devices. Also Kubuntu took a long time to start after connecting that drive, I later booted the system without the splash screen on and I saw lots of device errors related to that drive. Even when I got to the command prompt they were still scrolling across the screen, this made it very hard to type commands .

    So you see I'm trying to get SMART status but I can't. I guess I should have tried that before dd'ing the drive, but the drive being blank should not be causing these issues.

  7. #7
    Senior Member MRD's Avatar
    Join Date
    Feb 2003
    Location
    CT
    Posts
    7,023
    This likely means that you don't have a driver for your SATA adapter built into the kernel. You need to rebuild the kernel, or try a livecd that might already have a kernel with support for it.

  8. #8
    Member ShadowPho's Avatar
    Join Date
    Jun 2005
    Location
    I am in your stack, SUBbing your registers!
    Posts
    2,548
    Quote Originally Posted by Zerix01
    I haven't had a whole lot of time to work on this issue (car issues trump computer issues). I did get the drive into my computer but I can't seem to access it in any way. I have smartmontools installed but it does not see the drive. I tried fdisk and it tells me no such device. This is the first time I've had an SATA drive connected to this computer, but the BIOS does see the drive and gave me a brand and a model and when I check KDE's version of a device manager (I'm at work and forgot what it is called, K something, ha) it shows me the drive connected on my SATA 3 port (which it is). But software wise I can't seem to see it, even in the dev folder I don't see sdc or any sd devices. Also Kubuntu took a long time to start after connecting that drive, I later booted the system without the splash screen on and I saw lots of device errors related to that drive. Even when I got to the command prompt they were still scrolling across the screen, this made it very hard to type commands .

    So you see I'm trying to get SMART status but I can't. I guess I should have tried that before dd'ing the drive, but the drive being blank should not be causing these issues.

    Grab a floppy, grab a copy of mhdd and then boot into mhdd. If your BIOS can see the HDD, that means that mhdd will have absolutely no problem seeing it.
    So far the only time when mhdd failed me was when the HDD was totally dead.
    "Take only that which you can give"
    Need Help? IM me! I want to help the OC community!

    MainComputer:
    E6400@2.69-4.0 gig RAM-8800GT
    ASUS P5N-E SLI


  9. #9
    Zerix01's Avatar
    Join Date
    Mar 2007
    Posts
    1,459
    Quote Originally Posted by MRD
    This likely means that you don't have a driver for your SATA adapter built into the kernel. You need to rebuild the kernel, or try a livecd that might already have a kernel with support for it.
    I'll look into that but last I knew the Nvidia 590 chipset has full support.

  10. #10
    Zerix01's Avatar
    Join Date
    Mar 2007
    Posts
    1,459
    Quote Originally Posted by ShadowPho
    Grab a floppy, grab a copy of mhdd and then boot into mhdd. If your BIOS can see the HDD, that means that mhdd will have absolutely no problem seeing it.
    So far the only time when mhdd failed me was when the HDD was totally dead.
    Thanks I'll try that out when I get more time for this.

  11. #11
    Member
    Join Date
    Jun 2007
    Location
    VA
    Posts
    1,151
    Quote Originally Posted by Zerix01
    Thanks I'll try that out when I get more time for this.
    also, see ShadowPho's guide on using mhdd here: http://www.ocforums.com/showthread.php?t=522847
    Cavaliers '13
    heatware.

  12. #12
    Senior Member MRD's Avatar
    Join Date
    Feb 2003
    Location
    CT
    Posts
    7,023
    I'll look into that but last I knew the Nvidia 590 chipset has full support.
    Just because the kernel supports it doesn't mean it is built into the kernel. That just depends how the individual that built that particular kernel configured it. For example, my kernel that I am running on this computer only supports my hardware, nothing else, as I turned off all the other options before I compiled it. It's kernel 2.6.20, so obviously it supports a lot more hardware, but this particular kernel hasn't been configured to do so.

    Check your kernel config and see if your SATA adapter is built in. It should be built in and not modular (it can't reach the disk to load the module if it can't access the drive... so SATA adapters must be built in). If it's not, just select it (not as a module) and rebuild the kernel and copy it to your boot directory, and it should work.

    I'm alsmost certain this is the problem. If bios recognizes the drive, even if it's totally dead otherwise, Linux should too if the driver is built into the kernel.

  13. #13
    Misfit138's Avatar
    Join Date
    Mar 2005
    Location
    Jersey
    Posts
    1,399
    Kubuntu definitely has support for SATA and uses an initramfs/initrd to get past the chicken and egg problem of not having support for every single filesystem type or HD interface built directly into the kernel. (SATA, SCSI or RAID). Because the drivers for these are on the filesystem, the OS can't boot without the drivers, since the filesystem can't be reached...so it boots into the initrd/initramfs wherein all needed drivers to boot the system are loaded, and then continues with normal boot events thereafter.
    Almost all distros work this way, if you do not compile your own, and just use the stock kernel. Gentoo obviously does not need an initramfs, since you build your own during the install anyways. EDIT: (Although I guess genkernel would require an initramfs.)
    Last edited by Misfit138; 08-12-07 at 12:15 PM.
    archlinux: Power in simplicity.
    Amiga 1000 microATX mod

  14. #14
    Senior Member MRD's Avatar
    Join Date
    Feb 2003
    Location
    CT
    Posts
    7,023
    Genkernel does, yes.

    It isn't a question of supporting SATA. It's a question of whether support for that particular SATA controller is present. It may not be, even with an initrd. The problem just sounds so much like an SATA driver issue.

  15. #15
    Member
    Join Date
    Jun 2006
    Posts
    296
    Or the drive's so dead that it's not being detected... 'lots of device errors', anyone?

  16. #16
    Misfit138's Avatar
    Join Date
    Mar 2005
    Location
    Jersey
    Posts
    1,399
    Quote Originally Posted by MRD
    Genkernel does, yes.

    It isn't a question of supporting SATA. It's a question of whether support for that particular SATA controller is present. It may not be, even with an initrd. The problem just sounds so much like an SATA driver issue.
    I see.
    Well, with the 590 chipset, his kernel should need the "sata_nv" module, unless there is a different controller onboard... I don't use Kubuntu, but I would almost guarantee it is in there, since it's such a popular module.
    archlinux: Power in simplicity.
    Amiga 1000 microATX mod

  17. #17
    Senior Member MRD's Avatar
    Join Date
    Feb 2003
    Location
    CT
    Posts
    7,023
    Or the drive's so dead that it's not being detected... 'lots of device errors', anyone?
    In that case, the bios almost certainly wouldn't recognize it, but the bios does see it.

    The other possibility is that it's not loading the correct module because it's not correctly figuring out which to load... so you might have to build it in.

  18. #18
    Zerix01's Avatar
    Join Date
    Mar 2007
    Posts
    1,459
    I just wanted to follow up on this. SATA support was no issue in my kernel btw.

    The drive was very much dead, I think the head was going. I ran many tests on it with mhdd (thank you) and basically I could not run one test (forgot what it was), the surface scan test displayed mostly red X's, and the erase disk function took a very long time. The reason I think the head was failing was while I was doing the surface scan, I used the arrow keys to jump a few hundred blocks ahead. When it started to read the new set of blocks the only errors I got were a delay in reading the blocks then after a minute they would all be red X's again. This happend no matter where I skipped to. After I got my replacement I ran all the same tests on the new drive with no issues.

    Also a bit of a warning to people about mhdd, read up on what each feature does, it seems like many of the 'tests' will destroy the data on the drive without much warning ahead of time. Luckily for me the drive was blank so I just randomly tried everything on it.

  19. #19
    Member ShadowPho's Avatar
    Join Date
    Jun 2005
    Location
    I am in your stack, SUBbing your registers!
    Posts
    2,548
    Quote Originally Posted by Zerix01 View Post
    I just wanted to follow up on this. SATA support was no issue in my kernel btw.

    The drive was very much dead, I think the head was going. I ran many tests on it with mhdd (thank you) and basically I could not run one test (forgot what it was), the surface scan test displayed mostly red X's, and the erase disk function took a very long time. The reason I think the head was failing was while I was doing the surface scan, I used the arrow keys to jump a few hundred blocks ahead. When it started to read the new set of blocks the only errors I got were a delay in reading the blocks then after a minute they would all be red X's again. This happend no matter where I skipped to. After I got my replacement I ran all the same tests on the new drive with no issues.

    Also a bit of a warning to people about mhdd, read up on what each feature does, it seems like many of the 'tests' will destroy the data on the drive without much warning ahead of time. Luckily for me the drive was blank so I just randomly tried everything on it.
    I believe that Xs are UNC (uncorrectable data error). If my memory doesn't change me, it is when the HDD tries doing a sector and is unable to do so even after a few retries.

    Also, check for cache on the hard drive.

    And thank you for the "destroy the data" warning. I placed "backing up the data" as step 0 now.
    "Take only that which you can give"
    Need Help? IM me! I want to help the OC community!

    MainComputer:
    E6400@2.69-4.0 gig RAM-8800GT
    ASUS P5N-E SLI


  20. #20
    Member
    Join Date
    Jun 2006
    Posts
    296
    Quote Originally Posted by ShadowPho View Post
    I believe that Xs are UNC (uncorrectable data error). If my memory doesn't change me, it is when the HDD tries doing a sector and is unable to do so even after a few retries.

    Also, check for cache on the hard drive.

    And thank you for the "destroy the data" warning. I placed "backing up the data" as step 0 now.
    Definitely. I've seen an fsck push a dying disk over the edge. Slightest hint of bad = backup ASAP.

Page 1 of 2 1 2 LastLast

Posting Permissions

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