I have a system that I installed ubuntu 14.04 on and then stripped everything except the bare essentials from. I can clone the drive with simple dd commands but they can be a pain to manage. The source drive I’m working with is 60GB but I’ve only used about 5GB so the whole thing should fit on one of my new 8GB USB sticks. (I think I should have purchased the Kingston brand drives instead of those but that’s what I have for now.
dd if=/dev/sdX conv=sync,noerror bs=64K | gzip -c > /path/to/backup.img.gz
fdisk -l /dev/sdX > /path/to/list_fdisk.infoRestore
gunzip -c /path/to/backup.img.gz | dd of=/dev/sdXClone
dd if=/dev/sdX of=/dev/sdY bs=512 conv=noerror,syncI should have captured more than just the partitions but that’s it for now. The refs below have some information on the MBR.