grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to debug 'out of disk' error.


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: How to debug 'out of disk' error.
Date: Wed, 16 Mar 2011 18:21:42 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110303 Icedove/3.0.11

On 16.03.2011 17:58, Lennart Sorensen wrote:
> On Wed, Mar 16, 2011 at 04:29:32PM +0100, Vladimir 'φ-coder/phcoder' 
> Serbinenko wrote:
>   
>> On 16.03.2011 16:13, Lennart Sorensen wrote:
>>     
>>> I am trying to figure out why grub2 (from Debian Squeeze) gives an 'out
>>> of disk' error when trying to boot from the HD after doing an install.
>>> It ends up at a grub rescue prompt, given it can't even read the disk
>>> well enough to load the full grub.  Doing ls shows the disks, and I can
>>> show the root directory of a partition, but anything further seems to
>>> hit the same 'out of disk' error.
>>>
>>>   
>>>       
>> ls -l should show how big it thinks the disk is. Compare it with its
>> real size
>>     
>>> The system is a Compulab CM-iTC which uses an intel tunnelcreek atom
>>> (the new one) with a phoenix bios.  So far Compulab's response when told
>>> it won't boot grub2 was "We know, but syslinux works fine.", which to
>>> me is not a solution at all.  The same system also hangs the Linux 2.6.32
>>> kernel unless 'edd=off' is added to the kernel command line.
>>>
>>>   
>>>       
>> Looks like int13 is borked. Perhaps it's borked in a way which prevents
>> GRUB from detecting 13/42 function. You can try to force int13/42 by:
>> === 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 15:28:26 +0000
>> @@ -145,6 +145,8 @@
>>  {
>>    struct grub_bios_int_registers regs;
>>  
>> +  return 1;
>> +
>>    regs.edx = drive & 0xff;
>>    regs.eax = 0x4100;
>>    regs.ebx = 0x55aa;
>>     
> OK, the code in 1.98(plus some git stuff) that is in debian uses assembly
> code for that part.  I changed the place calling it instead and added
> some debug info.
>
> When running from linux, the diskinfo bios call returns a total_sectors of
> 4352 sectors, for an 80G drive.  That's just messed up.  I haven't tried
> booting it yet to see if it returns the same value then, but I suspect
> it will.
>
>   
Following change would make GRUB ignore the total_sectors (as an
investigation measure):
@@ -398,7 +400,7 @@
         total_sectors = data->cylinders * data->heads * data->sectors;
     }
 
-  disk->total_sectors = total_sectors;
+  disk->total_sectors = GRUB_DISK_SIZE_UNKNOWN;
   disk->data = data;
 
   return GRUB_ERR_NONE;




-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]