Digg this topic Add to my del.icio.us Submit to SlashDot 4 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> How to make image of an USB key
ktp
post Feb 16 2007, 06:44 PM
Post #1


Advanced Member
***

Group: Members
Posts: 159
Joined: 16-February 07
Member No.: 3,365



Hi all,

Is there a way to make an image of an USB key under XP? The USB key drive is seen as removable disk and so not shown
as hard disk. So the usual Drive Image, DiskImage, Drive Snapshot, Ghost, R-DriveImage etc... do not allow to make
an image. The idea is to clone another USB key (same model).

I know there is a Hitachi filter than can make the USB key appear as fixed disk, but this requires tweaking and is specific
th one system.
Go to the top of the page
 
+Quote Post
jaclaz
post Feb 16 2007, 09:04 PM
Post #2


Finder
***

Group: Advanced user
Posts: 1,235
Joined: 14-July 06
Member No.: 2


Italy


There are several apps, two are these:
Roadkil's Disk image:
http://www.roadkil.net/DiskImg.html

Dsfo from the dsfok package:
http://members.ozemail.com.au/~nulifetv/freezip/freeware/

jaclaz
Go to the top of the page
 
+Quote Post
ktp
post Feb 17 2007, 07:24 AM
Post #3


Advanced Member
***

Group: Members
Posts: 159
Joined: 16-February 07
Member No.: 3,365



Thanks jaclaz, the Roadkil diskimg does not show USB drive, only fixed disks. So the only possibility for me is to try dsfok since
it allows a logical drive letter. I will test it.
Go to the top of the page
 
+Quote Post
ktp
post Feb 17 2007, 07:39 AM
Post #4


Advanced Member
***

Group: Members
Posts: 159
Joined: 16-February 07
Member No.: 3,365



:-(

I successed to make an image with the command : dsfo \\.\g: 0 0 i:\$image\mykey.img
But then to test, I format the USB key on g:, unplug/replug, reverify : g: is well formatted and empty.
I then execute the reverse command :
dsfo i:\$image\mykey.img 0 0 \\.\g:

then I got \\.\g: access denied

So I cannot restore my previous image ? So what is the utility to make the image ?
Go to the top of the page
 
+Quote Post
jaclaz
post Feb 17 2007, 09:30 AM
Post #5


Finder
***

Group: Advanced user
Posts: 1,235
Joined: 14-July 06
Member No.: 2


Italy


I am not sure I get it right, but:
1) the "reverse command" is not dsfo with arguments inverted, but rather dsfi with the same arguments.
2) if the key was unpartitioned/unformatted, the resulting image is unpartitioned/unformatted, so that it doesn't matter what you do to the stick, once you re-apply the previously taken image, it will be EXACTLY as before.
An image taken like this is a RAW image, i.e. a byte by byte copy of the original.

The idea of imaging a USB stick is to copy it in it's entirety, using the "PHYSICALDRIVE" reference, rather than a partition (or drive letter) on it, it's very strange that you cannot see the stick with Roadkil's Disk Image, it should see it allright, if "somehow" a letter has been assigned to a partition on the stick, the main "physical drive" must have been mounted, in case. try using vlm (on the dsfok package) to get the alternate link, something like "\Device\Floppy0".

Another app you may want to try is duBaron diskimage, that has some more options:
http://dubaron.com/diskimage/

jaclaz
Go to the top of the page
 
+Quote Post
ktp
post Feb 17 2007, 01:25 PM
Post #6


Advanced Member
***

Group: Members
Posts: 159
Joined: 16-February 07
Member No.: 3,365



Thank you jaclaz, I did not know the dsfi.exe command.

I tried all the three tools. Rectification : Roadkill Diskimg did show the physical disks, but its combo-box
is so small so I need to scroll down all the combo-box to see all the disks (that could explain that first time
I thought it does not detect the USB disk since removable).

The three tools use different terminology that for me is backup the USB key to an image file, and restore from the image file to the USB key.
dsfo source offset size destination = Roadkill Diskimg Store Image (to target file) = Dubaron Disk image write to file = backup
dsfi destination offset size source = Roadkill Diskimg Write Image (from source file) = Dubaron Disk image import from file = restore.

Comments :
1- Roadkill Diskimg does not show size of disk/vendor name, nor file system name etc... only hard disk 0/1/2... so it's difficult to be sure about the right disk/usb key
2- dsfo/dsfi (once used to) could be easier thanks to drive letter naming, and command line interface power.
Maybe I can boot to DOS with USB drivers, then use HX extender to run it. It could be a free man backup/restore tool
(like Drive Snapshot that can be run also from DOS command line, while dsfo/dsfi is Win32-console programs, not DOS programs).
3- Dubaron DiskImage has a GUI, is a little better, with logical volume (drive letter) or physical drive selection, so less error prone.
Then just select write to file or import from file.

