From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfSHh-0000cj-GJ for qemu-devel@nongnu.org; Mon, 24 Aug 2009 01:40:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfSHb-0000cH-Qi for qemu-devel@nongnu.org; Mon, 24 Aug 2009 01:40:00 -0400 Received: from [199.232.76.173] (port=55280 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfSHb-0000cC-KT for qemu-devel@nongnu.org; Mon, 24 Aug 2009 01:39:55 -0400 Received: from mail-yx0-f188.google.com ([209.85.210.188]:64732) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MfSHb-0005xE-6R for qemu-devel@nongnu.org; Mon, 24 Aug 2009 01:39:55 -0400 Received: by yxe26 with SMTP id 26so1498843yxe.4 for ; Sun, 23 Aug 2009 22:39:53 -0700 (PDT) MIME-Version: 1.0 Date: Mon, 24 Aug 2009 13:39:53 +0800 Message-ID: From: Bai Shuwei Content-Type: multipart/alternative; boundary=001636c5c1a7b510f20471dca5a3 Subject: [Qemu-devel] diskimage HOWTO List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: buildroot@busybox.net, qemu-devel@nongnu.org --001636c5c1a7b510f20471dca5a3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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/ # cp -a ../root/* fs/ ..root is the filesystem built by BUILD-ROOT and the bzImage has been copied into root/boot/, grub.lst has been created too. # umount fs/ # losetup -d /dev/loop0 # losetup /dev/loop0 img # grub --device-map=/dev/null grub> device (hd0) img device (hd0) img grub> geometry (hd0) 16065 255 63 geometry (hd0) 16065 255 63 drive 0x80: C/H/S = 16065/255/63, The number of sectors = 258084225, img Partition num: 0, Filesystem type unknown, partition type 0x83 grub> root (hd0,0) root (hd0,0) Filesystem type unknown, partition type 0x83 grub> setup (hd0) setup (hd0) *Error 17: Cannot mount selected partition* I don't know why it is error. Gald if you can help or give me some document on it. Best Regards! Bai SHuwei -- 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 --001636c5c1a7b510f20471dca5a3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi, All:
=C2=A0=C2=A0I 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.im= g offered by BUILD-ROOT. I build the diskimage following the=C2=A0
=C2=A0=C2=A0 buildroot-2009.05/docs/README.diskimage, bu= t failure.
=C2=A0
=C2=A0=C2=A0 The bellow is my process.
=C2=A0
=C2=A0=C2=A0 # dd if=3D/dev/zero of=3Dimg bs=3D4096 count=3D16384
=C2=A0=C2=A0 #=C2=A0echo -e "n\np\n1\n\nw\n" | fdisk -C 1606= 5 -H 255 -S 63 ./img
=C2=A0=C2=A0 # losetup -o 512 /dev/loop0 img
=C2=A0=C2=A0 # mkfs.ext2 -m0 -Lslash /dev/loop0
=C2=A0=C2=A0 # mount -oloop,rw /dev/loop0 fs/
=C2=A0=C2=A0 # cp -a ../root/* fs/
..root is the filesystem built by BUILD-ROOT and the bzImage has been = copied into root/boot/, grub.lst has been created too.
=C2=A0 # umount fs/
=C2=A0 #=C2=A0losetup -d /dev/loop0
=C2=A0 # losetup /dev/loop0 img=
=C2=A0 # grub --device-map=3D/dev/null
grub> device (hd0) img
device (hd0) img
grub> geometry (hd= 0) 16065 255 63
geometry (hd0) 16065 255 63
drive 0x80: C/H/S =3D 160= 65/255/63, The number of sectors =3D 258084225,=C2=A0img
=C2=A0=C2=A0 Pa= rtition num: 0,=C2=A0 Filesystem type unknown, partition type 0x83
grub> root (hd0,0)
root (hd0,0)
=C2=A0Filesystem type unknown, par= tition type 0x83
grub> setup (hd0)
setup (hd0)

Error 17: Cannot mount selected partition

I don't know why it is error.=C2=A0Gald if=C2=A0you can help or gi= ve me some document on it.
=C2=A0
Best Regards!
=C2=A0
Bai SHuwei
=C2=A0





--
Love other people, as same as= love yourself!
Don't think all the time, do it by your hands!
Personal URL: ht= tp://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=
=C2=A0
--001636c5c1a7b510f20471dca5a3--