How to Clone USB Device on a Linux/Unix System

 

A friend once wrote me requesting this tutorial on how to clone an USB storage drive on a second USB device. The aim is to produce identical copy of the original. To achieve this, we need a Linux or UNIX system. We are going to be using Fedora Linux for the purpose of this tutorial.

 

Follow these simple steps:

 

1.) Login into the system as a regular user

2.) Switch to root by typing: 

     $su –

3.) Enter the root password

4.) Plug in the source USB and type at the prompt:

     fdisk -l to see what device name the source USB has

     (this may appear as /dev/sdb)

5.) Plug in the destination USB and type at the prompt:

     fdisk -l to see what device name the destination USB has

     (this may appear as /dev/sdc)

6.) Once you have both names determined, simply type the following:

     dd if=/dev/sdb of=/dev/sdc conv=notrunc

     (as we do not want to truncate the output file, we simple use the option notrunc)

   
    The result of this command is an identical copy of the original USB device.

 

    To make an image of the entire drive including MBR (boot files), type in terminal:

    dd if=/dev/sdb of=/path/to/destination/image.dd conv=notrunc.

 

    To restore the image to a new drive seen as /dev/sdc:

    dd if=/path/to/image.dd of=/dev/sdc conv=notrunc

 


Posted in Linux and tagged , , by with comments disabled.