From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JmXLC-000646-FQ for qemu-devel@nongnu.org; Thu, 17 Apr 2008 12:52:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JmXLB-00063u-Nw for qemu-devel@nongnu.org; Thu, 17 Apr 2008 12:52:06 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JmXLB-00063r-Kn for qemu-devel@nongnu.org; Thu, 17 Apr 2008 12:52:05 -0400 Received: from gv-out-0910.google.com ([216.239.58.190]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JmXLA-0003zl-Rm for qemu-devel@nongnu.org; Thu, 17 Apr 2008 12:52:05 -0400 Received: by gv-out-0910.google.com with SMTP id n40so24313gve.36 for ; Thu, 17 Apr 2008 09:52:03 -0700 (PDT) Message-ID: <2122f0920804170952h13f39196ma8df61faf4e2819c@mail.gmail.com> Date: Thu, 17 Apr 2008 12:52:01 -0400 From: "Girish V" Subject: Re: [Qemu-devel] Disk geometry In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6449_7855054.1208451121983" References: <2122f0920804170755s58e54f46na7edb821b5054b68@mail.gmail.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "C.W. Betts" Cc: qemu-devel@nongnu.org ------=_Part_6449_7855054.1208451121983 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Sorry - I should have mentioned that my disc image is indeed in raw format. Girish On Thu, Apr 17, 2008 at 12:42 PM, C.W. Betts wrote: > On Thursday 17 April 2008 08:55:17 am Girish V wrote: > > Hello, > > > > I am trying to use a disk image which I created using qemu for Bochs. I > am > > having some issues in figuring out the geometry of the disk. Bochs > requires > > that I specify > > a) the number of cylinders > > b) the number of heads > > c) the number of tracks > > > > When I do fdisk -lu fc5_3.0.2.img I get > > > --------------------------------------------------------------------------- > >--------------------- last_lba(): I don't know how to handle files with > mode > > 81a4 > > You must set cylinders. > > You can do this from the extra functions menu. > > > > Disk fc5_3.0.2.img: 0 MB, 0 bytes > > 255 heads, 63 sectors/track, 0 cylinders, total 0 sectors > > Units = sectors of 1 * 512 = 512 bytes > > > > > > Device Boot Start End Blocks Id System > > fc5_3.0.2.img1 * 63 10490444 5245191 83 Linux > > fc5_3.0.2.img2 10490445 12578894 1044225 82 Linux swap > / > > Solaris > > > --------------------------------------------------------------------------- > >--------------------- > > > > When I boot up the disk using qemu and do fdisk -lu /dev/hda from > *inside > > qemu*, I get > > > --------------------------------------------------------------------------- > >--------------------- Disk /dev/hda: 6442 MB, 6442450944 bytes > > 255 heads, 63 sectors/track, 783 cylinders, total 12582912 sectors > > Units = sectors of 1 * 512 = 512 bytes > > > > > > Device Boot Start End Blocks Id > System > > /dev/hda1 * 63 10490444 5245191 83 Linux > > /dev/hda2 10490445 12578894 1044225 82 Linux swap > / > > Solaris > > > --------------------------------------------------------------------------- > >--------------------- > > > > > > I tried using the geometry as seen inside qemu (783/255/63) in bochs but > > bochs fails with the message > > [HD ] ata0-0 disk size doesn't match specified geometry > > > > > > Any ideas how I can use this disk. The only other option is to create a > > disk using bochs from scratch - which I would like to avoid. > > > > Any help is appreciated. > > > > Girish > > I think, in order for Bochs to use it, the disk image either needs to be > in RAW or bochs format. You can covert it using qemu-img. > You can also find out the format by doing 'qemu-img info' then the path to > the disk image. > ------=_Part_6449_7855054.1208451121983 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Sorry - I should have mentioned that my disc image is indeed in raw format.
Girish


On Thu, Apr 17, 2008 at 12:42 PM, C.W. Betts <computers57@hotmail.com> wrote:
On Thursday 17 April 2008 08:55:17 am Girish V wrote:
> Hello,
>
> I am trying to use a disk image which I created using qemu for Bochs. I am
> having some issues in figuring out the geometry of the disk. Bochs requires
> that I specify
> a) the number of cylinders
> b) the number of heads
> c) the number of tracks
>
> When I do fdisk -lu fc5_3.0.2.img I get
> ---------------------------------------------------------------------------
>--------------------- last_lba(): I don't know how to handle files with mode
> 81a4
> You must set cylinders.
> You can do this from the extra functions menu.
>
> Disk fc5_3.0.2.img: 0 MB, 0 bytes
> 255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
> Units = sectors of 1 * 512 = 512 bytes
>
>
>         Device Boot      Start         End      Blocks   Id  System
> fc5_3.0.2.img1   *          63    10490444     5245191   83  Linux
> fc5_3.0.2.img2        10490445    12578894     1044225   82  Linux swap /
> Solaris
> ---------------------------------------------------------------------------
>---------------------
>
> When I boot up the disk using qemu and do fdisk -lu /dev/hda from *inside
> qemu*, I get
> ---------------------------------------------------------------------------
>--------------------- Disk /dev/hda: 6442 MB, 6442450944 bytes
> 255 heads, 63 sectors/track, 783 cylinders, total 12582912 sectors
> Units = sectors of 1 * 512 = 512 bytes
>
>
>         Device Boot      Start             End       Blocks   Id     System
> /dev/hda1     *               63    10490444     5245191   83     Linux
> /dev/hda2           10490445    12578894    1044225    82     Linux swap /
> Solaris
> ---------------------------------------------------------------------------
>---------------------
>
>
> I tried using the geometry as seen inside qemu (783/255/63) in bochs but
> bochs fails with the message
> [HD   ] ata0-0 disk size doesn't match specified geometry
>
>
> Any ideas how I can use this disk. The only other option is to create a
> disk using bochs from scratch - which I would like to avoid.
>
> Any help is appreciated.
>
> Girish

I think, in order for Bochs to use it, the disk image either needs to be in RAW or bochs format.  You can covert it using qemu-img.
You can also find out the format by doing 'qemu-img info' then the path to the disk image.

------=_Part_6449_7855054.1208451121983--