On Sat, 20 Mar 1999, Catalin Bucur wrote:

> Hello,
> 
> Normally, if I try to make an image of a healthy disk (3.5") with dd:
> dd if=/dev/fd0 of=filename
> I obtain a filename with 1474560 bytes length (2880*512).
> The problem is: if I have one bad sector(512 bytes) on that disk, I
want
> to create an image with the same length. Something like that:
> dd if/dev/fd0 of=filename conv=noerror bs=512 count=2880
> This command skips the bad block, but the image file length's is
1474048
> bytes.
> How can I solve that?

Dumb question:  What are you trying to do?  If you only care that the
length be the same, you could do another dd from /dev/zero with
skip=2879 count=1, but I don't see what good the copy would be.  If you
know which sector is bad, and want it in the same place on output, you
can use 3 dd's, with appropriate seek= and skip=, to copy the good
sections, and fill in with /dev/zero.

Or, if there is a filesystem on the floppy, you can mount it, make an
empty file the right size with dd, make a filesystem on it, mount it
using a loopback device (see man losetup), and use tar or cpio to copy
the contents.  That seems to me to be a better idea.  If you don't have
loopback support, you can make a fs on a ramdisk instead, then copy the
data with tar or cpio, and use dd to copy the ramdisk to your image
file.

> > TIA. > > --
> Catalin Bucur \|/ > Hardware engineer                          ^(o o)^
> mailto:[EMAIL PROTECTED]       ~~~~~~~~~oOO~~(_)~~OOo~~~~~~~~~
> 
Lawson
          >< Microsoft free environment

This mail client runs on Wine.  Your mileage may vary.
 




___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]

Reply via email to