Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Gh0SW-0001ft-VY for mharc-grub-devel@gnu.org; Mon, 06 Nov 2006 04:08:01 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gh0SS-0001dl-Ug for grub-devel@gnu.org; Mon, 06 Nov 2006 04:07:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gh0SO-0001b4-LO for grub-devel@gnu.org; Mon, 06 Nov 2006 04:07:56 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gh0SO-0001am-FI for grub-devel@gnu.org; Mon, 06 Nov 2006 04:07:52 -0500 Received: from [66.249.82.231] (helo=wx-out-0506.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gh0SN-0002SB-VO for grub-devel@gnu.org; Mon, 06 Nov 2006 04:07:52 -0500 Received: by wx-out-0506.google.com with SMTP id i26so984644wxd for ; Mon, 06 Nov 2006 01:07:51 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=Qcw4hWVP8Q3yfJVlmSvarrWEcwF9oliL/kNy8PM+Amk1Q7xVV70KPhtU4SeM9a7J/B1sKyAInlSsjUv8aetV1S1NKPNMy/aVMSQuoh+KtmeeHbhPFCS3N9Vd6y01vSeI6/BdN+JVH/WeaB1Ul3hK2cL8mtgLDqYq7GXViwWlTiM= Received: by 10.90.29.2 with SMTP id c2mr981107agc.1162804071038; Mon, 06 Nov 2006 01:07:51 -0800 (PST) Received: by 10.90.31.7 with HTTP; Mon, 6 Nov 2006 01:07:50 -0800 (PST) Message-ID: Date: Mon, 6 Nov 2006 17:07:51 +0800 From: "Zhixu Liu" To: grub-devel@gnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_32681_22439093.1162804071015" Subject: does disk geometry depend on partition table? X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Nov 2006 09:07:57 -0000 ------=_Part_32681_22439093.1162804071015 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_32681_22439093.1162804071015 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_32681_22439093.1162804071015--