Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@tachikoma ~]# crib
- Categories:
- * vid
- * arch
- * house
- * web
- [root@tachikoma ~]# crib arch
- Cribs in category arch:
- * ddrescue
- * adduser
- [root@tachikoma ~]# crib arch ddrescue
- 'ddrescue --direct' will open the input with the O_DIRECT option for uncached reads. 'raw devices' are not needed on newer kernels. For older kernels see below.
- First you copy as much data as possible, without retrying or splitting sectors:
- ddrescue --no-split /dev/hda1 imagefile logfile
- Now let it retry previous errors 3 times, using uncached reads:
- ddrescue --direct --retry-passes=3 /dev/hda1 imagefile logfile
- If that fails you can try again but retrimmed, so it tries to reread full sectors:
- ddrescue --direct --retrim --retry-passes=3 /dev/hda1 imagefile logfile
- You can now use ddrescue (or normal dd) to copy the imagefile to a new partition on a new disk. Use the appropriate filesystem checkers (fsck, CHKDSK) to try to fix errors caused by the bad blocks. Be sure to keep the imagefile around. Just in case the filesystem is severely broken, and datacarving tools like testdisk need to to be used on the original image.
- -------
- losetup -f /path/to/floppy
- mount /dev/loop0 /floppy
- umount /floppy
- losetup --detach /dev/loop0
- -------
- CHECKING: badblocks -v /dev/fd0
- WRITING: dd if=filename of=/dev/fd0 bs=1024 conv=sync ; sync
- -------
- Don't forget to modprobe floppy first.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement