Fedora Linux Support Community & Resources Center
  #1  
Old 20th April 2006, 06:56 PM
Dumbledore's Avatar
Dumbledore Offline
Registered User
 
Join Date: Jan 2006
Location: Austin, Texas (The red state's got a blue heart!)
Age: 21
Posts: 96
Exclamation Hard Drive Crisis

Okay, I believe I have a failing hard drive, but I'm not completely sure. I want to double-check with what everybody knows. I've had a problem twice where I try to boot up normally, but it gets stuck setting "localhost.localdomain". It then flips back into text (to load the operating system components it goes to that page with the progress bar and the picture of the computer above it) and starts checking the filesystems. The first time, it found several bad or duplicate blocks. Then, yesterday, a week later, it found a ton of them. I believe it's a bad hard drive, given previous symptoms such as the hard drive shutting off in the middle of a session, and judging by the rate of progression between the two problems, I think I only have a few hard drive restarts before it crashes completely. Anyone agree/disagree? Any help would be appreciated. I'm running Fedora Core 4 on an i386 architecture. If my hard drive crashes, I'll lose 14 GB of data (I was fortunately able to back up my home folder last night). Help!
__________________
If life gives you lemons, reprogram it so it takes money from Microsoft and deposites it in your bank account! :cool:
Reply With Quote
  #2  
Old 20th April 2006, 07:48 PM
wally_666 Offline
Registered User
 
Join Date: Apr 2006
Posts: 33
Here is what I'd do. Get a new hard drive. 14GB is nothing these days (unless you've left off a zero), get whatever is on sale and has at least a three year warranty (five is beter, which is only Seagate right now).

