From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mfn8C-0005Kb-5g for qemu-devel@nongnu.org; Mon, 24 Aug 2009 23:55:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mfn87-0005KP-OO for qemu-devel@nongnu.org; Mon, 24 Aug 2009 23:55:35 -0400 Received: from [199.232.76.173] (port=52769 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mfn87-0005KM-Hk for qemu-devel@nongnu.org; Mon, 24 Aug 2009 23:55:31 -0400 Received: from mail-yw0-f204.google.com ([209.85.211.204]:58290) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mfn87-0003cI-1C for qemu-devel@nongnu.org; Mon, 24 Aug 2009 23:55:31 -0400 Received: by ywh42 with SMTP id 42so4235934ywh.30 for ; Mon, 24 Aug 2009 20:55:30 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <4A9245EA.9030108@redhat.com> Date: Tue, 25 Aug 2009 11:55:29 +0800 Message-ID: Subject: Re: [Qemu-devel] diskimage HOWTO From: Bai Shuwei Content-Type: multipart/alternative; boundary=001636eee6053445e10471ef4ea1 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mulyadi Santosa Cc: Kevin Wolf , buildroot@busybox.net, qemu-devel@nongnu.org --001636eee6053445e10471ef4ea1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 8/25/09, Mulyadi Santosa wrote: > > On Mon, Aug 24, 2009 at 2:48 PM, Kevin Wolf wrote: > > Bai Shuwei schrieb: > >> Hi, All: > >> I want to build a test enviroment with QEMU and buildroot. But I don't > >> know how to build the diskimage which same as linux-0.2.img offered by > >> BUILD-ROOT. I build the diskimage following the > >> buildroot-2009.05/docs/README.diskimage > >> < > http://192.168.1.102/crosscopile/buildroot-2009.05/docs/README.diskimage>, > >> but failure. > >> > >> The bellow is my process. > >> > >> # dd if=/dev/zero of=img bs=4096 count=16384 > >> # echo -e "n\np\n1\n\nw\n" | fdisk -C 16065 -H 255 -S 63 ./img > >> # losetup -o 512 /dev/loop0 img > > > > This looks like the wrong offset. The first partition usually starts at > > sector 63. > > I agree, perhaps Bai should instead use 32256. > > From "man losetup": > -o, --offset offset > The data start is moved offset bytes into the specified file > or > device > > So it has to be converted into bytes. > > Bai, that could be the answer. Please kindly try it. Hi, all! Thanks! Yes, It's work now. I try 32256! -- > regards, > > Mulyadi Santosa > Freelance Linux trainer > blog: the-hydra.blogspot.com > -- Love other people, as same as love yourself! Don't think all the time, do it by your hands! Personal URL: http://dslab.lzu.edu.cn:8080/members/baishw/ E-Mail: baishuwei@gmail.com or baishuwei@dslab.lzu.edu.cn --001636eee6053445e10471ef4ea1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 8/25/09, = Mulyadi Santosa <mulyad= i.santosa@gmail.com> wrote:
On Mon, Aug 24, 2009 at 2:48 PM,= Kevin Wolf<kwolf@redhat.com>= wrote:
> Bai Shuwei schrieb:
>> Hi, All:
>>=C2=A0=C2=A0 I wan= t to build a test enviroment with QEMU and buildroot. But I don't
&g= t;> know how to build the diskimage which same as linux-0.2.img offered = by
>> BUILD-ROOT. I build the diskimage following the
>>=C2=A0= =C2=A0=C2=A0=C2=A0buildroot-2009.05/docs/README.diskimage
>> <<= a href=3D"http://192.168.1.102/crosscopile/buildroot-2009.05/docs/README.di= skimage">http://192.168.1.102/crosscopile/buildroot-2009.05/docs/README.dis= kimage>,
>> but failure.
>>
>>=C2=A0=C2=A0=C2=A0=C2=A0The be= llow is my process.
>>
>>=C2=A0=C2=A0=C2=A0=C2=A0# dd if= =3D/dev/zero of=3Dimg bs=3D4096 count=3D16384
>>=C2=A0=C2=A0=C2=A0= =C2=A0# echo -e "n\np\n1\n\nw\n" | fdisk -C 16065 -H 255 -S 63 ./= img
>>=C2=A0=C2=A0=C2=A0=C2=A0# losetup -o 512 /dev/loop0 img
>
= > This looks like the wrong offset. The first partition usually starts a= t
> sector 63.

I agree, perhaps Bai should instead use 32256.<= br>
From "man losetup":
-o, --offset offset
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 The=C2=A0=C2=A0data start is moved offset bytes into = the specified file or
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 device

So it has to be converted into bytes= .

Bai, that could be the answer. Please kindly try it.
=C2=A0
Hi, all!
=C2=A0=C2=A0 Thanks!
=C2=A0=C2=A0 Yes, It's work now. I try 32256!

--
regards,

Mulyadi Sa= ntosa
Freelance Linux trainer
blog: the-hydra.blogspot.com



--
Love other people, as s= ame as love yourself!
Don't think all the time, do it by your hands!=

Personal URL: http://dslab.lzu.edu.cn:8080/members/baishw/
E-Mail: baishuwei@gmail.com or <= a href=3D"mailto:baishuwei@dslab.lzu.edu.cn">baishuwei@dslab.lzu.edu.cn=
--001636eee6053445e10471ef4ea1--