DaemonForums  

Go Back   DaemonForums > Miscellaneous > General Hardware

General Hardware General hardware related questions.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 20th December 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Thanked 8 Times in 8 Posts
Default Did I fry my hard drive?

Hello,

On my Lenovo T61, I accidentally left it on during my trip home the other day from the office -- which has a bunch of speed bumps and potholes. It seemed unscathed, but a little later it started to give me errors on boot and halting -- a reboot would fix it. Now, it refuses to ever boot, it always gives me the boot error.

System:
Lenovo T61
128GB 7200 RPM Hard Drive (looking at the basic dmesg output, I'm guessing a Seagate)
NetBSD 4.0.1

I only have 80 GB actually being used in the partition scheme (1 partition):
Code:
  512 MB /
 4096 MB swap
 4096 MB /tmp
44544 MB /usr
 4096 MB /var
24576 MB /home

here is the error message:

Code:
wd0 at atabus1 drive 0: <ST506>
wd0: 69632 KB, 1024 cyl, 8 head, 17 sec, 512 bytes/sect x 139264 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
wd0: mbr partition exceeds disk size
wd0: mbr partition exceeds disk size
wd0: mbr partition exceeds disk size
wd0: mbr partition exceeds disk size
boot device: <unknown>
root device:
Here it is halted and awaits a command. If I try to use wd0a, I get:

Code:
root device: wd0a
dump device (default wd0b): wd0b
file system (default generic): generic
root on wd0a dumps on wd0b
wd0: mbr partition exceeds disk size
no file system for wd0 (dev 0x0)
cannot mount root, error = 79
root device (default wd0a):
Here again it halts and waits. If I select ffs for the file system (which is how the installer configured it), I get:

Code:
root device (default wd0a):
dump device (default wd0b): wd0b
file system (default generic): generic
root on wd0a dumps on wd0b
wd0: mbr partition exceeds disk size
cannot mount root, error = 22
root device (default wd0a):

I also noticed that this only seems to happen when dhclient is enabled and the cable plugged in -- but that could be a freakish coincidence. This has only started to happen in the past two days since I drove home with the laptop on. Any ideas?
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote
  #2   (View Single Post)  
Old 20th December 2008
DrJ DrJ is offline
ISO Quartermaster
 
Join Date: Apr 2008
Location: Gold Country, CA
Posts: 506
Thanked 39 Times in 39 Posts
Default

I'd first check the hardware, since hard drives used in laptops are quite fragile and don't last particularly long (even with good care). I'd suggest one of two ways: boot from a live CD and check whether you can read data from it, or move it to a desktop for more thorough checking. For the latter you can use something like smartmontools; it is not perfect, but can give you a good idea if the disk is functional.

In either case, see if dmesg picks it up, mount it, and see if you can read data from it. If you can, you probably have picked up a bad sector, If not, your drive is probably toast.

You can relocate bad sectors by using "dd" to write some character to the entire drive. That wipes out the entire drive, and you then have to format and reinstall everything. But if you can read from the drive you can pull off the important stuff first. I'd still replace the drive -- they are relatively inexpensive, and losing a drive unexpectedly is really a pain.

If you can't read from it at all, I hope you have a recent backup and the money for a new drive.

Note: I am not a NetBSD user, so I won't offer software advice. But this sure sounds like a bad sector to me, and if you can, I'd replace the drive.
Reply With Quote
  #3   (View Single Post)  
Old 20th December 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,070
Thanked 198 Times in 156 Posts
Default

Quote:
I'd first check the hardware, since hard drives used in laptops are quite fragile and don't last particularly long (even with good care). I'd suggest one of two ways: boot from a live CD and check whether you can read data from it, or move it to a desktop for more thorough checking. For the latter you can use something like smartmontools; it is not perfect, but can give you a good idea if the disk is functional.
This method is far from reliably, and provides little information.

You should use a program such as MHDD to test your hard drive.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #4   (View Single Post)  
Old 20th December 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Thanked 8 Times in 8 Posts
Default

Thanks. It seems to be playing nice right now. I don't know what to make of it because it is not consistent.

If it is the hard drive, I should be able to get a new one free as this laptop should still be under warranty. I can't afford a new one (or anything) until after the New Year. If I had to get a new hard drive, I would be inclined to get a SSD (which I'm hearing more and more good things about).

I downloaded that MHDD and will give it a go and see if it tells me anything.
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote
  #5   (View Single Post)  
Old 20th December 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

I don't think I have to say it, but if you have a way -> I would backup all valuable data off the drive while you can. I still remember having to copy data off a breaking USB connector, not fun.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #6   (View Single Post)  
Old 21st December 2008
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Thanked 49 Times in 43 Posts
Default

Quote:
Originally Posted by JMJ_coder View Post
Thanks. It seems to be playing nice right now. I don't know what to make of it because it is not consistent.
as a precaution i would suggest taking a backup of any important files right away.

check the o/p of fdisk; does it show a discrepency in the partition size?

also check the SMART status of the disk. if it indicates that the disk is ok then that doesn't necessarily mean the disk is ok, but if it indicates an impending disk failure then the disk is almost certainly bad.

Last edited by ephemera; 21st December 2008 at 07:59 AM.
Reply With Quote
  #7   (View Single Post)  
Old 23rd December 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Thanked 8 Times in 8 Posts
Default

Quote:
Originally Posted by TerryP View Post
I don't think I have to say it, but if you have a way -> I would backup all valuable data off the drive while you can. I still remember having to copy data off a breaking USB connector, not fun.
Quote:
Originally Posted by ephemera View Post
as a precaution i would suggest taking a backup of any important files right away.

check the o/p of fdisk; does it show a discrepency in the partition size?

also check the SMART status of the disk. if it indicates that the disk is ok then that doesn't necessarily mean the disk is ok, but if it indicates an impending disk failure then the disk is almost certainly bad.
Thanks -- a backup is always sound advice. And more than once I've been burned by not backing up -- you'd think I would have learned after the first time. In this case, however, it was a fresh vanilla install -- no data yet. All my data is stored on my main desktop.

But now that it's been mentioned -- I'd better go backup my desktop.
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote
  #8   (View Single Post)  
Old 23rd December 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Thanked 8 Times in 8 Posts
Default

The laptop is now playing nicely. I have re-installed NetBSD at least once since then -- so it could be that it was a bad sector. I'm going to try out some of the tools suggested here to test for bad sectors.
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AMD64 - Hard Drive Partitioning Turquoise88 General software and network 8 11th September 2009 05:58 AM
Formatting Hard Disk Drive to UFS in OS X 10.5 Turquoise88 Other BSD and UNIX/UNIX-like 1 7th March 2009 09:57 PM
CF as a *BSD hard drive? JMJ_coder General Hardware 26 31st July 2008 05:13 PM
FreeBSD 7.0 hard drive problems. Errinok FreeBSD Installation and Upgrading 8 13th June 2008 03:24 PM
Encrypting hard drive? ViperChief FreeBSD Installation and Upgrading 5 31st May 2008 03:42 PM


All times are GMT. The time now is 04:35 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick