LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - General (http://www.linuxquestions.org/questions/forumdisplay.php?f=1)
-   -   clone bootable USB stick (http://www.linuxquestions.org/questions/showthread.php?t=686964)

cccc 11-28-2008 07:21 PM

clone bootable USB stick
 
hi

howto create an image from the bootable USB stick and clone 1:1 including boot files ?

kind regards
cccc

Junior Hacker 11-28-2008 10:52 PM

Plug in both USB pen drives and type: fdisk -l as root in terminal to see what their device names are. If they appear as /dev/sdb and /dev/sdc, type in a terminal: dd if=/dev/sdb of=/dev/sdc conv=notrunc.
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 which is seen as /dev/sdb: dd if=/path/to/image.dd of=/dev/sdb conv=notrunc

phyzome 03-13-2010 10:40 AM

What about non-identical drives?
 
This is great for drives that have identical hardware and will have the same partition layout, etc., but what if I want to copy the boot partition of one USB stick to another USB stick that is not identical?

Specifically, I have two USB sticks that I want to have this partition layout:
  1. Large FAT32 partition taking up most of the drive
  2. Small bootable Ext3 partition at the end, containing GRUB2

Any thoughts on this?

jtag 03-14-2010 01:39 PM

If the second USB is larger you can use the same technique (dd).

bathory 03-14-2010 01:57 PM

@phyzome

You can use FSArchiver to copy filesystems on different size partitions

Regards


All times are GMT -5. The time now is 12:24 AM.