Bug 250299

Summary: Grub sometimes does not detect entire memory map
Product: [Fedora] Fedora Reporter: Robert A. Klahn <robert>
Component: grubAssignee: Peter Jones <pjones>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: amyagi, bill-bugzilla.redhat.com, dustin.henning, eric.moret, herrold, larissaejones, martin, mishu, nathan.robertson, petri.koistinen, rjones, spiderbill, sputhenp, triage, tru, vchepkov
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-28 06:26:22 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 445893    

Description Robert A. Klahn 2007-07-31 13:42:15 EDT
Description of problem:

Sometimes, grub does not recognize the entire e820 memory map, when the map is
not provided by the BIOS in the multiboot information data structure.
Ultimately, this appears to be an over-optimization by the compiler when
building grub, in combination with buggy BIOS.

The result is that some downstream kernels (in my particular case, the Xen
kernel) does not recognize all the memory available on a system.

Version-Release number of selected component (if applicable):

grub-0.97-13

How reproducible:

From the lack of discussion on the Fedora and Xen mailing lists, I presume this
problem is rare in the real world, and may be hard to reproduce.

The machine this happens on for me is has two Dual-Core AMD Opteron 2210 w/16GB
of memory, using an American Megatrends BIOS. Upon boot on an unpatched grub,
Xen only recognizes slightly less than 4GB. The Multiboot information data
structure has flag for the mem_lower/mem_upper fields set (and Xen memory
detection matches the values in these fields), and does not have the flag for
memory map set. 

Patch to fix problem:

--- grub-0.97/stage2/common.c.e820      2007-07-30 11:36:19.000000000 -0800    
                            
+++ grub-0.97/stage2/common.c           2007-07-30 11:36:55.000000000 -0800    
                            
