Debian系統更新內核支持bigmem版本解決認不到4g內存

 

最近安裝了Debian 6.0.1a i3 卻發現內核沒有自動加載上PAE
如下命令得知系統裝了兩條2G 的內存條,硬件最大支持64G內存
dmidecode -t memory
# dmidecode 2.9
SMBIOS 2.5 present.
 
Handle 0x1000, DMI type 16, 15 bytes
Physical Memory Array
         Location: System Board Or Motherboard
         Use: System Memory
         Error Correction Type: Multi-bit ECC
         Maximum Capacity: 65280 MB
         Error Information Handle: Not Provided
         Number Of Devices: 8
 
Handle 0x1100, DMI type 17, 28 bytes
Memory Device
         Array Handle: 0x1000
         Error Information Handle: Not Provided
         Total Width: 72 bits
         Data Width: 64 bits
         Size: 2048 MB
         Form Factor: FB-DIMM
         Set: 1
         Locator: DIMM1
         Bank Locator: Not Specified
         Type: DDR2 FB-DIMM
         Type Detail: Synchronous
         Speed: 667 MHz (1.5 ns)
         Manufacturer: 80CE808980CE
         Serial Number: 501A024B
         Asset Tag: 010908
         Part Number: M395T5663QZ4-CE65
 
Handle 0x1101, DMI type 17, 28 bytes
Memory Device
         Array Handle: 0x1000
         Error Information Handle: Not Provided
         Total Width: 72 bits
         Data Width: 64 bits
         Size: 2048 MB
         Form Factor: FB-DIMM
         Set: 1
         Locator: DIMM2
         Bank Locator: Not Specified
         Type: DDR2 FB-DIMM
         Type Detail: Synchronous
         Speed: 667 MHz (1.5 ns)
         Manufacturer: 80CE808980CE
         Serial Number: 501A01C2
         Asset Tag: 010908
         Part Number: M395T5663QZ4-CE65
 
可是經過free 命令獲得只有3.3G
 

 
再去以前幾臺裝了Debian 5.0.4 upd 查看free 命令獲得只有3G
 
 

對應的內核不同,獲得內存總數也不同,針對這個問題只能安裝個支持4G(bigmem) 對應內核版本

因爲要安裝對應內核版本,因此先查看內核版本
root@debian:~/soft# uname -a
Linux debian 2.6.32-5-686 #1 SMP Tue Mar 8 21:36:00 UTC 2011 i686 GNU/Linux
2.6.32-5-686
這個有32-31 與32-35 請注意
 
爲了能搜索更多安裝包,先更新一下更新debian
 
#Vi /etc/apt/sources.list
deb http://mirrors.163.com/debian lenny main non-free contrib 
deb http://mirrors.163.com/debian lenny-proposed-updates main contrib non-free
deb http://mirrors.163.com/debian-security lenny/updates main contrib non-free 
deb-src http://mirrors.163.com/debian lenny main non-free contrib
deb-src http://mirrors.163.com/debian lenny-proposed-updates main contrib non-free
deb-src http://mirrors.163.com/debian-security lenny/updates main contrib non-free
 
再執行如下幾個命令
#apt-get update
#apt-get upgrade
#apt-get dist-upgrade
 
linux-headers-2.6.26-1-openvz-686 - Header files for Linux 2.6.26-1-openvz-686
linux-headers-2.6.26-1-vserver-686-bigmem - Header files for Linux 2.6.26-1-vserver-686-bigmem
linux-headers-2.6.26-1-vserver-686 - Header files for Linux 2.6.26-1-vserver-686
linux-headers-2.6.26-1-xen-686 - Header files for Linux 2.6.26-1-xen-686
linux-p_w_picpath-2.6.26-1-486 - Linux 2.6.26 p_w_picpath on x86
linux-p_w_picpath-2.6.26-1-686-bigmem - Linux 2.6.26 p_w_picpath on PPro/Celeron/PII/PIII/P4
linux-p_w_picpath-2.6.26-1-686 - Linux 2.6.26 p_w_picpath on PPro/Celeron/PII/PIII/P4
linux-p_w_picpath-2.6.26-1-amd64 - Linux 2.6.26 p_w_picpath on AMD64
linux-p_w_picpath-2.6.26-1-openvz-686 - Linux 2.6.26 p_w_picpath on PPro/Celeron/PII/PIII/P4, OpenVZ support
linux-p_w_picpath-2.6.26-1-vserver-686-bigmem - Linux 2.6.26 p_w_picpath on PPro/Celeron/PII/PIII/P4, Linux-VServer support
linux-p_w_picpath-2.6.26-1-vserver-686 - Linux 2.6.26 p_w_picpath on PPro/Celeron/PII/PIII/P4, Linux-VServer support
linux-p_w_picpath-2.6.26-1-xen-686 - Linux 2.6.26 p_w_picpath on i686, oldstyle Xen support
linux-p_w_picpath-2.6.32-5-686 - Linux 2.6.32 for modern PCs
linux-p_w_picpath-2.6.32-5-686-bigmem - Linux 2.6.32 for PCs with 4GB+ RAM
linux-p_w_picpath-2.6-686 - Linux 2.6 for modern PCs (meta-package)
 

一直搜索不到如下版本,挺蛋疼的
linux-p_w_picpath-2.6.32-5-686-bigmem_2.6.32-31_i386.deb
只找到這個版本 linux-p_w_picpath-2.6.32-5-686-bigmem_2.6.32-35_i386.deb
而這個版本,系統自己的 linux-base (>= 2.6.32-35) ,因此無奈之下升級到linux-base_2.6.32-35 ,再安裝linux-p_w_picpath-2.6.32-5-686-bigmem_2.6.32-35_i386.deb ,以前爲何沒想直接升級linux-base ,由於升級這個會可能致使一些設備驅動沒法兼容致使沒加載成功
 
用root 用戶安裝
dpkg -i linux-base_2.6.32-35_all.deb
dpkg -i linux-p_w_picpath-2.6.32-5-686-bigmem_2.6.32-35_i386.deb
 
或者aptitude install linux-p_w_picpath-2.6.32-5-686-bigmem


新內核加到開機啓動菜單
root@debian:/etc# update-grub
Generating grub.cfg ...
Found linux p_w_picpath: /boot/vmlinuz-2.6.32-5-686-bigmem
Found initrd p_w_picpath: /boot/initrd.img-2.6.32-5-686-bigmem
Found linux p_w_picpath: /boot/vmlinuz-2.6.32-5-686
Found initrd p_w_picpath: /boot/initrd.img-2.6.32-5-686
done


最後從新啓動系統

再次檢查一下系統版本
root@debian:/etc# uname -a
Linux debian 2.6.32-5-686-bigmem #1 SMP Mon Jun 13 05:03:09 UTC 2011 i686 GNU/Linux
 
再查看
root@debian:/etc# free
 total       used       free     shared    buffers     cached
Mem:       4144028     132564    4011464          0       3696      81800
-/+ buffers/cache:      47068    4096960
Swap:      5840888          0    5840888

 
說明成功了
 
                                                                     --------viong 2011.09.07 0:22