From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Pzz0r-0000KB-T7 for mharc-grub-devel@gnu.org; Wed, 16 Mar 2011 18:16:17 -0400 Received: from [140.186.70.92] (port=38630 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pzz0p-0000Jo-13 for grub-devel@gnu.org; Wed, 16 Mar 2011 18:16:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pzz0n-00043J-Hx for grub-devel@gnu.org; Wed, 16 Mar 2011 18:16:14 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:46252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pzz0n-000431-CP for grub-devel@gnu.org; Wed, 16 Mar 2011 18:16:13 -0400 Received: by wyf19 with SMTP id 19so2408426wyf.0 for ; Wed, 16 Mar 2011 15:16:12 -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 :content-transfer-encoding; bh=lhiziWDM1nicnDjkAfu8FrRcl8Ogk3/OqGhuEheVNOM=; b=Jze8XiHXmNU76PsABvCvlBlgQof8jYKp3mjlxd7Ej8G49ueo8zQgLHiShcZRHCOTxh WqV4UIL8ynsPWn6aQb7ZOTEmC5jdy4xHlUN7pCFXpXpsv8pZ/5dmGrvKmZbjrPkcI+Vi kimjvZoSbg4sKAGBQ0mKOjOzzHqEaa2LMnOgU= 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 :content-transfer-encoding; b=N/8SX/GIe1s7Eu7AknKSk9Ui8aALjmp7ZcSmV6VRNJh+9ZN+zO4Ui4jZ/+XylbmPML r9Y5cZGshcdxCdr5iY8H/+II4XOQN766sGTR3UqIgFxBGV2txf+GLth2VLPmr+m65e8n ukF1+lmow5A5hb3XLSU6tj85lF0jsiOi/oHTA= Received: by 10.216.145.200 with SMTP id p50mr596177wej.79.1300313772739; Wed, 16 Mar 2011 15:16:12 -0700 (PDT) Received: from debian.x201.phnet (gprs47.swisscom-mobile.ch [193.247.250.47]) by mx.google.com with ESMTPS id n52sm841777wer.0.2011.03.16.15.16.09 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2011 15:16:11 -0700 (PDT) Message-ID: <4D8136A5.10502@gmail.com> Date: Wed, 16 Mar 2011 23:16:05 +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: The development of GNU GRUB References: <20110316151332.GC343@caffeine.csclub.uwaterloo.ca> <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> In-Reply-To: <20110316220021.GI343@caffeine.csclub.uwaterloo.ca> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 16 Mar 2011 22:16:16 -0000 On 16.03.2011 23:00, Lennart Sorensen wrote: > On Wed, Mar 16, 2011 at 09:19:12PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > >> Following may help: >> === 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 20:17:57 +0000 >> @@ -80,6 +80,9 @@ >> regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT; >> >> grub_bios_interrupt (0x13, ®s); >> + if (!(regs.flags & GRUB_CPU_INT_FLAGS_CARRY)) >> + return 0; >> + >> return (regs.eax >> 8) & 0xff; >> } >> > I now got this: > > GRUB loading. > Welcome to GRUB! > > int13_ext fixup due to CARRY flag > int13_ext fixup due to CARRY flag > int13_ext fixup due to CARRY flag > int13_ext fixup due to CARRY flag > int13_ext fixup due to CARRY flag > int13_ext fixup due to CARRY flag > int13_ext fixup due to CARRY flag > int13_ext fixup due to CARRY flag > int13_ext fixup due to CARRY flag > It's not really a fixup. Correct return on no error is CF=0 AH=0. Some BIOSes in some other functions returned CF=0, AH!= 0 on no error so it was a wild guess. > Failed int13_ext call: ah=42, drive=80, dap= 6fe00 returned eax=8000 > Error 0x80 according to http://www.delorie.com/djgpp/doc/rbinter/it/34/2.html means timeout. Following code would retry on timeout: === 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 = 4; + retry: regs.eax = ah << 8; /* compute the address of disk_address_packet */ regs.ds = (((grub_addr_t) dap) & 0xffff0000) >> 4; @@ -80,6 +82,16 @@ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT; grub_bios_interrupt (0x13, ®s); + if (!(regs.flags & GRUB_CPU_INT_FLAGS_CARRY)) + return 0; + + if (((regs.eax >> 8) & 0xff) == 0x80 && tries) + { + grub_millisleep (10); + tries--; + goto retry; + } + return (regs.eax >> 8) & 0xff; } > error: hd0 out of disk. > Entering rescue mode... > grub rescue> > > I am now using 1.99-rc1. Here is the biosdisk.c with my changes. > > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > -- Regards Vladimir 'φ-coder/phcoder' Serbinenko