[GRLUG] duplicate usb drive
Al Tobey
tobert at gmail.com
Wed Aug 30 12:25:37 EDT 2006
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
>
--
Remember: "perfect is the enemy of good".
- Linus Torvalds
More information about the grlug
mailing list