dd image onto a usb key

Linda Walsh cygwin@tlinx.org
Wed May 23 14:02:00 GMT 2007

Mohammed Iqbal.H wrote:
> its a .dd image,
> dd if={.dd image} of=/cygdrive/e
> As 'e' is the USB key.
> error message:
> dd :opening '/cygdrive/e':Is a directory
   On my system:
     /dev/sda points to my first hard disk
     /dev/sda2 points to my "C" drive (2nd partition on first hard disk)
       my 1st partition (/dev/sda1) is invisible to windows
     /dev/scd0 points to my first CD/DVD device (my drive D:)
     /dev/scd1 points to a 2nd CD/DVD device

   I'm not sure (not having one) how your USB drive looks to
windows (hard disk or a CD/DVD), but I'd expect it to look like
a hard disk.  In my case, my next hard disk would be "/dev/sdb".
If it mapped to a CD/DVD (improbable) it would use "/dev/scd2".

   I don't know if your drives "D" and "E" are CD/DVD drives or
hard disk partitions, but the USB drive would be the next drive
in sequence.  If D & E are both CD/DVD's then the USB drive would
likely be /dev/sdb; if one of D|E is a hard disk, then "/dev/sdc".

   FWIW -- I suppose it's possible the USB key tries to look
like a "floppy", since in some ways, it replaces a floppy.
If that's the case, use the appropriate "fd" device:
(/dev/fd0, /dev/fd1, /dev/fd2 ... ).

   That having been said -- some "warnings"/caveats.
   AFAIK, there is no such thing as a "dd" image.  "dd"
is just a copy utility.  I.e. it copies data.
"dd if=/bin/ls of=/tmp/ls" is equivalent to
"cat /bin/ls >/tmp/ls".  It sounds like, in your case,
that the file you are copying to the USB drive is an
image of a formatted USB disk with content on it.

   If the image you are copying to the USB drive is one
that came from someone else's identical model USB drive,
then using dd to copy the image to the USB drive should
work, AFAIK, but I haven't tested it.

   If your USB drive is bigger, then after you copy
the "image" to the USB drive, it will overwrite
the USB's volume information and your device will
appear to be the size of whatever the image came from.
I.e. if I backup a 10G hard disk using "dd", then I
restore it to a 20G hard disk, when I do a "dir" or "ls"
of the resulting disk, it will appear to only be 10G in
size.  If my hard disks are different models, then copying
an image from one to another will probably transfer the
files "ok", but the resulting disk _may_ not be bootable
(assuming the first disk was).  It may work, but it
is something to be aware of.

   Hope this is helpful and hope you don't hose your USB
drive :-). I don't have one, so I haven't tested any of

   Good luck!  If your USB drive self-destructs for some reason,
I disavow all knowledge of this post that my dog may have written!

:-) Linda

Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

More information about the Cygwin mailing list