From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1PzxBp-0006Ch-6w for mharc-grub-devel@gnu.org; Wed, 16 Mar 2011 16:19:29 -0400 Received: from [140.186.70.92] (port=45895 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzxBn-0006CU-0x for grub-devel@gnu.org; Wed, 16 Mar 2011 16:19:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzxBl-0005DA-TM for grub-devel@gnu.org; Wed, 16 Mar 2011 16:19:26 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:44587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzxBl-0005Cj-NJ for grub-devel@gnu.org; Wed, 16 Mar 2011 16:19:25 -0400 Received: by wyf19 with SMTP id 19so2302857wyf.0 for ; Wed, 16 Mar 2011 13:19:25 -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=B48DFGQ8lE8RXM9Z0ryIWsm0OM/Rx/71uZfbkBrIf3U=; b=tTAjjNxkVNV/y9gvQm1ndAPpU3JI6wTpBTIlDfxbK5f4G1OInRcYYiStvVVHehtIx2 Dvs0TwCz+fHBMPXJ+woV/6UIhkIf403yWNXFb/3m1KFCEevAGLWC51sF3Vr9+wLm9qi2 5x7pQze65WBEZyF0Ep0N7nKSMTsewPDwXgA/A= 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=q5ZDP7fm3rh2VvCH9nuSlNGxSyolWWcLa18em//N3bhfC9a8saOrorYc6A8jQSK5KZ koaYX/5vuicRhEesbBE3ikVK796OACBmI36PJ7EtCkWUfqBFDrW27k89RGVVEifl2OIs 4D3YxX7EmWVNH/SHJ+gos5cPPMmCDyC7a//8Q= Received: by 10.227.199.68 with SMTP id er4mr442357wbb.47.1300306764678; Wed, 16 Mar 2011 13:19:24 -0700 (PDT) Received: from debian.x201.phnet (gprs47.swisscom-mobile.ch [193.247.250.47]) by mx.google.com with ESMTPS id z13sm173488wbd.29.2011.03.16.13.19.22 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2011 13:19:23 -0700 (PDT) Message-ID: <4D811B40.5090302@gmail.com> Date: Wed, 16 Mar 2011 21:19:12 +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: <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> In-Reply-To: <20110316200908.GH343@caffeine.csclub.uwaterloo.ca> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig889628E80EA7C4A9425C054D" 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 20:19:28 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig889628E80EA7C4A9425C054D Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 16.03.2011 21:09, Lennart Sorensen wrote: > On Wed, Mar 16, 2011 at 03:23:58PM -0400, Lennart Sorensen wrote: > =20 >> On Wed, Mar 16, 2011 at 03:19:48PM -0400, Phillip Susi wrote: >> =20 >>> On 3/16/2011 1:32 PM, Lennart Sorensen wrote: >>> =20 >>>> So I now have some debug info: >>>> >>>> version=3D48 >>>> total_sectors=3D156312576 C=3D16383 H=3D16 S=3D63 >>>> error: hd0,msdos1 out of disk. >>>> Entering rescue mode... >>>> grub rescue> >>>> >>>> So version is returning something, and it is actually getting the di= sk >>>> size properly. I wonder what else could cause the out of disk messa= ge >>>> then. >>>> =20 >>> What does the partition table look like? It doesn't extend beyond >>> sector 156312575 does it? >>> >>> Also I wonder about why H=3D16. It should be 255. >>> =20 >> Well usually it should, but not always. >> >> Here is the partition table: >> >> Disk /dev/sda: 80.0 GB, 80032038912 bytes >> 255 heads, 63 sectors/track, 9730 cylinders, total 156312576 sectors >> Units =3D sectors of 1 * 512 =3D 512 bytes >> Sector size (logical/physical): 512 bytes / 512 bytes >> I/O size (minimum/optimal): 512 bytes / 512 bytes >> Disk identifier: 0x0004a073 >> >> Device Boot Start End Blocks Id System >> /dev/sda1 * 2048 152350719 76174336 83 Linux >> /dev/sda2 152352766 156311551 1979393 5 Extended >> /dev/sda5 152352768 156311551 1979392 82 Linux swap / S= olaris >> =20 > I have now determined that the call to grub_biosdisk_rw_int13_extension= s > fails here: > > if (grub_biosdisk_rw_int13_extensions (cmd + 0x42, data->drive,= dap)) > { > /* Fall back to the CHS mode. */ > data->flags &=3D ~GRUB_BIOSDISK_FLAG_LBA; > disk->total_sectors =3D data->cylinders * data->heads * dat= a->sectors; > return grub_biosdisk_rw (cmd, disk, sector, size, segment);= > } > > Then LBA gets disabled, and access beyond CHS range is gone, and the > error about 'out of disk' happens. > > =20 Following may help: =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 20:17:57 +0000 @@ -80,6 +80,9 @@ regs.flags =3D GRUB_CPU_INT_FLAGS_DEFAULT; =20 grub_bios_interrupt (0x13, ®s); + if (!(regs.flags & GRUB_CPU_INT_FLAGS_CARRY)) + return 0; + return (regs.eax >> 8) & 0xff; } =20 --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig889628E80EA7C4A9425C054D 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/ iF4EAREKAAYFAk2BG0AACgkQNak7dOguQglvJwD9Ex6MF9v/4UvDsWGzcKDpJsiC iGItBxfVPAxOHsCJRWoBAIBZrNy0kQ1+ETG8P4jURgXPXnpnctHy7dxMfrXvFysU =d6NM -----END PGP SIGNATURE----- --------------enig889628E80EA7C4A9425C054D--