[Bug 189269] Re: CONFIG_HIMEM4G does not allow 4gb of ram in kernel

Andrew Steele fozzy at zip.com.au
Thu Jun 19 12:56:37 UTC 2008

Some further info:

I have an ASUS P5B-E Plus.  I've just installed/upgraded to Hardy 64bit
server version, also running Xen.

I was experiencing the same proiblem: memory remapping enabled and BIOS
reporting 4Gb.  But when Hardy was running it was only reporting 2.5Gb.

The fix had nothing to do with the various kernel flags discussed.  It's
a problem with grub.  Follow the instructions described here:


(Even though it's for debian etch instead of hardy, the instructions are

I've just followed these instructions and rebooted and now all my memory
is visible.

The key to the fix is to modify around line 143 of stage2/common.c thus
(just one cavaet-I've created this diff after getting it working and I
think the build process may have added lines, I think the link above has
the correct line numbers - follow it's directions not mine ;-) ):

--- common.c    2008-06-19 22:52:14.000000000 +1000
+++ common.c.orig       2008-06-19 22:51:42.000000000 +1000
@@ -159,7 +159,8 @@
 init_bios_info (void)
 #ifndef STAGE1_5
-  unsigned long cont, memtmp, addr;
+  unsigned long memtmp, addr;
+  volatile unsigned long cont;
   int drive;
After making this change, rebuild grub, the debian packages, install the debian package, thne do a grub-install.

Hope this helps others.

CONFIG_HIMEM4G does not allow 4gb of ram in kernel
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to linux-meta in ubuntu.

More information about the kernel-bugs mailing list