LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Disc Diagnostics (https://www.linuxquestions.org/questions/linux-hardware-18/disc-diagnostics-4175470804/)

davcefai 07-24-2013 04:20 PM

Disc Diagnostics
 
I am playing with a WD 500GB drive which I replaced on my daughter's PC. The drive seemed to be misbehaving.

I cannot get it to work under Windows XP but I was able to recover ALL the data by booting the PC with Knoppix.

Since then I have found that I cannot make the drive work under Xp but it seems happy under Linux (Debian Unstable). I have created 4 partitions on this disc, formatted them to ext3 and run e2fsck on all of them - they passed. Under XP I could not even complete a format - the PC hung.

Does anybody know whether WD's dlgdiag5.exe, running in FreeDOS, will read an ext3 formatted disc? When I tried Quick Diagnostics the machine hung. I can reformat and try but maybe somebody can answer the question (in which case I can spend more time on my grandson's toy chest :-) )

Thanks in advance.

Ser Olmy 07-24-2013 04:54 PM

dlgdiag5 doesn't really care about the file system, as it reads and writes raw blocks. However, as you say the bootable ISO uses FreeDOS, and it's entirely possible that FreeDOS could choke on an unknown file system or partition table.

If the drive cannot be formatted in XP, there could very well be something physically wrong with it. You should look at the S.M.A.R.T. parameters with smartctl. Specifically, the Reallocated_Sector_Ct and Current_Pending_Sector values should tell you if the drive is developing bad sectors. Try:
Code:

smartctl -a /dev/sda | grep _Sector
or just
Code:

smartctl -a /dev/sda | less
to see all S.M.A.R.T. information about the drive.

You could also do a non-destructive surface test with badblocks. The following command will perform a non-destructive write test of of /dev/sda and display a progress indicator:
Code:

badblocks -o /dev/null -ns /dev/sda
Do not run badblocks on a disk containing a mounted file system. Use a Live CD.

jpollard 07-24-2013 05:01 PM

The problem may be XP:

http://www.tomshardware.com/forum/26...isk-size-limit

which indicates a limit of 130GB for a partition.

Ser Olmy 07-24-2013 05:12 PM

Quote:

Originally Posted by jpollard (Post 4996174)
The problem may be XP:

http://www.tomshardware.com/forum/26...isk-size-limit

which indicates a limit of 130GB for a partition.

FWIW, I've done lots of XP installations to 250 Gb and 320 Gb drives with a single partition without issues. I used source media with SP3, though.

I can find no TechNet reference to a 130 Gb partition size limit for Windows XP. There was a 32 Gb BIOS limit ages ago, and a 137 Gb EIDE/ATA limit for older OSes lacking 48-bit LBA support, but 130 Gb?

Actually, I'm pretty sure I've installed Windows 2000 to partitions larger than 130 Gb.

jefro 07-24-2013 08:05 PM

No matter what, we may need to know the exact service pack and motherboard to decide more. What hard drive did it have? Where did you get the xp from? Is it an OEM disk that may not have all the drivers?


As noted you'd have to use a slipstreamed cd of xp for any chance of success.

I think the 130 and 137 are the same issue.

Many hard drives have a jumper to limit chs to use the disk.


Usually dos diags do work in freedos. One can get the ultimate boot cd that has generic tools on it. One can also see if there is a bootable disk image at WD. The IBM/hitachi diags ought to work.

davcefai 07-25-2013 02:29 AM

Thanks to all for very informative replies. Some background:

The OS was XP SP3, the disc was partitioned into 2 x 250GB partitions and the PC worked well for 3 years.

Eldest daughter told me that the USB keyboard had failed. I lent her a PS/2 keyboard. This worked for a short while and then the PC would not boot at all. Did the keyboard trigger the failure? Who can tell?

The overriding priority was data recovery and i was able to do this by booting with Knoppix and copying files to an external 1TB HDD. I then installed a new HDD and reinstalled XP and a few essential programs. We also threw away the old keyboard to avoid any possible recurrence of the disaster.

I am now playing with the old disc as I would like to work out whether it failed or not. Windows says did, Linux says didn't!

Smart ctl did not print anything alarming. When I ran it with -q errorsonly it exited silently.

I will be running badblocks later on and will come back here.

Thanks all.

H_TeXMeX_H 07-25-2013 03:18 AM

Run a SMART long test on the disk, wait for it to finish

Code:

smartctl -t long /dev/sda
then post the results

Code:

smartctl -a /dev/sda

davcefai 07-31-2013 04:52 AM

Apologies for taking so long to come back but the tests take a whole day to run and life also got in the way:(.

The disc is partitioned into 4, 2x100GB and 2x150GB

Badblocks listed 13 bad blocks on partition1.

It then listed 880 bad blocks on partition2.

I ran
Code:

e2fsck -c -c -k -v -C 0 /dev/sdg2
on partition 2 and it reported
Quote:

/dev/sdg2: ***** FILE SYSTEM WAS MODIFIED *****

11 inodes used (0.00%, out of 6225920)
0 non-contiguous files (0.0%)
0 non-contiguous directories (0.0%)
# of inodes with ind/dind/tind blocks: 0/0/0
406254 blocks used (1.63%, out of 24903680)
232 bad blocks
1 large file

0 regular files
2 directories
0 character device files
0 block device files
0 fifos
0 links
0 symbolic links (0 fast symbolic links)
0 sockets
but when I ran just badblocks again I got 880 bad blocks. Does e2fsck use different standards?

Badblocks on partition 3 listed over 1500 bad blocks.

Am I correct in saying that this disc has too many problems to make it worth investigating further?

H_TeXMeX_H 07-31-2013 05:30 AM

Bad blocks are an indicator of hard drive failure some time in the near future, so I recommend you replace the HDD. The SMART long test also checks for bad blocks, but as there are already some, there's no need for it.

jpollard 07-31-2013 09:24 AM

Stop using the disk immediately.

The fact that more and more bad blocks are showing up indicates that it is a progressive failure (like a head crash), and the more you use it the more that new failures will be created.

Get a replacement - then you can make ONE pass to copy the data (and likely after that you will not be able to read the disk).

davcefai 07-31-2013 10:03 AM

The disc is not being used, except for experimental purposes.

As I posted earlier I was able to recover all the data off it using Knoppix when Windows wouldn't even boot from it.

Since then I have NOT been able to repartition and reformat it under Windows but was able to build an ext3 filesystem on it which passes a "simple" e2fsck although e2fsck -c -c -k -v -C 0 /dev/sdg2 reports badblocks but fewer than badbloaks run on its own.

This disc is going into a queue for the recovery of its magnets (useful in the workshop) and the platters (my wife plans some craftwork using disc platters).

It is not the first time that Knoppix was able to recover just about anything on a disc when Windows choked on it.

Thanks for all the advice.

H_TeXMeX_H 07-31-2013 10:35 AM

Disk platters make great mirrors, and are much more durable than glass mirrors. Useful in survival situations if you have to signal a plane or helicopter, but only if there is sun.

davcefai 07-31-2013 11:49 AM

Where I live, sun isn't a problem - actually it can be, on the excessive side!

One must always carry a torx driver, to dismantle a hard drive if this becomes necessary:)


All times are GMT -5. The time now is 12:52 AM.