From: Kees Nuyt on
On Sun, 20 Jun 2010 03:54:33 -0700 (PDT), hadi motamedi
<motamedi24(a)gmail.com> wrote:

>> So why are you not copying sectors 1966080-3932160?
>Excuse me, what do you mean? As you see, it is being copied on the
>following line:
>#dd if=/dev/dsk/c0t0d0s2 bs=512 count=1966080 skip=3932160 |gzip -c>/
>tmp/solaris8.disk-pt2.gz
>Can you please correct me if you find mistake in my procedure?

Skip is the number of blocks (=sectors in this case) that is
skipped before the copy begins. Here you seem to copy the third
part, because you skip two parts worth of blocks.
Best regards,
--
( Kees Nuyt
)
c[_]

From: hadi motamedi on
>
> I think you just copied the files over.  I would try copying the raw disk, /dev/rdsk/c0t0d0s2.  This should copy all boot sectors and files.
>
To have an image from the entire raw disk,according to you, I tried as
the following :
#dd if=/dev/rdsk/c0t0d0s2 bs=512 count=1966080 |gzip -c>/tmp/
solaris8.disk-pt1.gz
#dd if=/dev/rdsk/c0t0d0s2 bs=512 count=1966080 skip=3932160 |gzip -c>/
tmp/solaris8.disk-pt2.gz
#dd if=/dev/rdsk/c0t0d0s2 bs=512 count=1966080 skip=5898240 |gzip -c>/
tmp/solaris8.disk-pt3.gz
#dd if=/dev/rdsk/c0t0d0s2 bs=512 count=1966080 skip=7864320 |gzip -c>/
tmp/solaris8.disk-pt4.gz
And so on.
I am now on step thirty of this iteration and it seems that this does
not come to an end. Can you please let me know why?
Thank you

From: hume.spamfilter on
hadi motamedi <motamedi24(a)gmail.com> wrote:
> #dd if=/dev/rdsk/c0t0d0s2 bs=512 count=1966080 |gzip -c>/tmp/
> solaris8.disk-pt1.gz

Here you copy blocks 0 to 1966079...

> #dd if=/dev/rdsk/c0t0d0s2 bs=512 count=1966080 skip=3932160 |gzip -c>/
> tmp/solaris8.disk-pt2.gz

And here you copy blocks 3932160 to 5898239. You label this "pt2" but it's
actually pt3.

What happened to blocks 1966080 to 3932159? What happened to the REAL pt2?

> I am now on step thirty of this iteration and it seems that this does
> not come to an end. Can you please let me know why?

You're copying a bit under a gigabyte per step, although you skip a gigabyte
on the second step for no apparent reason. How large is the disk?

--
Brandon Hume - hume -> BOFH.Ca, http://WWW.BOFH.Ca/
From: hadi motamedi on
> on the second step for no apparent reason.  How large is the disk?
Thank you very much for your reply. The hard disk capacity is as 40GB
and no slice is occupied with say more than 40% of data . According to
you, my procedure in (dd & count & skip) is wrong. Can you please
propose me with the correct one ?
From: hadi motamedi on
> And here you copy blocks 3932160 to 5898239.  You label this "pt2" but it's
> actually pt3.
>
> What happened to blocks 1966080 to 3932159?  What happened to the REAL pt2?
>
Sorry. You mean my procedure must be modified as the followings ?
#dd if=/dev/rdsk/c0t0d0s2 bs=512 count=1966080 |gzip -c >/tmp/
solaris8.disk-pt1
#dd if=/dev/rdsk/c0t0d0s2 bs=512 count=1966080 skip=1966080 |gzip -c >/
tmp/solaris8.disk-pt2
#dd if=/dev/rdsk/c0t0d0s2 bs=512 count=1966080 skip=3932160 |gzip -c >/
tmp/solaris8.disk-pt3
#dd if=/dev/rdsk/c0t0d0s2 bs=512 count=1966080 skip=5898240 |gzip -c >/
tmp/solaris8.disk-pt4
And so on.
Can you please confirm if my understanding is right ?