<br><br>
<div><span class="gmail_quote">On 8/24/09, <b class="gmail_sendername">Kevin Wolf</b> <<a href="mailto:kwolf@redhat.com">kwolf@redhat.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Bai Shuwei schrieb:<br>> Hi, All:<br>>   I want to build a test enviroment with QEMU and buildroot. But I don't<br>
> know how to build the diskimage which same as linux-0.2.img offered by<br>> BUILD-ROOT. I build the diskimage following the<br>>    buildroot-2009.05/docs/README.diskimage<br>> <<a href="http://192.168.1.102/crosscopile/buildroot-2009.05/docs/README.diskimage">http://192.168.1.102/crosscopile/buildroot-2009.05/docs/README.diskimage</a>>,<br>
> but failure.<br>><br>>    The bellow is my process.<br>><br>>    # dd if=/dev/zero of=img bs=4096 count=16384<br>>    # echo -e "n\np\n1\n\nw\n" | fdisk -C 16065 -H 255 -S 63 ./img<br>>    # losetup -o 512 /dev/loop0 img<br>
<br>This looks like the wrong offset. The first partition usually starts at<br>sector 63. But probably you'll want to use kpartx which takes an image<br>and creates device nodes for each partition.</blockquote>
<div> </div>
<div>This the result </div>
<div>
<p>qemu/xtratum# fdisk -ul img</p>
<p>You must set cylinders.<br>You can do this from the extra functions menu.</p>
<p>Disk rootfs: 0 MB, 0 bytes<br>255 heads, 63 sectors/track, 0 cylinders, total 0 sectors<br>Units = sectors of 1 * 512 = 512 bytes<br>Disk identifier: 0x545a5c26</p>
<p> Device Boot      Start         End      Blocks   Id  System<br>img1              63   258084224   129042081   83  Linux<br>Partition 1 has different physical/logical endings:<br>     phys=(1023, 254, 63) logical=(16064, 254, 63)</p>
</div><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Kevin<br></blockquote></div><br><br clear="all"><br>-- <br>Love other people, as same as love yourself!<br>
Don't think all the time, do it by your hands!<br><br>Personal URL: <a href="http://dslab.lzu.edu.cn:8080/members/baishw/">http://dslab.lzu.edu.cn:8080/members/baishw/</a><br>E-Mail: <a href="mailto:baishuwei@gmail.com">baishuwei@gmail.com</a> or <a href="mailto:baishuwei@dslab.lzu.edu.cn">baishuwei@dslab.lzu.edu.cn</a><br>