LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Hard disk failing ! (https://www.linuxquestions.org/questions/linux-software-2/hard-disk-failing-804017/)

prabhatsoni 04-24-2010 08:59 PM

Hard disk failing !
 
Hello folks,
My FC11 is now giving out an alert "One or more disks are failing"

What should I do now ? My hard disk has two operating system on it - FC11 and windows.

One of the possible things would be to create an image of the whole hard disk so that when the disk fail I copy the image to a new hard disk of same (or bigger size) and be online.

How do I go about it ?


Prabhat Soni

Mr-Bisquit 04-24-2010 09:21 PM

You could also create a live image with the available tools.

Anyway, save all config files, repo data, and other important data. The rest can be replaced with some patience and a few commands.

piratesmack 04-25-2010 01:06 AM

What I would do is just plug in both drives and run:
Code:

dd if=/dev/FAILING_DISK of=/dev/NEW_DISK bs=4096 conv=notrunc,noerror
The above command will copy everything from the failing hard drive to the new one.


But if you want to create an image of the failing disk:
Code:

dd if=/dev/FAILING_DISK bs=4096 conv=noerror | gzip -c > disk_image.gz
And to write the image to the new hard drive:
Code:

gunzip -c disk_image.gz | dd of=/dev/NEW_DISK bs=4096 conv=notrunc,noerror
The above commands should be run from a live cd as root.

If the new disk is larger than the failing disk, you'll probably want to extend the partitions with gparted after cloning the drive

EDIT:
Forgot to mention, the new drive must be at least the size of the failing drive

prabhatsoni 04-25-2010 02:58 AM

Thanks Piratesmack,
Let me get it clear. Once I copy this disk image to a bigger disk, grub flash screen will show up as usual, and I will be able to boot into windows or linux just like good old times. All other applications that I have installed in linux as well as windows will be there (at least theoretically). Am I right in expecting so ?

Thanks once again for your prompt response......

Prabhat Soni

piratesmack 04-25-2010 08:29 AM

That is correct.


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