<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.30.1">
</HEAD>
<BODY>
On Fri, 2010-06-11 at 17:28 -0400, Alex wrote:
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        Hi,
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    &nbsp;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        Could you please post the layout of you disk, taken with fdisk in expert mode: fdisk systmp-kvm.raw; x (for expert mode) and then p?<BR>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Expert command (m for help): p
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Disk systmp-kvm.raw: 255 heads, 63 sectors, 0 cylinders
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Nr AF &nbsp;Hd Sec &nbsp;Cyl &nbsp;Hd Sec &nbsp;Cyl &nbsp; &nbsp; Start &nbsp; &nbsp; &nbsp;Size ID
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    &nbsp;1 80 &nbsp; 0 &nbsp; 2 &nbsp; &nbsp;0 254 &nbsp;63 &nbsp; &nbsp;2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp; &nbsp;48194 83
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    &nbsp;2 00 &nbsp; 0 &nbsp; 1 &nbsp; &nbsp;3 254 &nbsp;63 1023 &nbsp; &nbsp; &nbsp;48195 &nbsp; 83827170 85
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Partition 2 has different physical/logical endings:
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    &nbsp;&nbsp; &nbsp; phys=(1023, 254, 63) logical=(5220, 254, 63)
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    &nbsp;3 00 &nbsp; 0 &nbsp; 0 &nbsp; &nbsp;0 &nbsp; 0 &nbsp; 0 &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 00
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    &nbsp;4 00 &nbsp; 0 &nbsp; 0 &nbsp; &nbsp;0 &nbsp; 0 &nbsp; 0 &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 00
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    &nbsp;5 00 &nbsp; 0 &nbsp; 2 &nbsp; &nbsp;3 254 &nbsp;63 1023 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 &nbsp; 81931499 83
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    &nbsp;6 00 254 &nbsp;63 1023 254 &nbsp;63 1023 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1 &nbsp; &nbsp;1895669 82
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Thanks again!
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Best,
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Alex
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BR>
<BR>
OK, here's your problem: the offset option for losetup was not properly calculated.<BR>
<BR>
<BR>
take a look here:<BR>
<BR>
<BR>
<A HREF="http://www.campworld.net/thewiki/pmwiki.php/Linux/DiskImagesHOWTO">http://www.campworld.net/thewiki/pmwiki.php/Linux/DiskImagesHOWTO</A><BR>
<BR>
According to this, in your case the offset should be 1x1024=1024.<BR>
<BR>
<BR>
<BR>
<BR>
You can give it a try.
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
<BR>
<BR>
Calin<BR>
<BR>
Key fingerprint = 37B8 0DA5 9B2A 8554 FB2B 4145 5DC1 15DD A3EF E857<BR>
<BR>
=================================================<BR>
Go slowly to the entertainments of thy friends, but quickly to their misfortunes. -- Chilo
</TD>
</TR>
</TABLE>
</BODY>
</HTML>