Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Hardware Support _ IDE Drive recognition

Posted by: pavon Jun 29 2008, 04:38 AM

I am in the process of wiping some old IDE drives before taking them to be recycled/disposed, using the `shred /dev/sda' command. Right after I started one of them I had a power outage (caused by clumsy foot). Now my BIOS won't auto-recognize the drive (presumably because the drive info has been overwritten). When I manually specify the drive geometry in the BIOS it gives me a "Harddisk Diagnostic Failure". In both cases Linux does not detect the drive. I've also tried specifying the drive geometry in the boot options (sda=790,15,57) with no luck (is this even used anymore in 2.6?). I'm using C,H,S values penned onto the drive - not sure if they are what was actually being auto-detected before, but the total size is correct.

I'd really like to finish wiping this drive before I get rid of it. Any ideas on how I can force linux to see the drive, or how to get the BIOS to accept it?

In case it is usefull, the system I am using to do this is an AMD K6-2 with an AWARD BIOS, booting the (normal 32 bit linux rescuecd, not one of the other boot images).

Posted by: michaelk Jun 29 2008, 11:27 AM

Even though you probably deleted the partition table the BIOS should still be able to recognize the drive via the automatic setting AFAIK.
The drive settings are saved in nonvolatile memory on the drive. The abrupt power removal could of damaged the drive.

The only other problem I see would be if the drive capacity was > then the BIOS size limitation i.e. 8GB, 32GB, 127GB etc and the translation software
is in the MBR which is not erased. I would not expect a hardware drive error but it has been a long to since I have messed with this.

If this is really the case then shred the partition and not the entire drive ie. sda1 vs sda.

Posted by: pavon Jun 29 2008, 03:22 PM

Thanks for the reply michael. None of these drives are over the limit - they are all under 1GB.

That was strange - I set the BIOS drive type to None (rather than Auto or User) and linux was able to recognize the drive. In fact after rebooting, and setting the BIOS back to Auto, it was able to as well. So that drive is taken care of.

I have run into another problem though. I've gotten all but two drives wiped. The remaining two are both Maxtors vintage 1993. Both are autodetected by the BIOS, with the geometry matching what is written on the drive. However, linux is autodetecting the wrong size for both of them. One is 345 MB (330MiB) and Linux is detecting it as 674 GiB, the other is 245MB (234MiB) and linux is detecting it as 700 GiB (as reported by fdisk, and /sys/bus/sda/size agrees). Providing the correct geometry as a boot parameter doesn't seem have any effect (oh, and I found out that the is still `hda=c,h,s' even though the drive will show up as /dev/sda). I am able to view their partition tables in fdisk, and one of them I was able to mount (the other had a read error).

I tried doing a `shred /dev/sda' anyway, and got a write error after only a few MB. I probably should have just shred the partition, since it looks to be the right size. Well too late for that. Any idea on how to force the correct size for a drive, or why linux would be misinterpeting the size reported for these particular drives? I know at least one of them was originally used in a linux box just fine, but that was many kernel releases ago :)

Posted by: michaelk Jun 29 2008, 08:41 PM

The size differences might just be due to how the drive manufactures lists the sizes i.e. 1000 vs 1024. You do not need to change anything since linux will use the
real numbers.

The latest 2.6 kernels use libata which assigns all drives including IDEs a sdx device id.

Posted by: pavon Jul 1 2008, 12:17 AM

QUOTE (michaelk @ Jun 29 2008, 06:41 PM) *
The size differences might just be due to how the drive manufactures lists the sizes i.e. 1000 vs 1024. You do not need to change anything since linux will use the
real numbers.

I don't think this is a KB vs KiB issue as it is detecting my 330 MiB drive as being 674 GiB :)

Posted by: michaelk Jul 1 2008, 11:11 AM

Oh I C. However, not sure why the mismatch.

Powered by Invision Power Board (
© Invision Power Services (