From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Subject: Re: How to debug 'out of disk' error.
Date: Wed, 16 Mar 2011 21:19:12 +0100 [thread overview]
Message-ID: <4D811B40.5090302@gmail.com> (raw)
In-Reply-To: <20110316200908.GH343@caffeine.csclub.uwaterloo.ca>
[-- Attachment #1: Type: text/plain, Size: 2582 bytes --]
On 16.03.2011 21:09, Lennart Sorensen wrote:
> On Wed, Mar 16, 2011 at 03:23:58PM -0400, Lennart Sorensen wrote:
>
>> On Wed, Mar 16, 2011 at 03:19:48PM -0400, Phillip Susi wrote:
>>
>>> On 3/16/2011 1:32 PM, Lennart Sorensen wrote:
>>>
>>>> So I now have some debug info:
>>>>
>>>> version=48
>>>> total_sectors=156312576 C=16383 H=16 S=63
>>>> error: hd0,msdos1 out of disk.
>>>> Entering rescue mode...
>>>> grub rescue>
>>>>
>>>> So version is returning something, and it is actually getting the disk
>>>> size properly. I wonder what else could cause the out of disk message
>>>> then.
>>>>
>>> What does the partition table look like? It doesn't extend beyond
>>> sector 156312575 does it?
>>>
>>> Also I wonder about why H=16. It should be 255.
>>>
>> 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 = sectors of 1 * 512 = 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 / Solaris
>>
> I have now determined that the call to grub_biosdisk_rw_int13_extensions
> fails here:
>
> if (grub_biosdisk_rw_int13_extensions (cmd + 0x42, data->drive, dap))
> {
> /* Fall back to the CHS mode. */
> data->flags &= ~GRUB_BIOSDISK_FLAG_LBA;
> disk->total_sectors = data->cylinders * data->heads * data->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.
>
>
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;
}
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
next prev parent reply other threads:[~2011-03-16 20:19 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-16 15:13 How to debug 'out of disk' error Lennart Sorensen
2011-03-16 15:29 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-03-16 16:58 ` Lennart Sorensen
2011-03-16 17:21 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-03-16 17:32 ` Lennart Sorensen
2011-03-16 17:58 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-03-16 18:14 ` Lennart Sorensen
2011-03-16 19:19 ` Phillip Susi
2011-03-16 19:23 ` Lennart Sorensen
2011-03-16 20:09 ` Lennart Sorensen
2011-03-16 20:19 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2011-03-16 22:00 ` Lennart Sorensen
2011-03-16 22:16 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-03-17 14:06 ` Lennart Sorensen
2011-03-17 14:18 ` Lennart Sorensen
2011-03-17 16:09 ` Lennart Sorensen
2011-03-17 16:29 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-03-17 18:40 ` Lennart Sorensen
2011-03-17 19:01 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-03-17 19:22 ` Lennart Sorensen
2011-03-18 9:04 ` Grégoire Sutre
2011-03-18 14:22 ` Lennart Sorensen
2011-03-18 14:56 ` Grégoire Sutre
2011-03-18 15:26 ` Lennart Sorensen
2011-03-16 19:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-06 12:50 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-06 14:38 ` Lennart Sorensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D811B40.5090302@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.