VM增加的内存无法正常显示的解决方法

由于VM增加的内存不显示,需要更新HEADER才能�x出超�^4G的部份。


1.更新kernel-PAE、kernel-PAE-devel、kernel-headers
yum -y update
yum -y install kernel-PAE
yum -y install kernel-PAE-devel
yum -y install kernel-headers
2.修改/boot/grub/grub.conf直接用winscp上去或者用vi修改/boot/grub/grub.conf,
先查看下内核版本
[root@ ~]# uname -a
Linux zz-vmgamesv01 2.6.18-238.19.1.el5PAE #1 SMP Fri Jul 15 08:15:44 EDT 2011 i686 i686 i386 GNU/Linux


cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-238.19.1.el5)
 root (hd0,0)
 kernel /vmlinuz-2.6.18-238.19.1.el5 ro root=/dev/VolGroup00/LogVol00
 initrd /initrd-2.6.18-238.19.1.el5.img
title CentOS (2.6.18-238.19.1.el5PAE)
 root (hd0,0)
 kernel /vmlinuz-2.6.18-238.19.1.el5PAE ro root=/dev/VolGroup00/LogVol00
 initrd /initrd-2.6.18-238.19.1.el5PAE.img
title CentOS (2.6.18-164.el5)
 root (hd0,0)
 kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/VolGroup00/LogVol00
 initrd /initrd-2.6.18-164.el5.img
 
当选择title CentOS (2.6.18-238.19.1.el5) ,default=0 ,
选择title CentOS (2.6.18-238.19.1.el5PAE) default=1,
选择title CentOS (2.6.18-164.el5),default=2
因为内核版本是2.6.18-238.19.1.el5PAE ,所以选择修改default=1,
这个看实际位置在哪里而作选择


 3.重启系统 init 6 
 
应VM增加的内存而正常显示出来了
[root@~]# free -m
             total       used       free     shared    buffers     cached
Mem:          7923       4773       3150          0        169       3074
-/+ buffers/cache:       1529       6394
Swap:         3039          0       3039
 

你可能感兴趣的:(内存,职场,VM,休闲)