On 3/13/07, Gordon Turner <[EMAIL PROTECTED]> wrote:
I have three questions for the dd savants out there, consider an image being
dd'd that is created with a dd statement like:
dd if=/dev/zero of=imageFileName.img bs=512 count=1014049
and then mounted and prepared to be a fully functioning boot drive and
unmounted.
Question 1. Writing this image to a compact flash card, it should be dd'dto
/dev/rsd0c, correct? I ask this b/c I have sometimes seen things dd'ed to
/dev/rsd0a. (When dealing with a sd0 device.)
It depends on how you've prepared this image. sd0c is the 'entire
disk' whereas sd0a is just the / partition disk from wherever the
disklabel stored in the first few sectors of sd0c says it is from. I
think you probably mean that you've gone and made this empty file and
mounted it with vnconfig and then fdisk'd it right? In that case, use
sd0c.
Question 2. When writing this image, can the 'count=1014049' be omitted? It
seems to me that it can, the file after all is of a specific size is it not?
Yes.
Question 3. Writing the image at 'bs=512' can take a looong time, is there any
risk of corruption with using 'bs=20m' instead, or will this mess up the output?
You don't need to say bs=512, that's the default. I don't know anymore
than that though, but I imagine it's best to just go with the default.
All the data will have to be read and moved eventually, and exactly
what is the optimal cases is probably highly non-linear and based on
what other processes are running at the time, the size of your RAM,
the quality of your hardware, and so on.
-Nick