第一次遇到了“Memory for crash kernel (0x0 to 0x0) notwithin permissible range ”问题。
几翻 google 之后得出:
1 、(出自 CentOS.org During the boot process you may see the message "Memory for crash kernel (0x0 to 0x0) notwithin permissible range" appear. This message comes from the new kdump infrastructure. It is a harmless message and can be safely ignored.
开机发现如图:

几翻 google 之后得出:
1 、(出自 CentOS.org During the boot process you may see the message "Memory for crash kernel (0x0 to 0x0) notwithin permissible range" appear. This message comes from the new kdump infrastructure. It is a harmless message and can be safely ignored.
2 、怎样配置 kexec/kdump
解决方法 :

 

概述

    

kexec 是一个快速启动机制,允许通过已经运行的内核的上下文启动一个 Linux 内核,不需要经过 BIOS BIOS 可能会消耗很多时间,特别是带有众多数量的外设的大型服务器。这种办法可以为经常启动机器的开发者节省很多时间。

 

    kdump 是一个新的,而且非常可信赖的内核崩溃转储机制。崩溃转储数据可以从一个新启动的内核的上下文中获取,而不是从已经崩溃的内核的上下文。当系统崩溃时, kdump 使用 kexec 启动到第二个内核。第二个内核通常叫做捕获内核( capture kernel ),以很小内存启动,并且捕获转储镜像。

 

    第一个内核保留了内存的一部分,第二个内核可以用来启动。注意,在启动时, kdump 保留了一定数量的重要的内存,这改变了紅帽企业 Linux 5 最小内存需求。为了计算系统需要的真正最小内存,可以参看 http://www.redhat.com/rhel/details/limits/ 上列出的最小内存需求,加上 kdump 使用的内存数量,以决定真正的最小内存的需求。

 

    

因为第一个内核的内存内容已经被保留,所以 kexec 可以不经过 BIOS ,启动捕获内核。这是内核崩溃转储的根本。

 

 

怎样配置 kdump

 

1. 确认 kexec-tools 已经安装:

 

#rpm -q kexec-tools
2. 配置 /etc/kdump.conf 文件,指定 vmcore 将被转储的路径。可以通过 scp 拷贝到另一个服务器,也可以是裸设备,或者本地的文件系统。

 

3. 修改一些启动参数,为捕获很保留一块内存。对于 i386 x86_64 架构,编辑 /etc/grub.conf ,在内核行的末尾添加 crashkernel=128@16M

 

下面是一个带有 kdump 选项的 /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 do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/hda1
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashp_w_picpath=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Client (2.6.17-1.2519.4.21.el5)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.17-1.2519.4.21.el5 ro root=LABEL=/ rhgb quiet crashkernel=128M@16M
        initrd /boot/initrd-2.6.17-1.2519.4.21.el5.img

 

4. 修改之后,重启系统。 128M 内存(从 16M 开始)不被正常的系统使用,为捕获内核保留。注意, free -m 的输出会显示内存比不加参数时少了 128M ,这就是我们所期望的。

 

注意:可以使用小于 128M ,但是只使用 64M 做测试被证实是不可靠的。

 

5. 现在,保留内存已经设置了,打开 kdump 初始脚本,启动服务:

 

#  chkconfig kdump on
#  service kdump start

 

6. 可以通过 kexec 加载内核镜像,让系统准备捕获一个崩溃时产生的 vmcore 。可以通过 sysrq 强制系统崩溃:

 

# echo "c" > /proc/sysrq-trigger

 

这造成 kernel panic ,紧跟着系统重启 kdump 内核。当启动进程进入到启动 kdump 服务器时, vmcore 将会被拷贝到你在 /etc/kdump.conf 文件中指定的位置。

 

注意:
终端 frame-buffer X 将运行不正常。在运行一些类似于在内核配置上添加了 "vga=791" 或者运行 X 的系统,在通过 kexec 启动内核时,终端显示将不清楚。记住, kdump 内核仍旧能够创建转储。当系统重启,显示将会恢复到正常状态。

 

3 、小内存机器要等很长时间,关机后加大内存再着上几分钟即可开机。开机后按 2 配置。

 

安装 kexec-tools  ( 会提示需要先安装 busybox)

编辑 /etc/grub.conf 文件,在内核行末加一句: crashkernel=128M@16M 。保存退出


重启……

初始化 kdump 脚本,开户服务。


再来一次Memory for crash kernel (0x0 to 0x0) notwithin permissible range




哈哈,好啦。把内存调整回288M也正常了!


本文部分内容来自互联网,感谢Internet!