From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQCU0-0008AU-K3 for qemu-devel@nongnu.org; Wed, 19 Mar 2014 05:08:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQCTt-0005aV-Ca for qemu-devel@nongnu.org; Wed, 19 Mar 2014 05:08:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQCTt-0005aN-0M for qemu-devel@nongnu.org; Wed, 19 Mar 2014 05:08:13 -0400 Date: Wed, 19 Mar 2014 10:08:08 +0100 From: Kevin Wolf Message-ID: <20140319090808.GB3263@noname.str.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Qcow file does not mount List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Atlas Khan Cc: qemu-devel Am 19.03.2014 um 07:06 hat Atlas Khan geschrieben: > I am doing a task in which I have to enter some data which is in a dire= ctory in > qcow/qcow2 file. The thing I want to ask is that how can I do this if I= have > boot looder or =A0guest system in a directory rather than in iso file. = I try to > make a qcow image and mount it on my file system.=A0 > Process for mounting which i m following is=A0 >=20 > $ modprobe nbd max_part=3D63 > $ qemu-nbd -c /dev/nbd0 image.img > $ mount /dev/nbd0p1 /mnt/image >=20 > I have a qcow file of malta mips. If run these commands on malta mips q= cow > file, It mount it. But if i try to mount a qcow file created by followi= ng > command >=20 > qemu-img create -f qcow2 test.qcow2 10G >=20 > it give following error >=20 > mount: special device /dev/nbd0p1 does not exist >=20 > can any one help me how can I write some data in qcow or mount my qcow = file. A new image is unpartitioned. You need to use something like fdisk on /dev/nbd0 first in order to create the partitions. After that, you may or may not need to restart qemu-nbd, not completely sure. Kevin