@@ -142,6 +142,7 @@
 init_bios_info (void)                                                         
                            
 {                                                                             
                            
 #ifndef STAGE1_5                                                              
                            
-  unsigned long cont, memtmp, addr;                                           
                            
+  unsigned long memtmp, addr;                                                 
                            
+  volatile unsigned long cont;                                                
                            
   int drive;                                                                  
                            
 #endif
Comment 1 Peter Peltonen 2007-08-14 08:56:24 EDT
I encountered the same problem with i386 and x86_64 CentOS5 + xen-enabled
kernels. Only 2,9GB of my 6GB RAM was recognized. Non-xen 64bit and 32bit
PAE-kernels saw the memory correctly. After patching grub with this patch and
reinstalling grub (not just the rpm -- grub has to be reinstalled from grub
prompt) all memory was recognized correctly.
Comment 2 Dustin Henning 2007-10-23 13:14:02 EDT
I too experienced this issue.  The system in question was a Core 2 Quad E6600 
with 8GiB on an Intel P965 Express chipset.  Like the original reporter, this 
system also utilizes an AMIBIOS.
In my case, only 3.2GiB was recognized prior to the patch, and the base (SMP) 
kernel did not recognize the ful amount of memory until I added mem=10G to the 
kernel arguments.  Once the base (SMP) kernel was booted detecting 7.8GiB, the 
problem did not reoccur when the kernel argument was removed.  Said kernel 
argument (and derivatives) had no effect on the xen kernels when placed after 
either/both kernel lines (xen.gz and module vmlinuz).
Comment 3 Nate 2008-02-07 09:49:26 EST
I too an experiencing this issue on an AMD64 machine with 8GBs of memory.  Does
anyone know if there is an updated Grub package with this patch applied?
Comment 4 Eric Moret 2008-02-14 09:25:15 EST
Any progress in applying this patch? I too have this issue.
Comment 5 Eric Moret 2008-02-15 11:11:32 EST
You can grab the fixed package at:
ftp://ftp.zouric.com/public/grub-0.97-14.x86_64.rpm
SRPMS at
ftp://ftp.zouric.com/public/grub-0.97-14.src.rpm
Comment 6 Akemi Yagi 2008-02-15 11:29:36 EST
(In reply to comment #5)
> You can grab the fixed package at:
> ftp://ftp.zouric.com/public/grub-0.97-14.x86_64.rpm
> SRPMS at
> ftp://ftp.zouric.com/public/grub-0.97-14.src.rpm

Thanks for making the patched grub available. According to your note on the
CentOS forum:

http://www.centos.org/modules/newbb/viewtopic.php?topic_id=12491&forum=38

you have fixed the problem on a Hetzner root server DS8000 ?
Comment 7 Michael Groves 2008-02-17 00:35:33 EST
After installing the above grub rpm, you will have to run "grub-install
/dev/sda" (for example) to make it all work.

-Mike
Comment 8 Eric Moret 2008-03-20 02:41:09 EDT
(In reply to comment #6)
> you have fixed the problem on a Hetzner root server DS8000 ?

Yes, that is correct. I now have my 8Gb of RAM recognized on a Hetzner DS8000
Comment 9 Steve 2008-05-07 02:18:21 EDT
(In reply to comment #5)
> You can grab the fixed package at:
> ftp://ftp.zouric.com/public/grub-0.97-14.x86_64.rpm
> SRPMS at
> ftp://ftp.zouric.com/public/grub-0.97-14.src.rpm

Many thank for this patch Eric, it's also allowed me to see the 6GB on
CentOS/Xen install on Core 2 Quad Acer.

Steve
Comment 10 cherradi 2008-05-13 16:43:13 EDT
Hi there,
I've got a Dell 1900 with CentOS 5.1 64 bit and 4 GB ram.
Only 3 GB are recognized with kernel-xen-2.6.18-53.1.19.el5.
I've downloaded & installed grub-0.97-14.x86_64.rpm and did grub-install /dev/sda.
But it did not help and I still got 3 GB recognized.
Can you please help me to fix this.
Thank you in advance.
Comment 11 Bug Zapper 2008-05-14 09:47:02 EDT
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.

Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:
http://docs.fedoraproject.org/release-notes/

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 12 Bug Zapper 2008-06-16 22:02:04 EDT
Fedora 7 changed to end-of-life (EOL) status on June 13, 2008. 
Fedora 7 is no longer maintained, which means that it will not 
receive any further security or bug fix updates. As a result we 
are closing this bug. 

If you can reproduce this bug against a currently maintained version 
of Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 13 Vadym Chepkov 2008-11-21 13:18:51 EST
Still an issue in Fedora-10-Preview
Comment 14 Vadym Chepkov 2009-01-11 17:37:41 EST
Still an issue in Fedora-10, the proposed patch doesn't fix the issue.
Comment 15 Bug Zapper 2009-06-09 18:44:03 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 16 Robert A. Klahn 2009-06-09 18:54:05 EDT
Previous commenters have reported this problem in Fedora 10.
Comment 17 Eric Moret 2009-06-09 19:13:02 EDT
This is still not yet applied to Fedora11 and Rawhide12. Also please note that
I do not have access to a DS8000 server to verify that bug.
Comment 18 Bill Newton 2010-04-16 18:07:00 EDT
I'm experiencing a similar problem on a Dell Vostro 200 running Fedroa 12 with 6 gb of ram. Grub only sees 3 gb and some change.
Comment 19 Bill Newton 2010-04-16 19:01:46 EDT
Well, I think I commented too soon. Upgraded bios for the heck of it from 1.011 to 1.0.15, which solved the problem. Grub and by extension fedora now see all six gigs.
Comment 20 Bug Zapper 2010-04-27 07:45:21 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 21 Bug Zapper 2010-06-28 06:26:22 EDT
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 22 Lara 2012-01-09 01:07:30 EST
This is back in Fedora 16 on a Lenovo W500 and it didn't happen in Fedora 14. It's 100% reproducable. I'm missing 5GB out of 8GB. My bios indicates that I have 8GB but Fedora thinks I only have 2.91.

That's pretty bad. 

I'm dual booting between Windows 7 and Fedora 16   Linux 3.1.7-1.fc16.i686 i686
The Windows 7 install is on a seperate drive and I'm dual booting using the BIOS, not the boot loader.
Comment 23 Martin Dengler 2012-04-02 23:07:05 EDT
I am also experiencing this issue using F16 on a Dell Optiplex 980 with (last I checked) the latest BIOS.

Smolt system profile: http://www.smolts.org/client/show/pub_63981753-52a1-4470-b69d-dc3e05ecfbaa .

I will get some dmesg data, but as I'm using grub2 I'm not sure what's required / useful.

In any case this bug seems like it needs to be re-opened, or I'm happy to file a new one if more appropriate.
Comment 24 Martin Dengler 2012-04-02 23:08:41 EDT
Looks like https://bugzilla.redhat.com/show_bug.cgi?id=445893 is the right one; I will report there.