From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mm2V3-0000B7-3e for qemu-devel@nongnu.org; Fri, 11 Sep 2009 05:33:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mm2Uy-00007N-8f for qemu-devel@nongnu.org; Fri, 11 Sep 2009 05:33:00 -0400 Received: from [199.232.76.173] (port=58316 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mm2Ux-00007G-Uy for qemu-devel@nongnu.org; Fri, 11 Sep 2009 05:32:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4502) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mm2Ux-0003OR-Iw for qemu-devel@nongnu.org; Fri, 11 Sep 2009 05:32:55 -0400 Date: Fri, 11 Sep 2009 10:32:17 +0100 From: "Richard W.M. Jones" Subject: Re: [Qemu-devel] diskimage HOWTO Message-ID: <20090911093217.GA2342@amd.home.annexia.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Mon, Aug 24, 2009 at 01:39:53PM +0800, Bai Shuwei wrote: > 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 > # mkfs.ext2 -m0 -Lslash /dev/loop0 > # mount -oloop,rw /dev/loop0 fs/ You may find that libguestfs is better for this sort of thing. It doesn't need you to be root for a start. You'd do something like: $ guestfish <