But dsfi is much faster than Dubaron Disk Image to write back to USB key from saved image file.
So personally I choose dsfo/dsfi for backup/restore USB key image (power, more versatile, batch file, faster).
Go to the top of the page
 
+Quote Post
jaclaz
post Feb 17 2007, 01:50 PM
Post #7


Finder
***

Group: Advanced user
Posts: 1,235
Joined: 14-July 06
Member No.: 2


Italy


Since it appears that you like this kind of comparing, more apps are listed here:
http://www.911cd.net/forums//index.php?showtopic=16534

There is really no need to use the DSFOK under HXDOS, there are good imaging utilities that already work perfectly in DOS, but it would be interesting if you have time to try it.

QUOTE (ktp)
2- dsfo/dsfi (once used to) could be easier thanks to drive letter naming, and command line interface power.

Sorry, but it still seems to me that you are failing to see the difference:
if you use (with dsfo) a source like PHYSICALDRIVEx (with disk image this is the only way) the result is an image of an ENTIRE DRIVE
if you use (with dsfo) a source drive letter, the result is the image of JUST the PARTITION to which that letter is assigned (NO MBR, NO hidden sectors, no other partitions, no unpartitioned space)


jaclaz
Go to the top of the page
 
+Quote Post
ktp
post Feb 17 2007, 02:21 PM
Post #8


Advanced Member
***

Group: Members
Posts: 159
Joined: 16-February 07
Member No.: 3,365



OK thank you jaclaz for pointing out the difference. Since my USB key is removable and cannot be partitioned, and since it is
always formatted with same file system, this why with the drive letter method and dsfo/dsfi I did not see the differences.
The best way is of course using the PHYSICALDRIVE notation as you said since everything as you said is saved (mbr, hidden
sectors, all partitions if any etc...), and so this is the right method to backup and to restore later with exact image.

Thank you for the link to other tools, I will try them.
Go to the top of the page
 
+Quote Post
ktp
post Feb 17 2007, 03:03 PM
Post #9


Advanced Member
***

Group: Members
Posts: 159
Joined: 16-February 07
Member No.: 3,365



OK after few tests, currently I prefer DriveImage XML; It has a GUI, no installation, present in most BartPE as plugin, possibility to mount the saved image.
Backup/restore easy. No partition though, only logical drives, but for me it is sufficient since I know how to format the USB key if needed, and no need nor
possibility to partition an USB key. There is no password protection though nor compression, it can use raw mode (this means probably sector copy instead of
data copy). I assume by its backup through drive letter iI could also restore to a different key model (provided sufficient target space).
Go to the top of the page
 
+Quote Post
jaclaz
post Feb 17 2007, 04:45 PM
Post #10


Finder
***

Group: Advanced user
Posts: 1,235
Joined: 14-July 06
Member No.: 2


Italy


Yet another small correction:
The fact that your stick has the "Removable" bit set in the controller does NOT mean that it :
QUOTE (ktp)
cannot be partitioned


it means that it cannot be partitioned with internal 2K/XP/2003 disk management (it can be partitioned allright with other tools) AND that, if partitioned, 2K/XP/2003 will be able to mount ONLY first partition, unless you use the filter driver.

This is a main concern for bootability of 2K/XP from a USB stick as, if the stick is not partitioned, the needed arcpath to %systemdir% directory is not generated.

Depending on the model/make of the stick, it is even possible to use the Manufacturer Production Tool to reset the "Removable" bit in the controller, so that all partitions will be mountable on ANY OS.

Also, it is possible that due to inherent "undivisibility" between REAL stick geometry and "HAL induced" N x 255 x 63 one, a noticeable amount of the stick space is not used/addressed, something that can be fixed with multiple partitioning and/or custom calculated MBR.

Some links:
http://home.graffiti.net/jaclaz:graffiti.n...B/USBstick.html
http://www.911cd.net/forums//index.php?showtopic=15776
http://www.911cd.net/forums//index.php?sho...=15837&st=6


jaclaz
Go to the top of the page
 
+Quote Post

4 Pages V   1 2 3 > » 
Fast ReplyReply to this topicStart new topic

Members Who Viewed Topic Today ()

 

RSS Lo-Fi Version Time is now: 17th November 2007 - 01:30 PM

MKPortal ©2003-2006 mkportal.it