Welcome! Log In Create A New Profile

Advanced

clone my USB ?

Posted by DJDavid 
clone my USB ?
March 22, 2011 07:53AM
Hello there t there a way to clone my USB
because as I made ​​mishandling I am forced to reinstall all
So I have one or saving as a copy of the USB Key
thank you
Re: clone my USB ?
March 22, 2011 08:50AM
DJDavid Wrote:
-------------------------------------------------------
> Hello there t there a way to clone my USB
> because as I made ​​mishandling I am forced
> to reinstall all
> So I have one or saving as a copy of the USB Key
> thank you


I have cloned my Dockstar's boot usb using Clonezilla. See

http://clonezilla.org/

This is a Debian-based free open-source drive cloning package that works very well. I have used it to successfully clone and restore the Dockstar usb boot stick and my current Dockstar usb boot drive, the boot SSD from a Dell Mini 9 hackintosh netbook, and the boot hard disk in a Mythbuntu MythTV box.
Re: clone my USB ?
March 22, 2011 11:10AM
I usually do this with: cp -a /.../old/* /.../new
The only thing I have to correct are the UUIDs in the fstab.

--
shyd

Goflex Net 3.9.5 | Dockstar 3.9.5 | http://dev.shyd.de
Re: clone my USB ?
March 23, 2011 06:36AM
Traduction (français > anglais)
Hello and thank you for your answer but can tell me more,
because with http://clonezilla.org/
I is not how?
and AC:
cp-a /.../ old / * new /.../
it helps me not at all lol
Re: clone my USB ?
March 23, 2011 07:30AM
DJDavid Wrote:
-------------------------------------------------------
> Traduction (français > anglais)
> Hello and thank you for your answer but can tell
> me more,
> because with http://clonezilla.org/
> I is not how?
> and AC:
> cp-a /.../ old / * new /.../
> it helps me not at all lol


I wish my French were better. Download Clonezilla live from here:

http://clonezilla.org/downloads/stable/iso-zip-files.php

Then follow the directions here

http://clonezilla.org/liveusb.php

to install clonezilla on a usb flash drive. This usb flash drive will then be bootable. You can then boot a PC with this flash drive, clonezilla will start, and you can use it to clone your Dockstar usb.

Maybe this will help, en Francais:

http://www.linuxpedia.fr/doku.php/deb/clonezilla
chuki
Re: clone my USB ?
May 11, 2011 11:15PM
cat /dev/sdx > usbimage

restore:

cat usbimage > /dev/sdx
Brian
Re: clone my USB ?
May 13, 2011 01:17PM
I've been using WinImage to clone my Dockstar USB thumbdrive on my Win7 box. It works very well. I once had occasion to do a restore from the .vhd image back to the thumbdrive and it went off without a hitch.

But, question: Is there any way to clone from an existing USB stick on my Debian Squeeze Dockstar to a =smaller= USB stick, or otherwise reduce the existing partition size so as to then move to a smaller USB stick? Clonezilla, for example, requires the destination partition to be the same or larger.

I'm using a 4 gig USB stick on my Dockstar; it's what I had at the time. My swap partition is 557M, but I only use 133M (24%). My main partition is is 3.17 G but I only use 1.06G (33%). I only really need a 2G stick -- probably split 250M for swap/1.750G for main -- and I have one now. It would be nice to move the 4gb stick to another application.
Re: clone my USB ?
May 13, 2011 05:07PM
I believe USB Image Tools allow you to do that while restoring a compressed/uncompressed image. As long as you know for sure it will fit into a smaller USB stick, it will work. I would use this tool and do an image backup, then use the compressed image to restore it to a smaller stick. Note that before you do that, the partition on the larger stick must be shrunk in advance (i.e. shrink the partition on the 4GB stick to less than 2GB, with some margin for error, and then backup to image file).



Edited 2 time(s). Last edit at 05/13/2011 05:13PM by bodhi.
Brian
Re: clone my USB ?
May 14, 2011 02:54PM
bodhi Wrote:
-------------------------------------------------------
> I believe USB Image Tools allow you to do that
> while restoring a compressed/uncompressed image.
> As long as you know for sure it will fit into a
> smaller USB stick, it will work. I would use this
> tool and do an image backup, then use the
> compressed image to restore it to a smaller stick.
> Note that before you do that, the partition on the
> larger stick must be shrunk in advance (i.e.
> shrink the partition on the 4GB stick to less than
> 2GB, with some margin for error, and then backup
> to image file).

Thanks for the tip. I am confident that I can fit the files and system onto a smaller stick.

How do I go about shrinking the partition? I have two that would have to be shrunk on that one stick. What Linux or other tools could do that? Maybe you are suggesting that USB Image Tools has that capability. I'll go look-see... :)
Re: clone my USB ?
May 14, 2011 05:45PM
If the USB 4GB stick is not the boot stick, then shrinking partition using parted (i.e. you would need to boot using a clone of that stick).

However, a different way (not using USB Image Tools) is using Linux dd command to do it. In this example, the sda1 is 4GB and the sdb1 is 2GB, and they both formatted as ext2. After copying, you'll need to resize the filesystem (resize2fs resizes the ext2 file system).

#dd if=/dev/sda1 of=/dev/sdb1
#resize2fs /dev/sdb1

I tried it both ways, and they worked equally well. But I think the dd command is faster, and you don't have to remove the boot USB stick. Just make sure to be very careful because a typo could be disastrous using dd :-)
Re: clone my USB ?
May 14, 2011 11:23PM
I use two ways backing up my USB drives. One is use the tar utility on Unix. It has been discussed elsewhere on this board. It is very flexible and powerful but you need to have Linux. The other way is using Acronis True Image on Windows machines. It is also reliable but sometimes picky about the drive you are using. I use the latter most of the time With Acronis, you can restore the image to larger or smaller USB drives with no problem as long as the space in the target USB is sufficient for all of the files recovered.
Brian
Re: clone my USB ?
May 15, 2011 02:32PM
twinclouds Wrote:
-------------------------------------------------------
> I use two ways backing up my USB drives. One is
> use the tar utility on Unix. It has been
> discussed elsewhere on this board. It is very
> flexible and powerful but you need to have Linux.
> The other way is using Acronis True Image on
> Windows machines. It is also reliable but
> sometimes picky about the drive you are using. I
> use the latter most of the time With Acronis, you
> can restore the image to larger or smaller USB
> drives with no problem as long as the space in the
> target USB is sufficient for all of the files
> recovered.

I have Acronis, so perhaps I will give that a whirl!
Re: clone my USB ?
May 15, 2011 03:37PM
twinclouds Wrote:
-------------------------------------------------------
> I use two ways backing up my USB drives. One is
> use the tar utility on Unix. It has been
> discussed elsewhere on this board. It is very
> flexible and powerful but you need to have Linux.
> The other way is using Acronis True Image on
> Windows machines. It is also reliable but
> sometimes picky about the drive you are using. I
> use the latter most of the time With Acronis, you
> can restore the image to larger or smaller USB
> drives with no problem as long as the space in the
> target USB is sufficient for all of the files
> recovered.


twinclouds, when you use Acronis to restore the ext2 image to a smaller USB drive, do you have to resize the filesystem it later? or Acronis does that for you? I knew it does for FAT32 or NTFS partition, but did not know whether it will resize ext2 partition.
Re: clone my USB ?
May 15, 2011 07:51PM
You don't need to do anything. It will automatically resize.
Re: clone my USB ?
May 16, 2011 03:40AM
twinclouds Wrote:
-------------------------------------------------------
> You don't need to do anything. It will
> automatically resize.

Thanks, good to know another way to do this!
Brian
Re: clone my USB ?
May 20, 2011 02:41PM
Here's a variant of the questions above.

As I've mentioned, I'm using a generic (freebie from Microcenter, actually) 4G USB stick as my Debian Squeeze boot drive. I can get my hands on one of the Seagate go-drives that the Dockstar was actually designed to be used with. Question (probably to =twinclouds=): could I use Acronis to clone from the 4GB USB stick to partitions on the much larger go-drive HDD?
Re: clone my USB ?
May 22, 2011 12:23PM
I don't see why not although I haven't tried for anything larger than 20 GB (1.8" HD). You can simply try to find out.
Re: clone my USB ?
May 22, 2011 08:29PM
I can't comment on Acronis, but I'm currently running my Dockstar completely from a 1TB Seagate GO drive (no solid-state media on it at all, except for the uBoot), so I can vouch for it being doable.

Good luck with it!
rat
Re: clone my USB ?
June 19, 2011 08:57PM
Brian Wrote:
-------------------------------------------------------
> But, question: Is there any way to clone from an
> existing USB stick on my Debian Squeeze Dockstar
> to a =smaller= USB stick, or otherwise reduce
> the existing partition size so as to then move to
> a smaller USB stick? Clonezilla, for example,
> requires the destination partition to be the same
> or larger.

It's been a while since you asked, but I'm replying because I just now had to try to figure out how to do this for myself since I had been putting off making a backup image of my Dockstar debian install and had this exact issue... so I figure this might be helpful to anyone else reading.

I'd been using a Sandisk SDPlus card that was a little more generous with the clusters than most same sized USB sticks tend to be, resulting in a bit of an issue in being able to do a 1:1 clone as it would always be the larger of the two of all of my 4GB sticks.

I had a CDR burned with Parted Magic, it's a Debian based LiveCD with GParted and other disk tools for resizing. Gnome based, so all the wonderful GUIs instead of prompts. Used my Netbook to boot Parted Magic with the Dockstar USB Drive in it.

I shrunk my main partition by about 400MB (3.7 to 3.25GB) and moved my swap partition to the left (128MB) to ensure all the free space was at the end and that this stick would always be smaller than any 4GB stick I could pick up sometime in the future. (Only needed to be about 40MB smaller, went 400 just to be safe)

Pretty much exactly as it sounds. Easy as cake. GParted is so dead simple for this stuff, so if you're able to install Debian onto the Dockstar, you should have no problems using this or Parted Magic.

Next step was making a bootable stick with Clonezilla on it. Easy enough to do. When running it, just read the menu options carefully and you'll be fine. When it was all said and done, stuck the stick in the dockstar, df -h and free shows correct info, have swap partition.

Tried a few other imaging tools and Clonezilla is the only one that got swap right. So if you can't dd, Clonezilla is probably the only one you'll even really want to bother with.

Resizing: GParted if you have a Linux desktop, Parted Magic if you need a LiveCD to do it from.

Cloning: Clonezilla, all the way.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: