On Tue, 13 Mar 2007 13:41:43 -0400, "Nick !" <[EMAIL PROTECTED]> wrote:
> 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.

I am think of the case like flashdist (http://www.nmedia.net/~chris/soekris/) 
or my own script (http://webapp.gordonturner.ca/greenfrog/image.sh.txt) which 
does something like this:

dd if=/dev/zero of=imageFile.img bs=512 count=${SECTORCOUNT}
vnconfig -c svnd0 imageFile.img
fdisk -c ${CYLINDERS} -h ${HEADS} -s ${SECTORSPERTRACK} -f /usr/mdec/mbr -e 
svnd0
disklabel -E svnd0
newfs -S 512 -u ${SECTORSPERTRACK} -z ${HEADS} -q /dev/rsvnd0a
...
vnconfig -u svnd0

Then the step that I was asking about was actually dd'ing the imageFile.img to 
the sd0 device.

ie, which of these is correct:

dd if=imageFileName.img of=/dev/rsd0c
or
dd if=imageFileName.img of=/dev/rsd0a

Cheers,
Gordo.

Reply via email to