[GRLUG] duplicate usb drive

Michael Mol mikemol at gmail.com
Wed Aug 30 14:29:35 EDT 2006


rsync works at the filesystem level.  He needs it to be bootable,
which means copying at least the boot sector and the first sector of
the NTFS partition.

A straight dd works well for that.  Heck, if he's comfortable with his
old FS size, he doesn't even need to adjust ("correct") the partition
table and filesystem sizes to reflect the size of the target drive.

On 8/30/06, Justin Denick <justin.denick at gmail.com> wrote:
> You could probably use rsync -avz source dest
>
>
>
>
> On 8/30/06, Bill Littlejohn <billl at mtd-inc.com> wrote:
> >
> >
> >
> >
> > I'm a little confused.
> > "You can correct the partition table with parted or fstab after it's
> done.".
> > What do you mean by "correct"?
> > I've used guiparted in Knoppix but not much else. I usually use Partition
> Commander.
> > I'm also a little confused on the purpose of using fdisk and ntfsresize
> after transferring the image.
> >
> >
> > "
> > dd if=/dev/sda of=/dev/sdb bs=4000000
> > fdisk /dev/sdb
> > ...
> > ntfsresize /dev/sdb1
> > "
> >
> >
> > I know I'm being somewhat dense here - a little hand-holding would be
> appreciated.
> > :)
> >
> >
> > Bill
> >
> >
> >
> >
> > Al Tobey wrote:
> > On 8/30/06, Bill Littlejohn <billl at mtd-inc.com> wrote:
> >
> >
> > OK. Short background.
> > The integrated video card in my wifes winxp box is borked and the system
> > won't boot anything.
> > I want to duplicate the drive in order to boot the copy using LiveView
> > in a VM for the purpose of recovering
> >
> > the damned DRM license keys for all her music.
> >
> > I have the 40GB source drive hooked up a usb-ide converter.
> > I have a handy 75GB usb drive available to put the copy onto.
> > My source drive shows as /dev/sda and the target as /dev/sdb under both
> >
> > Suse and Knoppix.
> > No surprises there.
> > The source drive has a single NTFS partition using 100%.
> >
> > So here is the problem,
> > I need the result to be an exact copy (i.e. bootable), OR a single dd
> > image would work for LiveView also, but needs to be readable from Win.
> >
> > I can't seem to use "dd if=/dev/sda of=/dev/sdb " because the drives are
> > of differing geometry. (I tried anyway but got something like 116Kb/sec
> > transfer and gave up :(
> >
> > Try: dd if=/dev/sda of=/dev/sdb bs=4000000
> >
> > If your USB adapter is 1.0, it's not going to get faster. I get much
> > better speeds than that on my USB2 adapter, though. Using the
> > larger block size makes a big difference.
> >
> >
> >
> >
> > I can't use "dd if=/dev/sda1 of=/mnt/sdb1/winxp.img" because I need to
> > format the target drive as FAT32 to be readable under Win and Linux and
> > obviously you can't have a 37GB file on FAT32.
> >
> >
> > Just dd it over directly. You can correct the partition table with
> > parted or fstab after it's done. I just did this the other day from
> > a Linux rescue CD.
> >
> > dd if=/dev/sda of=/dev/sdb bs=4000000
> >
> > fdisk /dev/sdb
> > ...
> > ntfsresize /dev/sdb1
> >
> > With a little google searching, you can find how to merge the boot
> > sector from the source drive onto the destination drive. Once you
> > have that knowledge, you can just dd the partition after creating one
> >
> > of the same or slightly larger size on the dest drive.
> >
> > dd if=/dev/sda1 of=/dev/sdb1 bs=4000000
> >
> > To view your speed while dd is running, switch consoles and hit it with:
> > kill -USR1 `ps -ef |awk '/dd if/{print $2}'`
> >
> > (kill -USR1 the pid of dd)
> >
> > -Al Tobey
> >
> >
> >
> > So how does one make an exact copy of a drive to a non-identical drive?
> >
> > _______________________________________________
> > grlug mailing list
> >
> > grlug at grlug.org
> > http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > grlug mailing list
> > grlug at grlug.org
> > http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
> >
> >
>
>
>
>
>
> --
> In vino veritas.
>         [In wine there is truth.]
>                 -- Pliny
> _______________________________________________
> grlug mailing list
> grlug at grlug.org
> http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
>
>


-- 
:wq


More information about the grlug mailing list