Work around for Dead Hard Drive needed

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Work around for Dead Hard Drive needed

Postby brm » Jan 17th, '21, 08:12

Mageia 7.1
Hi all. I have lost access to Hard Drive /dev/sda. Any attempt to access it causes many errors and faults. I would like to remove the drive or at least make it dormant and not needed for the OS. However I think it has the boot partition for Mageia. The /home partition and /root partition for Mageia 7.1 are on /dev/sdb and another storage drive is on /dev/sdc. Is it possible to make /dev/sdb the default boot drive?
Attempts to access /dev/sda using testdisk and supergrub2 have failed thus far. I may need to recover files using photorec.

What would you do? I can still boot into Mageia 7.1. It takes a long time as I have to wait for some processes to time out.
brm
 
Posts: 60
Joined: Sep 2nd, '18, 09:45

Re: Work around for Dead Hard Drive needed

Postby doktor5000 » Jan 17th, '21, 12:19

It would help if you could post the output of lsblk to get an overview what is actually located on which drive. Also the contents of your /etc/fstab.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Work around for Dead Hard Drive needed

Postby jiml8 » Jan 17th, '21, 18:17

The first thing I would do is image the drive, to the extent that I was able to.

I do this using dd, and a new hard drive, using this command (assuming sda is the bad drive and sdd is the new drive):
Code: Select all
dd conv=noerror,sync if=/dev/sda of=/dev/sdd


Then, I would work on the new hard drive to try to recover my data.

I have had some success in the past by first tossing the bad hard drive into the freezer for awhile first (put it in a baggie). If the problem is mechanical (it often is) cooling things down tightens up bad bearings and such and may lead to improved performance for a little while. If this shows some success, you might try packing it in ice while you are imaging it, in order to keep it cooled down.

Others recommend heating the drive before trying to image it; I don't recommend this but given the ways a drive can fail, perhaps it would work in some cases.

The very best way to keep yourself from getting into this situation is to have a robust back procedure that is followed regularly. Then, when the drive goes bad, you replace it and reload it from your current backup. Much easier.

Good luck.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: Work around for Dead Hard Drive needed

Postby jiml8 » Jan 17th, '21, 18:20

I should note that my recommendation in the above post could run for many hours, depending on how big the bad hard drive is. I recommend using the default blocksize in the dd command because when it skips a bad sector or data it can't read, this will reduce the amount of data that is skipped. But it will lead to looonnnggg times transferring the data. The last time I had to do this was about 15 years ago when I had a laptop drive go bad, and it contained some critical data that had been generated on a trip and not backed up (yet).

According to my notes (which I consulted to recall the correct dd command) it took me 4 hours to image a 250GB drive.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron