32位centos 安装过程会查看内存大小。如果大于3.2G,系统自动安装PAE的内核,如果小于3.2G,系统安装不带PAE的内核,
最近升级一台服务器内存,2G增加到8G,系统在默认安装时安装了不带PAE内存,系统只能识别到3.2G内存,下面就是更换内核的方法,很容易哈
1,查看系统启动加载的内核
[root@tgds ~]# more /etc/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/sda2
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-164.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-164.el5.img
2,查看BOOT目录中的内核文件
[root@tgds ~]# ll /boot/
总计 5591
-rw-r--r-- 1 root root 68663 2009-09-03 config-2.6.18-164.el5
drwxr-xr-x 2 root root 1024 2011-10-23 grub
-rw------- 1 root root 2605511 2011-04-01 initrd-2.6.18-164.el5.img
drwx------ 2 root root 12288 2011-04-01 lost+found
-rw-r--r-- 1 root root 80032 2009-03-13 message
-rw-r--r-- 1 root root 107405 2009-09-03 symvers-2.6.18-164.el5.gz
-rw-r--r-- 1 root root 954947 2009-09-03 System.map-2.6.18-164.el5
-rw-r--r-- 1 root root 1855924 2009-09-03 vmlinuz-2.6.18-164.el5
3,系统光盘中找到内核文件,上传服务器并安装
[root@tgds ~]# rpm -ivh kernel-PAE-2.6.18-164.el5.i686.rpm
warning: kernel-PAE-2.6.18-164.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:kernel-PAE ########################################### [100%]
4,安装完后,grub.conf文件会被改修,我们只需要修改default=0,
[root@tgds ~]# more /etc/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/sda2
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-164.el5PAE)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5PAE ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-164.el5PAE.img
title CentOS (2.6.18-164.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-164.el5.img
5,查看安装的内核
[root@tgds ~]# ll /boot/
总计 11078
-rw-r--r-- 1 root root 68663 2009-09-03 config-2.6.18-164.el5
-rw-r--r-- 1 root root 68616 2009-09-03 config-2.6.18-164.el5PAE
drwxr-xr-x 2 root root 1024 11-17 23:22 grub
-rw------- 1 root root 2605511 2011-04-01 initrd-2.6.18-164.el5.img
-rw------- 1 root root 2606593 11-17 23:12 initrd-2.6.18-164.el5PAE.img
drwx------ 2 root root 12288 2011-04-01 lost+found
-rw-r--r-- 1 root root 80032 2009-03-13 message
-rw-r--r-- 1 root root 107405 2009-09-03 symvers-2.6.18-164.el5.gz
-rw-r--r-- 1 root root 107459 2009-09-03 symvers-2.6.18-164.el5PAE.gz
-rw-r--r-- 1 root root 954947 2009-09-03 System.map-2.6.18-164.el5
-rw-r--r-- 1 root root 952431 2009-09-03 System.map-2.6.18-164.el5PAE
-rw-r--r-- 1 root root 1855924 2009-09-03 vmlinuz-2.6.18-164.el5
-rw-r--r-- 1 root root 1852564 2009-09-03 vmlinuz-2.6.18-164.el5PAE
6,reboot重新启动,发现内存全部识别了。
随手记录一下!
阅读(2232) | 评论(0) | 转发(0) |