LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-28-2008, 08:21 PM   #1
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Rep: Reputation: 50
clone bootable USB stick


hi

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

kind regards
cccc

Last edited by cccc; 11-28-2008 at 08:34 PM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 11-28-2008, 11:52 PM   #2
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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
 
2 members found this post helpful.
Old 03-13-2010, 11:40 AM   #3
phyzome
LQ Newbie
 
Registered: Aug 2006
Posts: 1

Rep: Reputation: 0
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?
 
Old 03-14-2010, 02:39 PM   #4
jtag
Member
 
Registered: Aug 2008
Posts: 33

Rep: Reputation: 0
If the second USB is larger you can use the same technique (dd).
 
Old 03-14-2010, 02:57 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,900

Rep: Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611
@phyzome

You can use FSArchiver to copy filesystems on different size partitions

Regards
 
Old 02-03-2016, 12:44 PM   #6
kengoudsward
LQ Newbie
 
Registered: Feb 2016
Location: Canada
Distribution: Ubuntu
Posts: 2

Rep: Reputation: Disabled
Clonezilla

in theory, this can be done by Clonezilla as well, although I have not successfully proven this
 
Old 02-03-2016, 05:53 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 17,168

Rep: Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562
Various older posts here back to 08.

Hello and welcome to LQ kengoudsward.
 
Old 02-03-2016, 10:32 PM   #8
kengoudsward
LQ Newbie
 
Registered: Feb 2016
Location: Canada
Distribution: Ubuntu
Posts: 2

Rep: Reputation: Disabled
Unhappy

thanks jefro
oh ya btw with dd, it works great if you have 2 exact same hardware USB sticks, but I found that if they are not the same, it might copy ok but the copy will not be bootable
 
Old 02-04-2016, 06:21 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 17,168

Rep: Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562Reputation: 2562
Kind of depends on a number of things. Clones are subject to how the distro names things. If your grub or drive or other references are not generic then it could fail.

A few more steps involved in going from size to size usually.

Red Hat messed me on one time on exact same drive to drive clone. Network naming jumped. Not normally an issue but in this application I needed names to be exactly as on original.


A lot could change from when this post started in 2008 to now on linux.

Last edited by jefro; 02-04-2016 at 06:32 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bootable USB stick with G4L cccc Linux - Networking 3 07-27-2013 12:38 AM
Clone Linux Bootable USB Flash Drive hpnoobs Linux - Newbie 3 09-17-2008 10:38 PM
how to a bootable flag on usb stick? xpucto Linux - Newbie 10 08-29-2008 09:52 AM
How to make USB stick bootable? depam Linux - Software 3 12-31-2006 12:22 PM
bootable USB-Stick overlord73 Linux - Hardware 1 01-14-2005 03:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration