From: hadi motamedi on
Dear All
I asked you on how to make an image from my working Solaris8 server to
put it on my qemu-system-sparc as its virtual HDD. According to you,
the entire hard disk is on /dev/dsk/c0t0d0s2 . So I tried as the
following :
#dd if=/dev/dsk/c0t0d0s2 bs=512 count=1966080 skip=3932160 |gzip -c>/
tmp/solaris8.disk-pt2.gz
After about forty steps of iteration, it ended up. Then I uncompressed
all of them and concatenate like the following :
C:\copy /b solaris8.disk-pt1+solaris8.disk-pt2+...+solaris8.disk-pt39
solaris8.disk
The resulting 'solaris8.disk' is 38GB in size. I tried to bring up my
qemu-system-sparc with it but it seems that it is not an appropriate
bootable one. Can you please let me know what is wrong in my procedure
and how to obtain a valid one?
Thank you
From: Greg Andrews on
hadi motamedi <motamedi24(a)gmail.com> writes:
>
>I asked you on how to make an image from my working Solaris8 server to
>put it on my qemu-system-sparc as its virtual HDD. According to you,
>the entire hard disk is on /dev/dsk/c0t0d0s2 . So I tried as the
>following :
>#dd if=/dev/dsk/c0t0d0s2 bs=512 count=1966080 skip=3932160 |gzip -c>/
>tmp/solaris8.disk-pt2.gz
>After about forty steps of iteration, it ended up. Then I uncompressed
>all of them and concatenate like the following :
>C:\copy /b solaris8.disk-pt1+solaris8.disk-pt2+...+solaris8.disk-pt39
>solaris8.disk
>The resulting 'solaris8.disk' is 38GB in size. I tried to bring up my
>qemu-system-sparc with it but it seems that it is not an appropriate
>bootable one. Can you please let me know what is wrong in my procedure
>and how to obtain a valid one?
>

Why did you ask for the partition that represents the whole physical
disk, and then skip parts of it? Doesn't qemu want the actual image
of the physical disk, rather than some piece of it?

The parts of the physical disk you skipped are often the most important
for bootable drives. The first few sectors contain the disk label or
boot block with map of which sectors belong to what paritions.

-Greg
--
Do NOT reply via e-mail.
Reply in the newsgroup.
From: Paul Gress on
On 06/19/10 11:44 PM, hadi motamedi wrote:
> Dear All
> I asked you on how to make an image from my working Solaris8 server to
> put it on my qemu-system-sparc as its virtual HDD. According to you,
> the entire hard disk is on /dev/dsk/c0t0d0s2 . So I tried as the
> following :
> #dd if=/dev/dsk/c0t0d0s2 bs=512 count=1966080 skip=3932160 |gzip -c>/
> tmp/solaris8.disk-pt2.gz
> After about forty steps of iteration, it ended up. Then I uncompressed
> all of them and concatenate like the following :
> C:\copy /b solaris8.disk-pt1+solaris8.disk-pt2+...+solaris8.disk-pt39
> solaris8.disk
> The resulting 'solaris8.disk' is 38GB in size. I tried to bring up my
> qemu-system-sparc with it but it seems that it is not an appropriate
> bootable one. Can you please let me know what is wrong in my procedure
> and how to obtain a valid one?
> Thank you


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.

Paul
From: hadi motamedi on
> Why did you ask for the partition that represents the whole physical
> disk, and then skip parts of it?  Doesn't qemu want the actual image
> of the physical disk, rather than some piece of it?
>
> The parts of the physical disk you skipped are often the most important
> for bootable drives.  The first few sectors contain the disk label or
> boot block with map of which sectors belong to what paritions.
Thank you for your reply. I actually collected whole of the disk
info , as the followings :
#dd if=/dev/dsk/c0t0d0s2 bs=512 count=1966080 |gzip -c>/tmp/
solaris8.disk-pt1.gz
#dd if=/dev/dsk/c0t0d0s2 bs=512 count=1966080 skip=3932160 |gzip -c>/
tmp/solaris8.disk-pt2.gz
#dd if=/dev/dsk/c0t0d0s2 bs=512 count=1966080 skip=5898240 |gzip -c>/
tmp/solaris8.disk-pt3.gz
#dd if=/dev/dsk/c0t0d0s2 bs=512 count=1966080 skip=7864320 |gzip -c>/
tmp/solaris8.disk-pt4.gz
And so on.
After about forty steps of iteration , the 'dd' didn't get through
anymore.
So I decompressed all of them and concatenate :
C:\copy /b solaris8.disk-pt1+solaris8.disk-pt2+solaris8.disk-pt3+.....
+solaris8.disk-pt39 solaris8.disk
At the end, the 'solaris8.disk' file size is about 38GB. As you see, I
have collected whole of the disk. But I don't know why this
'solaris8.disk' image is not bootable on my qemu-system-sparc?Please
comment.


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.
Thank you for your reply. Can you please provide me on details of your
procedure?