Boot into single user mode, partition (fdisk /dev/hdc or wherever you installed it), format (mkfs -t ext3 /dev/hdc1 or whatever, and mount (mount -t ext3 /dev/hdc1 /mnt/hdc1) your new drive. You may need to do: mkdir /mnt/hdc1 before mounting. I'm not familar with FC4, I jumped from Redhat 6.1 and RedHat 8 to FC5

then do: rsync -axr / /mnt/hdc1

Afterwards, install grub to the new drive's boot sector (sorry I can't tell you how, grub is a big improvement for setting up multi-boot, but I've no clue how to get it installed, grub is new to me, but it sure beats struggling with lilo) or you can then shutdown, and make the new drive be boot drive and boot your installation CD/DVD in repair/recovery mode and reinstall grub.

HTH,
--wally.
__________________________________________
This Texan's got a red heart, but I'll still try and help.

Last edited by wally_666; 20th April 2006 at 07:52 PM.
Reply With Quote
  #3  
Old 20th April 2006, 10:02 PM
d3viant Offline
Registered User
 
Join Date: Jul 2004
Location: Edinburgh
Posts: 205
grub is really easy to install to a hard drive partition.

Just open a terminal as root and type

Code:
grub /dev/hdc1
(or whatever your partition is reported as) then copy your boot file in /boot/grub/grub.conf to the same location on the new hard drive. Then you're sorted to boot directly from that drive (change the boot order in the bios)
__________________
d3viant
Reply With Quote
  #4  
Old 20th April 2006, 11:55 PM
wally_666 Offline
Registered User
 
Join Date: Apr 2006
Posts: 33
Quote:
Originally Posted by d3viant
grub is really easy to install to a hard drive partition.

Just open a terminal as root and type

Code:
grub /dev/hdc1
(or whatever your partition is reported as) then copy your boot file in /boot/grub/grub.conf to the same location on the new hard drive. Then you're sorted to boot directly from that drive (change the boot order in the bios)
No wonder I had no clue, its way too easy and logical compared to editing lilo.conf, running lilo crossing your fingers when you reboot.

Once I found the menu.lst (linked to grub.conf on FC5) it was trivial to add the stanzas to boot other systems, but I had no idea how to get the whole shebang started, since the installer did it for me.

thanks!
--wally.
Reply With Quote
  #5  
Old 21st April 2006, 01:40 AM
steve941 Offline
Registered User
 
Join Date: Jun 2005
Posts: 668
how old your computer drive ..
google search and download:
Hitachi Drive fitness test
put it on floppy, reboot, run the tests to see if your drive is bad
NOTE>>>
if your drive has bad sectors, it will ask you if you want to perform write zeros or something else , cant remember -- been awhile since i used it, but either way youll loose data .. especially if you write zeros
.. the other option, youll just loose the data on bad sectors which is ok, cus they are bad and not likely to be recovered
Reply With Quote
  #6  
Old 21st April 2006, 09:00 PM
Dumbledore's Avatar
Dumbledore Offline
Registered User
 
Join Date: Jan 2006
Location: Austin, Texas (The red state's got a blue heart!)
Age: 21
Posts: 96
See, that's not exactly my problem. As far as I know, it doesn't have bad sectors, from which data cannot be recovered. The only problems I've had are the duplicate/bad blocks I've found. But those are just blocks, not entire sectors. But the problem is, that it's had several more bad blocks the second time, so it leads me to believe that the hard drive's writing system is out of whack, or the needles are a tiny bit out of sync. I don't think it's a good idea to reboot the hard drive and just try to mount it, I need to save the reboots for a full copy. Is there a way to mount the entire disk or to just copy it somehow? If I can mount the entire disk, I'll be able to copy it to a blank drive (would that be a tmpfs filesystem?) and no worries. If I can't do that, is there some other way? Okay, updated opinions.
__________________
If life gives you lemons, reprogram it so it takes money from Microsoft and deposites it in your bank account! :cool:
Reply With Quote
  #7  
Old 21st April 2006, 09:19 PM
LLS
Guest
 
Posts: n/a
If you add a second disk as slave, same size or bigger and make sure it is recognized then
Code:
dd if=/dev/hda of=/dev/hdb bs=1024
should mirror the whole disk or you can do partitions "hda1=hdb1" etc no mounting necessary. Then pull hda out and set jumpers of hdb to master. At the worst you may have to reinstall grub but I don't think so.
http://www.linux-backup.net/
Reply With Quote
  #8  
Old 22nd April 2006, 06:02 PM
steve941 Offline
Registered User
 
Join Date: Jun 2005
Posts: 668
id go with the above (dd if= ...)
and there's also ddrescue which is more for well .. rescuing if there are bad sectors ..
but if there is a problem as you seggest you would want to copy everything as soon as possible.
hopefully you have a hard drive around thats bigger than the one thats dying.
How old is the drive and whos the manufacturer?
theres a chance that the drive is ok, but in your case its probably better to back it up, then see if it really is dying.
I know lots about the workings of drives -- did a research paper on the physics of data storage.
and well assuming the drive is less than five years old, and its been in a good environment like no extreme temps or hasnt over heated, .. etc and no physical damage like dropping it or too much humidity, the drive is most likely good. But it also depends on the manufacturer. If its an Seagate or Hitachi, chances are its still good and the Drive Fitness Test will probably find errors and let you know if the drive is bad or if they are correctable. Again though .. go head and back up data first i suppose.
Reply With Quote
  #9  
Old 22nd April 2006, 06:11 PM
Firewing1's Avatar
Firewing1 Offline
Administrator
 
Join Date: Dec 2004
Location: Canada
Age: 22
Posts: 9,224
I've had almost the exact same symptoms and it was a failing HD. It would like you said, crash, report I/O errors, and a year later it died.
I got a 160GB HD (much better than the old 20GB!) for ~150$ (Canadian dollars) at future shop and reinstalled, it was fine. As for your data, I'd use a LiveCD to rescue it.
Firewing1
__________________
[+] My open source software and blog
[+] Some of my howtos: (for full list, click here)
Reply With Quote
  #10  
Old 29th April 2006, 10:14 PM
Dumbledore's Avatar
Dumbledore Offline
Registered User
 
Join Date: Jan 2006
Location: Austin, Texas (The red state's got a blue heart!)
Age: 21
Posts: 96
Sorry I haven't been keeping up with this conversation, but, you know, bad hard drive. I already devised a working way to solve this problem before I read this about the dd command, which I'd heard of, but didn't know how to use. But thank you, I will use that in the future if I ever have this kind of dilema again.
I installed Linspire on a third hard drive that I have (too many!), which has a Reiser file system, which Fedora Core can mount, unlike it's own file system (don't know about Fedora 5 yet, I'm just about to finish burning the CD's), so I was able to boot up from the old hard drive again and copy my personal files onto the Linspire one. I'm going to try to install Fedora Core 5 on my new hard drive and transfer my files onto that. I'm not worried about the programs, I had too many as it was. But thank you very much for the usage of the dd command, that's very helpful.
__________________
If life gives you lemons, reprogram it so it takes money from Microsoft and deposites it in your bank account! :cool:
Reply With Quote
  #11  
Old 29th April 2006, 10:48 PM
ccrvic Offline
Registered User
 
Join Date: Apr 2006
Posts: 1,092
Quote:
Originally Posted by LLS
If you add a second disk as slave, same size or bigger and make sure it is recognized then
Code:
dd if=/dev/hda of=/dev/hdb bs=1024
should mirror the whole disk
With a failing drive, it's often better to use dd_rescue; this does the same thing, but deals with unreadable bits of drive rather better...

Vic.
Reply With Quote
  #12  
Old 30th April 2006, 12:46 AM
LLS
Guest
 
Posts: n/a
I will look into that "dd_rescue". One drawback of mirroring a drive that is in trouble, is that it creates an exact duplicate so after the process to the new drive you will still have to perform a fsck and clean things up but I am glad for your post because I had to perform the exact same procedure here on my home server and it worked like a charm, never hurts to keep up on pratice for these things. I presume that dd_rescue does this on the fly?
Reply With Quote
  #13  
Old 30th April 2006, 01:48 AM
ccrvic Offline
Registered User
 
Join Date: Apr 2006
Posts: 1,092
Quote:
Originally Posted by LLS
I presume that dd_rescue does this on the fly?
No - it works exactly like dd, except that it doesn't give up when it encounters massive errors.

You can also recover intermittent data by running it several times - it only copies to the output if it read successfully...

Vic.
Reply With Quote
  #14  
Old 5th May 2006, 11:01 PM
Dumbledore's Avatar
Dumbledore Offline
Registered User
 
Join Date: Jan 2006
Location: Austin, Texas (The red state's got a blue heart!)
Age: 21
Posts: 96
So, with dd_rescue, would the syntax be the same as with dd? Like this:

Code:
dd_rescue if=/dev/hda of=/dev/hdb bs=1024
I've decided that I don't like Fedora Core 5 all that much (mostly because it stopped letting me log in, and I'm tired of it) so I just want to copy my old hard drive. I think I could update the kernel if I had to, but I'd like to know if the above command would let all of my dreams come true. Thanks for the help.
__________________
If life gives you lemons, reprogram it so it takes money from Microsoft and deposites it in your bank account! :cool:
Reply With Quote
Reply

Tags
crisis, drive, hard

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Installing to a USB Flash Drive and using the drive and a normal hard drive beeball Installation and Live Media 3 23rd March 2008 05:45 AM
USB Pen Drive Crisis Ug Hardware & Laptops 20 6th April 2004 03:12 PM


Current GMT-time: 15:35 (Monday, 20-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat