1745909 Members
4208 Online
108723 Solutions
New Discussion юеВ

Clone bootable USB stick

 
SOLVED
Go to solution
'chris'
Super Advisor

Clone bootable USB stick

Hello

I'd like to create an image of bootable USB stick and setup on other USB sticks?
There are 2 partitions on this USB stick and one it's bootable.
4 REPLIES 4
Huc_1
Honored Contributor
Solution

Re: Clone bootable USB stick

Hi chris

Never tried that, but I suppose you could create same partition on the second USB (same or bigger partition size) using fdisk, and do not forget to mark 1st partition on the target USB as bootable.

Then

Suppose your first partition on the original usb is sdb1 and the second is sdb2
and

The partition on the copy USB is sdc1 and scd2

proceed as follows

# dd if=/dev/sdb1 of=/dev/sdc1
# dd if=/dev/sdb2 of=/dev/sdc2

Also if you do not have a free USB slot for the second USB you could use a files instead of partitions in an additional step... like

# dd if=/dev/sdb1 of='my_USB_partition1'
# dd if=/dev/sdb2 of='my_USB_partition2'
followed by
# dd if='my_USB_partition1' of=/dev/sdc1
# dd if='my_USB_partition2' of=/dev/sdc2

As stated above have not tried this do not see why this should not work !

enjoy, life.

Jean-Pierre Huc



Smile I will feel the difference
Alzhy
Honored Contributor

Re: Clone bootable USB stick

If the USB sticks (source and new) are of the same size simply dd the whole disk:

dd if=/dev/sdc of=/dev/sdd

If they're different sized, your dd should still generally work but the bigger USB stick will waste space.
Hakuna Matata.
Lucifer Megacruel
Valued Contributor

Re: Clone bootable USB stick

Hi,

Both solutions by the other posters are right. I am adding some info here. You may try using cfdisk or gparted instead fdisk for partitioning. fdisk is slightly unfriendly IMO.


--Lucifer
"To Denouce the Evils of Truth and Love. To cause may hem and destruction and necromancy , Lucifer is here"
Ph Vouters
Valued Contributor

Re: Clone bootable USB stick

Hello Chris,

To create a pure clone of two ext3 formatted disks, I used as already mentionned
$ dd if=/dev/sda of=/dec/sdb bs=4096

However I had to change the partition labels of the cloned device with
$ e2label /dev/sdbx