USB booting :: Duplicate Copy of a USB Pendrive?
Is there an easy way within Linux / DSL to make an exact duplicate copy of my pendrive?
I use a USB-ZIP install & would like to duplicate my pendrive on to a second device so I can experiment with settings, mydsl etc. but if I make a complete pig's ear of things (very easily done given my experience level), I can easily wipe the whole thing clean & go back to my known starting point on the other drive.
Need to duplicate both partitions, sda1 and sda2 as it's the USB-ZIP install.
Seems like it should be dead easy, but how?!
TIA.
I'd start with dd,
something like dd if=/dev/xxx of=/dev/yyy
Yes, that works. Thanks - just the trick I was looking for.
In case anyone else is interested, this is what I did:
Boot up from the pendrive (mine is a USB-ZIP install)
Plug in the second USB pendrive (already partitioned as required)
Mount all the drives (I don't know if this is required, but I did it anyway & it works)
Open root shell:
dd if=/dev/sda1 of=/dev/sdb1
takes a few minutes, then
dd if=/dev/sda2 of=/dev/sdb2
takes a few more minutes, then job done.
The USB-ZIP install uses 2 partitions, hence the need to copy sda1 to sdb1 and sda2 to sdb2. With a USB-HDD install, only the first command would be needed.
The result: an exact duplicate of the first pendrive, with all settings, configurations, myDSL applications etc.
Only one gotcha - make sure the second drive is at least as big as the first!
original here.