Quote:
Originally Posted by pixellany
If you do decide to tackle this yourself, the very first thing to do is to clone the relevant partitions. Under Knoppix, you can do this with the "dd" command. Proceed with caution--even the cloning can wipe out the drive if not done correctly.
|
I would recommend cloning the partition to a file rather than to another partition (unless a cloned partition is really your end objective; I don't think it is). To do this, mount a
good partition with more free space left than your defective partition at (for example) /mnt/temp. Then:
Code:
dd if=/dev/hda1 of=/mnt/temp/partiton_backup.img
This assumes your defective partition is on /dev/hda1; adjust as necessary. Also adjust mount point and file name (partition_backup.img) to suit taste. If
dd fails, you can check out
Hack #59 in
Knoppix Hacks or google to learn about
dd_rescue and
dd_rhelp.
To recover files , mount the defective partition RO (the default in KNOPPIX when you click on the desktop icon), mount the partition to receive the files where you desire. You can now use your standard tools (GUI or CLI) to copy non-corrupted files and/or directories (which should be your first priority). Google for options to try recover corrupted files.
EDIT: If you are doing this because a drive is failing, instead of mounting the actual partition to recover files, you would be better off mounting the backup image (make sure you mount it RO!):
Code:
mount -o ro,loop /mnt/temp/partition_backup.img /mnt/loop1