Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running CentOS 5.9 i386 on a Citrix XenServer 5.6. I installed CentOS with 3GB memory, 2GB swap. I later wanted to add more memory, so I shutdown the server and configured the VM for 8GB. After rebooting, the server still shows available memory to be 3GB.

I tried editing /boot/grub/grub.conf and adding mem=xxM to the configuration, however the system still reports that I only have 3GB memory available.

Is there some configuration I am missing that is causing CentOS to miss the additional memory? Any help is much appreciated, and thanks in advance

EDIT: Below is the results of uname-a

[root@SERVER ~]# uname -a
Linux SERVER.DOMAIN.EXAMPLE 2.6.18-348.el5 #1 SMP Tue Jan 8 17:57:28 EST 2013 i686 i686 i386 GNU/Linux
share|improve this question
    
Can you edit into your question the output of uname -a? –  MadHatter Sep 20 '13 at 14:31
    
Results have been added to post, thanks –  yum_tacos4u Sep 20 '13 at 14:36
    
If memory serves, you need the PAE kernel to see more than 4GB of memory on an i386-class machine. Try yum list kernel-*|grep PAE to see if there's one available. –  MadHatter Sep 20 '13 at 14:40
    
Here are the results of the command kernel-PAE.i686 2.6.18-348.16.1.el5 updates kernel-PAE-devel.i686 2.6.18-348.16.1.el5 updates –  yum_tacos4u Sep 20 '13 at 14:53
5  
Why on earth did you install 32-bit? –  Michael Hampton Sep 20 '13 at 15:08
show 5 more comments

1 Answer

up vote 5 down vote accepted

As MadHatter has pointed out, you need to install the PAE kernel and change GRUB default settings to boot to this kernel. This is needed if you have more that 4GB memory installed.

Step 1: Install kernel-PAE

yum install kernel-PAE kernel-PAE-devel

Step 2: Edit /etc/sysconfig/kernel

  # UPDATEDEFAULT specifies if new-kernel-pkg should make
  # new kernels the default 
    UPDATEDEFAULT=yes

  # DEFAULTKERNEL specifies the default kernel package type 
    DEFAULTKERNEL=kernel-PAE

Step 3: Change GRUB to boot to kernel-PAE by default. Edit /etc/grub.conf and change the default number to match the boot order number for kernel-PAE. Boot order numbers start with 0.

For example, in/etc/grub.conf, my default below should be set to 1 in order to boot kernel-PAE

default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-348.16.1.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-348.16.1.el5 ro root=LABEL=/ mem=8192M
        initrd /initrd-2.6.18-348.16.1.el5.img
title CentOS (2.6.18-348.16.1.el5PAE)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-348.16.1.el5PAE ro root=LABEL=/ mem=8192M
        initrd /initrd-2.6.18-348.16.1.el5PAE.img
title CentOS (2.6.18-348.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-348.el5 ro root=LABEL=/ mem=8192M
        initrd /initrd-2.6.18-348.el5.img
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.