Disk geometry
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
Quoted 49 lines · Girish V
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 tracksWhen 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 bytesDevice 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/hdafrom *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 bytesDevice Boot Start End Blocks Id System
/dev/hda1* 63 10490444 5245191 83 Linux/dev/hda210490445 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
Quoted 6 lines
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.
Sorry - I should have mentioned that my disc image is indeed in raw format. Girish
Quoted 73 lines · C.W. Betts
Quoted 3 lines · Girish V
Hello,
I am trying to use a disk image which I created using qemu for Bochs. I
am
Quoted 1 line
having some issues in figuring out the geometry of the disk. Bochs
requires
Quoted 7 lines
that I specify
a) the number of cylinders
b) the number of heads
c) the number of tracksWhen I do fdisk -lu fc5_3.0.2.img I get
---------------------------------------------------------------------------
Quoted 1 line
---------------------
last_lba(): I don't know how to handle files withmode
Quoted 4 lines
81a4
You must set cylinders.
You can do this from the extra functions menu.Quoted 8 lines
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 bytesDevice 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/
Quoted 2 lines
Solaris
---------------------------------------------------------------------------
Quoted 3 lines
---------------------
When I boot up the disk using qemu and do fdisk -lu
/dev/hdafrom*inside
Quoted 2 lines
qemu*, I get
---------------------------------------------------------------------------
Quoted 6 lines
--------------------- Disk
/dev/hda: 6442 MB, 6442450944 bytes 255 heads, 63 sectors/track, 783 cylinders, total 12582912 sectors Units = sectors of 1 * 512 = 512 bytesDevice Boot Start End Blocks Id
System
Quoted 2 lines
/dev/hda1* 63 10490444 5245191 83 Linux/dev/hda210490445 12578894 1044225 82 Linux swap/
Quoted 2 lines
Solaris
---------------------------------------------------------------------------
Quoted 8 lines
---------------------
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 geometryQuoted 6 lines
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.