LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 07-24-2013, 04:20 PM   #1
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 739

Rep: Reputation: 31
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.
 
Old 07-24-2013, 04:54 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,821

Rep: Reputation: Disabled
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.
 
Old 07-24-2013, 05:01 PM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 1,697

Rep: Reputation: 426Reputation: 426Reputation: 426Reputation: 426Reputation: 426
The problem may be XP:

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

which indicates a limit of 130GB for a partition.
 
Old 07-24-2013, 05:12 PM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,821

Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
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.
 
Old 07-24-2013, 08:05 PM   #5
jefro
Guru
 
Registered: Mar 2008
Posts: 10,246

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
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.
 
Old 07-25-2013, 02:29 AM   #6
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 739

Original Poster
Rep: Reputation: 31
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.
 
Old 07-25-2013, 03:18 AM   #7
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
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
 
Old 07-31-2013, 04:52 AM   #8
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 739

Original Poster
Rep: Reputation: 31
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?
 
Old 07-31-2013, 05:30 AM   #9
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
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.
 
Old 07-31-2013, 09:24 AM   #10
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 1,697

Rep: Reputation: 426Reputation: 426Reputation: 426Reputation: 426Reputation: 426
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).
 
Old 07-31-2013, 10:03 AM   #11
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 739

Original Poster
Rep: Reputation: 31
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.
 
Old 07-31-2013, 10:35 AM   #12
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
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.
 
Old 07-31-2013, 11:49 AM   #13
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 739

Original Poster
Rep: Reputation: 31
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Boot-up Diagnostics trickle Linux - General 6 12-07-2004 01:20 AM
k3b hangs when trying to burn dvd+rw disc but not cd rw disc laiboonh Slackware 0 11-06-2004 11:22 AM
Will converting my disc to dynamic disc in windows..... jasonmcneil0 Linux - General 2 03-15-2004 12:10 PM
Diagnostics for Hardware shooter Linux - General 2 05-24-2003 10:54 AM
Locating Disc 2,3,4,5 later after installing 1 Redhat disc lava Linux - General 1 03-22-2003 01:13 AM


All times are GMT -5. The time now is 02:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration