From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfUKL-000465-89 for qemu-devel@nongnu.org; Mon, 24 Aug 2009 03:50:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfUKG-00040S-L5 for qemu-devel@nongnu.org; Mon, 24 Aug 2009 03:50:52 -0400 Received: from [199.232.76.173] (port=33234 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfUKG-000403-Fu for qemu-devel@nongnu.org; Mon, 24 Aug 2009 03:50:48 -0400 Received: from mx20.gnu.org ([199.232.41.8]:51593) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MfUKF-0005zM-Vv for qemu-devel@nongnu.org; Mon, 24 Aug 2009 03:50:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MfUKE-00032r-Di for qemu-devel@nongnu.org; Mon, 24 Aug 2009 03:50:46 -0400 Message-ID: <4A9245EA.9030108@redhat.com> Date: Mon, 24 Aug 2009 09:48:58 +0200 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] diskimage HOWTO References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bai Shuwei Cc: buildroot@busybox.net, qemu-devel@nongnu.org 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 > , > 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. But probably you'll want to use kpartx which takes an image and creates device nodes for each partition. Kevin