From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Q0IRp-0002U5-JC for mharc-grub-devel@gnu.org; Thu, 17 Mar 2011 15:01:25 -0400 Received: from [140.186.70.92] (port=56911 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0IRn-0002U0-MB for grub-devel@gnu.org; Thu, 17 Mar 2011 15:01:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0IRm-0002d0-AO for grub-devel@gnu.org; Thu, 17 Mar 2011 15:01:23 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:61931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0IRl-0002cw-W9 for grub-devel@gnu.org; Thu, 17 Mar 2011 15:01:22 -0400 Received: by wyf19 with SMTP id 19so3434959wyf.0 for ; Thu, 17 Mar 2011 12:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:x-enigmail-version:content-type; bh=gS2U3w3hHvgrUqfhYTSajO7whS9fS0X2BEhwbQC2hdc=; b=klAMhKY3UGbGZ2WWmmd3rTT5zafVBzf6VaNUp35qwPke9vhTJ2nDupsNBg/QBCHkq4 EPZ67mFoQcdpNo1JVoEUcxZxRhx87i/vYJRetS3Og6qwkY2X7hOd0ZLXR8ct/2sW9zuk m1arRekApYqwU0PVCCZTAbByQzqr0l8VvC8Uc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=F35rFQVyAWIxKpoY511pyiGDHcbrhadNGEQMr7rBeXbbibjqUBHn2ZYde7aQNh+SsK Hk+fI+zA5WWb1K6Dh6KG5AVt2Wkk/XuMVvudaaTW2SA348FilxXkFBnV646iE+JCVqo4 72q5HLBRLOTHoVf/btwRzjhuPxY2qrWf9f+Jk= Received: by 10.227.140.159 with SMTP id i31mr114734wbu.166.1300388480861; Thu, 17 Mar 2011 12:01:20 -0700 (PDT) Received: from debian.x201.phnet (gprs55.swisscom-mobile.ch [193.247.250.55]) by mx.google.com with ESMTPS id bd8sm832021wbb.18.2011.03.17.12.01.18 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 17 Mar 2011 12:01:19 -0700 (PDT) Message-ID: <4D825A75.1000507@gmail.com> Date: Thu, 17 Mar 2011 20:01:09 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110303 Icedove/3.0.11 MIME-Version: 1.0 To: grub-devel@gnu.org References: <4D80D75C.9080007@gmail.com> <20110316173216.GE343@caffeine.csclub.uwaterloo.ca> <4D810D54.1020008@cfl.rr.com> <20110316192358.GG343@caffeine.csclub.uwaterloo.ca> <20110316200908.GH343@caffeine.csclub.uwaterloo.ca> <4D811B40.5090302@gmail.com> <20110316220021.GI343@caffeine.csclub.uwaterloo.ca> <4D8136A5.10502@gmail.com> <20110317160924.GL343@caffeine.csclub.uwaterloo.ca> <4D8236FF.1060001@gmail.com> <20110317184014.GM343@caffeine.csclub.uwaterloo.ca> In-Reply-To: <20110317184014.GM343@caffeine.csclub.uwaterloo.ca> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig4DBEF995F3304619E3D44FCA" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.169 Subject: Re: How to debug 'out of disk' error. X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2011 19:01:24 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4DBEF995F3304619E3D44FCA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 17.03.2011 19:40, Lennart Sorensen wrote: > On Thu, Mar 17, 2011 at 05:29:51PM +0100, Vladimir '=CF=86-coder/phcode= r' Serbinenko wrote: > =20 >> On 17.03.2011 17:09, Lennart Sorensen wrote: >> =20 >>> On Wed, Mar 16, 2011 at 11:16:05PM +0100, Vladimir '=CF=86-coder/phco= der' Serbinenko wrote: >>> =20 >>> =20 >>>> It's not really a fixup. Correct return on no error is CF=3D0 AH=3D0= =2E Some >>>> BIOSes in some other functions returned CF=3D0, AH!=3D 0 on no error= so it >>>> was a wild guess. >>>> =20 >>>> =20 >>>>> Failed int13_ext call: ah=3D42, drive=3D80, dap=3D 6fe00 returned= eax=3D8000 >>>>> =20 >>>>> =20 >>>>> =20 >>>> Error 0x80 according to >>>> http://www.delorie.com/djgpp/doc/rbinter/it/34/2.html means timeout.= >>>> Following code would retry on timeout: >>>> =3D=3D=3D modified file 'grub-core/disk/i386/pc/biosdisk.c' >>>> --- grub-core/disk/i386/pc/biosdisk.c 2011-01-04 14:42:47 +0000 >>>> +++ grub-core/disk/i386/pc/biosdisk.c 2011-03-16 22:13:12 +0000 >>>> @@ -72,6 +72,8 @@ >>>> grub_biosdisk_rw_int13_extensions (int ah, int drive, void *dap) >>>> { >>>> struct grub_bios_int_registers regs; >>>> + int tries =3D 4; >>>> + retry: >>>> regs.eax =3D ah << 8; >>>> /* compute the address of disk_address_packet */ >>>> regs.ds =3D (((grub_addr_t) dap) & 0xffff0000) >> 4; >>>> @@ -80,6 +82,16 @@ >>>> regs.flags =3D GRUB_CPU_INT_FLAGS_DEFAULT; >>>> =20 >>>> grub_bios_interrupt (0x13, ®s); >>>> + if (!(regs.flags & GRUB_CPU_INT_FLAGS_CARRY)) >>>> + return 0; >>>> + >>>> + if (((regs.eax >> 8) & 0xff) =3D=3D 0x80 && tries) >>>> + { >>>> + grub_millisleep (10); >>>> + tries--; >>>> + goto retry; >>>> + } >>>> + >>>> return (regs.eax >> 8) & 0xff; >>>> } >>>> =20 >>>> =20 >>> So that didn't make any difference to it. >>> >>> It just keeps returning 0x8000 in eax on every retry. >>> >>> =20 >>> =20 >> Another wild guess: >> @@ -506,6 +520,8 @@ get_safe_sectors (grub_disk_addr_t secto >> grub_size_t size; >> grub_uint32_t offset; >> =20 >> + return 1; >> + >> /* OFFSET =3D SECTOR % SECTORS */ >> grub_divmod64 (sector, sectors, &offset); >> =20 > No go either. > > =20 Can you dump complete drp before and after every call? (19:52:44) phcoder: cjwatson: may the Lennart's last message be caused by 4K sectors?(idk if he has 512B or 4K sectors) (19:56:14) cjwatson: possible; he can find out by printing drp->bytes_per_sector after the call to grub_biosdisk_get_diskinfo_int13_extensions in grub-core/disk/i386/pc/biosdisk.c (19:56:25) cjwatson: at least find out what the BIOS thinks > Here is what I see with some more debugging: > > [snip] > int13_ext call: ah=3D42, drive=3D80, dap=3D 6fe00 (len=3D16 rsvd=3D0 = blks=3D1 buf=3D1744830464 sec=3D2078) > int13_ext call: ah=3D42, drive=3D80, dap=3D 6fe00 (len=3D16 rsvd=3D0 = blks=3D1 buf=3D1744830464 sec=3D2079) > int13_ext call: ah=3D42, drive=3D80, dap=3D 6fe00 (len=3D16 rsvd=3D0 = blks=3D1 buf=3D1744830464 sec=3D72091664) > failed int13_ext call: ah=3D42, drive=3D80, dap=3D 6fe00 returned eax= =3D8000 > error: hd0 out of disk. > Entering rescue mode... > grub rescue> > > Now it has no excuse for failing a call for sector 72091664 when the > drive has 156000000 or so sectors. > > I imagine if I made a small boot partition (less than 8G), the stupid > thing would boot fine, but that's not acceptable on a brand new design.= > I am going to try resizing the partition as a test. > > =20 --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig4DBEF995F3304619E3D44FCA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF0EAREKAAYFAk2CWnUACgkQNak7dOguQgmXBwD3f+xlxnr0H4AIsQ8IweftWxkF sKo3NaKAviMe7TRopAEAu0/t0ofW5oOHu0cQ519ZYNEiTmIKILeaz8/1CUlSWfE= =LPN/ -----END PGP SIGNATURE----- --------------enig4DBEF995F3304619E3D44FCA--