Update: Recently I had a dying drive and wanted to image it somehow. I normally use G4L; however, I was having issues getting G4L to work with my newish external USB-IDE adaptor. Ubuntu 8 works with my USB drive fine.
Update 2: Did same thing with Linux Mint 18. Pretty much the same as Ubuntu. Bonus: Linux Mint 18 supports exFAT.
Update 3: Disk to disk (i.e. no intermediary image files):
sudo dd conv=noerror,notrunc,sync if=/dev/sda of=/dev/sdb bs=64k status=progress
So, very similar to Knoppix...
Mount USB drive w/GUI. Default is to /media/disk-1 for my drive.
To clarify: /dev/sda6 is the source partition to backup. /media/disk-1/my-usb-sda6.img is the backup file(s).
Then:
sudo dd conv=noerror,notrunc,sync if=/dev/sda6 | split -b 10000000 - /media/disk-1/my-usb-sda6.img
Next time, I think I would pipe it through gzip. Sending multiple GB over the relatively slow USB adaptor took a long time.
Original version of this note was with Knoppix Live CD. It is still valid:
The bottom of this page gives a great example of disk imaging over a network (via smb) while ignoring read errors on the source hard disk. I couldn't figure out how to do this with my normal favorite, G4U...
Dead: http://www.williamaford.com/CloningaHDD.php
Similar: https://www.cyberciti.biz/faq/unix-linux-dd-create-make-disk-image-commands/
Similar 2: https://ubuntuforums.org/showthread.php?t=1540873 - has gzip in there too and split.
The key lines:
To make an image of the old hard drive:
mkdir /mnt/space
smbmount //dadsbox/space /mnt/space -o username=jiml,password=mypassword
dd conv=noerror,notrunc,sync if=/dev/hda | split -b 100000000 - /mnt/space/LTRecover.img.
Write out is more or less like: sudo cat system_drive_backup.img.gz.* | gzip -dc | dd of=/dev/sda conv=sync,noerror bs=64K
(NOTE: the page linked does not use "notrunc,sync", this is required for NTFS and probably many other filesystesm - it fills bad blocks with zeros rather than skipping them, which leads to shorter than appropriate dumps!)
tags: knoppix, clone, image, badblocks, dead, dying, hard drive, blocks, sectors, bad