Cheap disk duplication using dd (actually dcfldd)

Why buy an expensive disk or flash drive duplicator when you can make one yourself with Linux for free or cheap?

Here are the cloning scripts you can use to copy a disk and then write it back to a large number of target disks. Modify the IMAGE.img and /dev/DEVICE as desired (each “of=” is another output file, make sure you don’t get confused and accidentally set an “of=” to a device that you might not want to destructively overwrite!) It even beeps when it’s done! Make sure to mark the scripts as executable (chmod +x) so you can double click them, or run them by typing ./SCRIPT.sh in terminal.

Reading:

#!/bin/sh
echo "about to read from DEVICE to IMAGE.img -- READY?"
sudo dd if=/dev/DEVICE of=IMAGE.img bs=4096
echo -e "\a"
read -p "Done" nothing

Writing:

#!/bin/sh
echo "about to write from IMAGE.img to DEVICE,  DEVICE and DEVICE -- READY?"
sudo dcfldd if=IMAGE.img of=/dev/DEVICE of=/dev/DEVICE of=/dev/DEVICE bs=4096
echo -e "\a"
read -p "Done" nothing

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s