LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-26-2015, 03:23 PM   #1
DrinkinHomeBrew
LQ Newbie
 
Registered: Oct 2011
Posts: 26

Rep: Reputation: Disabled
dd to copy a thumb drive which I am live booted on to another thumb drive


I created a persistent USB thumb drive boot with LUKS for drive encryption (250 MB /boot and then 7.5 GB ext3 root). There's no swap partition because this is just to store some private files.

I want to make two or three copies of this thumb drive to store apart in case one gets destroyed/lost.

When I am booted from that thumb drive, can I plug in a same sized drive and just do a

Code:
dd if=/dev/sdb of=/dev/sdc
command to make a copy of itself to another thumb drive without booting to another host OS? This way when I make changes to one (such as to update the OS, apps, or data), I could then just copy the entire thumb drive over to the other two while still booted in the original USB.

Or would I effectively have to shut down, boot to my normal host OS (or other), and then copy the thumb drives when not booted into them.
 
Old 01-26-2015, 03:51 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,225

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Not a good idea to copy it live. At a minimum when you boot from the new drive it will say that it wasn't shut down cleanly, so will do fsck. Any I/O that occurs during the copy could corrupt the other drive since it may end up partially done. Better is to do a file-level copy using rsync. That also makes updates faster.
 
Old 01-26-2015, 05:39 PM   #3
DrinkinHomeBrew
LQ Newbie
 
Registered: Oct 2011
Posts: 26

Original Poster
Rep: Reputation: Disabled
Thank you. I went ahead and tried it, and it crashed when booting x-windows.

Really no biggie. But very happy the process works through the host OS. Can save some files offline now and be less worried about corruption/theft.
 
Old 01-26-2015, 05:52 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,177

Rep: Reputation: 3645Reputation: 3645Reputation: 3645Reputation: 3645Reputation: 3645Reputation: 3645Reputation: 3645Reputation: 3645Reputation: 3645Reputation: 3645Reputation: 3645
dd is a good way to make an exact copy but as above, a few gotcha's exist. Never dd off a mounted system drive. dd clones and images may have unique items in grub and other locations that need to be changed. dd is best to exact same media.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] I would like to copy a letter from Abiword to an external thumb drive.,in Puppy Linux kato40 Puppy 5 04-17-2013 05:58 PM
LXer: Create a Bootable Live USB Thumb Drive or Rescue Drive Using UNetbootin LXer Syndicated Linux News 0 08-06-2012 04:10 AM
Install Linux to SATA drive but GRUB2 on to USB thumb drive Quija Linux - General 2 11-22-2011 07:40 PM
Ubuntu 8.10 Thumb Drive Problems - Live Sessions dffeitlstp Ubuntu 1 01-21-2009 08:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:48 AM.

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
Open Source Consulting | Domain Registration