DD Rescue Commands

See what partitions the system sees.

cat /proc/partitions

If the new device is seen by the computer you will see a few messages come up. After a few seconds, if the drive is healthy enough, you will see something about a new device. Hit CTRL-C to get out of the tail command and run cat /proc/partitions again (hit cursor up twice at the command line to repeat previous commands you typed in) tail -f /var/log/kern.log

Connect the bad drive and view the Kernel log to see if it sees the drive

DD Rescue

apt-get install gddrescue

Installation
-n option to skip all bad sectors
-r to recover bad sectors, 1 Infiniti

ddrescue -n /dev/sdb1 /media/data/imagefolder/image.dd /media/data/imagefolder/rescue.log

Switches

dd if=/folder/image.dd of=/dev/sdb

Go from image to drive; drive must be same size or larger than image To create an image of only the boot code of the master boot record(without the partition table):

dd if=/dev/sda of=MBR_boot.img bs=446 count=1 apt-get install pv dd if=/folder/image.dd | pv | dd of=/dev/sdb Progress bar with PV USB:002,006

Mount DD image file

Get starting spot and multiple by 512 for offset fdisk -l -u -C (# of Cylinders) /hda_dd.image Get offset mount -o loop,ro,offset=32256 image.dd /mnt/rabbit umount /mnt/rabbit (when done)

Wipe Drive

dd if=/dev/urandom of=/dev/sda bs=1M


In [ ]: