Notices

Overclockers Forums > Software > Alternative Operating Systems
Alternative Operating Systems Linux, Mac, Unix Operating Systems and Applications
Forum Jump

HDD failing

Post Reply New Thread Subscribe Search this Thread
 
 
Thread Tools
Old 08-09-07, 02:58 AM Thread Starter   #1
Zerix01

 
Zerix01's Avatar 

Join Date: Mar 2007

 
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?
Zerix01 is offline   QUOTE Thanks
Old 08-09-07, 08:23 AM   #2
MRD
Senior Member

 
MRD's Avatar 

Join Date: Feb 2003
Location: CT

10 Year Badge
 
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).
MRD is offline   QUOTE Thanks
Old 08-09-07, 11:24 AM   #3
aaa
Member



Join Date: Jun 2006

 
Bad sectors means the drive's going out. Even if you map them there's a high chance of more popping up soon.
aaa is offline   QUOTE Thanks
Old 08-09-07, 02:26 PM   #4
MRD
Senior Member

 
MRD's Avatar 

Join Date: Feb 2003
Location: CT

10 Year Badge
 
Sometimes... not always. I've found drives with bad sectors where the rest of the drive stays fine for many years.
MRD is offline   QUOTE Thanks
Old 08-09-07, 02:38 PM   #5
ShadowPho
Member

 
ShadowPho's Avatar 

Join Date: Jun 2005
Location: I am in your stack, SUBbing your registers!

 
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

ShadowPho is offline Heatware Profile   QUOTE Thanks
Old 08-10-07, 02:26 AM Thread Starter   #6
Zerix01

 
Zerix01's Avatar 

Join Date: Mar 2007

 
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.
Zerix01 is offline   QUOTE Thanks
Old 08-10-07, 08:26 AM   #7
MRD
Senior Member

 
MRD's Avatar 

Join Date: Feb 2003
Location: CT

10 Year Badge
 
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.
MRD is offline   QUOTE Thanks
Old 08-10-07, 09:55 AM   #8
ShadowPho
Member

 
ShadowPho's Avatar 

Join Date: Jun 2005
Location: I am in your stack, SUBbing your registers!

 
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

ShadowPho is offline Heatware Profile   QUOTE Thanks
Old 08-12-07, 02:26 AM Thread Starter   #9
Zerix01

 
Zerix01's Avatar 

Join Date: Mar 2007

 
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.
Zerix01 is offline   QUOTE Thanks
Old 08-12-07, 02:28 AM Thread Starter   #10
Zerix01

 
Zerix01's Avatar 

Join Date: Mar 2007

 
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.
Zerix01 is offline   QUOTE Thanks
Old 08-12-07, 02:30 AM   #11
shirker
Member



Join Date: Jun 2007
Location: VA

 
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.
shirker is offline   QUOTE Thanks
Old 08-12-07, 10:28 AM   #12
MRD
Senior Member

 
MRD's Avatar 

Join Date: Feb 2003
Location: CT

10 Year Badge
 
Quote:
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.
MRD is offline   QUOTE Thanks
Old 08-12-07, 12:10 PM   #13
Misfit138

 
Misfit138's Avatar 

Join Date: Mar 2005
Location: Jersey

 
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.)

__________________
archlinux: Power in simplicity.
Amiga 1000 microATX mod

Last edited by Misfit138; 08-12-07 at 12:15 PM.
Misfit138 is offline   QUOTE Thanks
Old 08-12-07, 03:21 PM   #14
MRD
Senior Member

 
MRD's Avatar 

Join Date: Feb 2003
Location: CT

10 Year Badge
 
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.
MRD is offline   QUOTE Thanks
Old 08-12-07, 04:17 PM   #15
aaa
Member



Join Date: Jun 2006

 
Or the drive's so dead that it's not being detected... 'lots of device errors', anyone?
aaa is offline   QUOTE Thanks
Old 08-12-07, 04:31 PM   #16
Misfit138

 
Misfit138's Avatar 

Join Date: Mar 2005
Location: Jersey

 
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
Misfit138 is offline   QUOTE Thanks
Old 08-12-07, 05:14 PM   #17
MRD
Senior Member

 
MRD's Avatar 

Join Date: Feb 2003
Location: CT

10 Year Badge
 
Quote:
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.
MRD is offline   QUOTE Thanks
Old 08-27-07, 04:31 AM Thread Starter   #18
Zerix01

 
Zerix01's Avatar 

Join Date: Mar 2007

 
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.
Zerix01 is offline   QUOTE Thanks
Old 08-27-07, 05:56 PM   #19
ShadowPho
Member

 
ShadowPho's Avatar 

Join Date: Jun 2005
Location: I am in your stack, SUBbing your registers!

 
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

ShadowPho is offline Heatware Profile   QUOTE Thanks
Old 08-27-07, 06:42 PM   #20
aaa
Member



Join Date: Jun 2006

 
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.
aaa is offline   QUOTE Thanks

Post Reply New Thread Subscribe


Overclockers Forums > Software > Alternative Operating Systems
Alternative Operating Systems Linux, Mac, Unix Operating Systems and Applications
Forum Jump

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Mobile Skin
All times are GMT -5. The time now is 05:20 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
You can add these icons by updating your profile information to include your Heatware ID, Benching Profile ID or your Folding/SETI profile ID. Edit your profile!
X

Welcome to Overclockers.com

Create your username to jump into the discussion!

New members like you have made this the best community on the Internet since 1998!


(4 digit year)

Why Join Us?

  • Share experience
  • Max out your hardware
  • Best forum members anywhere
  • Customized forum experience

Already a member?