Sunday, October 21, 2012

Linux dd do everything

http://www.linuxquestions.org/linux/answers/Applications_GUI_Multimedia/How_To_Do_Eveything_With_DD

Rescue an unreadable floppy.

ddrescue if=/dev/fd0 of=/home/sam/rescue.image bs=1440k conv=notrunc,noerror

with a new floppy in the drive

dd if=/home/sam/rescue.image of=/dev/fd0 bs=512 skip=2 seek=2 conv=notrunc,noerror

Now the new floppy should be readable

This method works similarly well with damaged CD's and DVD's. However, you must mount the resulting .iso image as a loop device and copy all the data that way.

ddrescue if=/dev/sr0 of=/home/sam/rescue.iso bs=2048 conv=notrunc,noerror

Make the following line in /etc/fstab.

/home/sam/rescue.iso /mnt/rescue iso9660 rw,user,noauto 0 0

Execute the following command.

mkdir /mnt/rescue

This makes the mount point you put in /etc/fstab.

Execute the following command.

mount -o loop /mnt/rescue

now all the salvagable data will be in the directory

/mnt/rescue

You can copy it to a new cd.

Echoes "I love Avril" vertically.

echo -n "I love Avril" | dd cbs=1 conv=unblock 2> /dev/null


Cloning an entire hard disk:

dd if=/dev/sda of=/dev/sdb conv=notrunc,noerror

No comments:

Related Posts Plugin for WordPress, Blogger...