From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mfcy1-0007O6-4H for qemu-devel@nongnu.org; Mon, 24 Aug 2009 13:04:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mfcxw-0007N8-NH for qemu-devel@nongnu.org; Mon, 24 Aug 2009 13:04:24 -0400 Received: from [199.232.76.173] (port=54999 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mfcxw-0007Mz-Ec for qemu-devel@nongnu.org; Mon, 24 Aug 2009 13:04:20 -0400 Received: from mail-px0-f196.google.com ([209.85.216.196]:65333) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mfcxv-0006dJ-Uf for qemu-devel@nongnu.org; Mon, 24 Aug 2009 13:04:20 -0400 Received: by pxi34 with SMTP id 34so5265299pxi.4 for ; Mon, 24 Aug 2009 10:04:16 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4A9245EA.9030108@redhat.com> References: <4A9245EA.9030108@redhat.com> Date: Tue, 25 Aug 2009 00:04:16 +0700 Message-ID: Subject: Re: [Qemu-devel] diskimage HOWTO From: Mulyadi Santosa Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: buildroot@busybox.net, qemu-devel@nongnu.org, Bai Shuwei On Mon, Aug 24, 2009 at 2:48 PM, Kevin Wolf wrote: > Bai Shuwei schrieb: >> Hi, All: >> =A0 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 >> =A0 =A0buildroot-2009.05/docs/README.diskimage >> , >> but failure. >> >> =A0 =A0The bellow is my process. >> >> =A0 =A0# dd if=3D/dev/zero of=3Dimg bs=3D4096 count=3D16384 >> =A0 =A0# echo -e "n\np\n1\n\nw\n" | fdisk -C 16065 -H 255 -S 63 ./img >> =A0 =A0# 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. --=20 regards, Mulyadi Santosa Freelance Linux trainer blog: the-hydra.blogspot.com