All of lore.kernel.org
 help / color / mirror / Atom feed
* does disk geometry depend on partition table?
@ 2006-11-06  9:07 Zhixu Liu
  2006-11-14  3:40 ` Hollis Blanchard
  0 siblings, 1 reply; 4+ messages in thread
From: Zhixu Liu @ 2006-11-06  9:07 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1695 bytes --]

Hi, all,

We encounter a strange problem recently. In short, following is the output
of geometry of
hd0 in situation with correct partition in disk and without partition in
disk.

When with correct partition table in disk hd0:
    grub> geometry (hd0)
    drive 0x80: C/H/S = 500/16/32, The number of sectors = 256000, LBA

When without partition table in disk hd0:
    grub> geometry (hd0)
    drive 0x80: C/H/S = 126/32/63, The number of sectors = 256000, LBA

The former is correct! However, it's strange that the disk geometry depend
on the partition table?!
Maybe this is due to a buggy BIOS implementation. We also check the code in
disk/i386/pc/biosdisk.c
or (stage2/bios.c) for grub-0.97, and for code in function
grub_biosdisk_open (or get_diskinfo in grub-0.97),
there is a standard int13 check of disk after check with ext int13,

  if(drive & 0x80) {
     ...
    version = grub_biosdisk_check_int13_extension();
      if(version) {
         grub_biosdisk_get_diskinfo_int13_extensions();
      }
   }

   grub_biosdisk_get_diskinfo_standard()

We're wondering does it really need to call
grub_biosdisk_get_diskinfo_standard() again if we have get the necessary
information
from ext int13? I think we call the later only if ext int13 failed for some
reason. Especially in our case the code should be .

  if(drive & 0x80) {
     ...
    version = grub_biosdisk_check_int13_extension();
      if(version) {
         grub_biosdisk_get_diskinfo_int13_extensions();
      } else {
         grub_biosdisk_get_diskinfo_standard()
      }
   }

and it do works!

Of course, maybe there are some details I'm not clear. Does anyone encounter
this problem before?

Best regards!
-- 
Zhixu Liu

[-- Attachment #2: Type: text/html, Size: 2181 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-11-14 16:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-06  9:07 does disk geometry depend on partition table? Zhixu Liu
2006-11-14  3:40 ` Hollis Blanchard
2006-11-14  5:03   ` Zhixu Liu
2006-11-14 16:36     ` Hollis Blanchard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.