|
|
发表于 2016-12-9 11:21:19
|
显示全部楼层
本帖最后由 yumin9822 于 2016-12-9 11:49 编辑
确认了安装LZ的包不会出现下面的问题。产生下面的问题是因为安装了这里的内核http://elrepo.org/people/ajb/devel/kernel-ml/el6/x86_64/RPMS/
CentOS 6 x86_64 一步一步安装发现一个问题
KVersion=4.9.0-rc8
但是运行- grep '^title ' /boot/grub/grub.conf | awk -F'title ' '{print i++ " : " $2}'
复制代码 出现类似输出
0 : CentOS (4.9.0-0.rc8.el6.elrepo.x86_64)
1 : CentOS (2.6.32-504.12.2.el6.x86_64)
2 : CentOS 6 (2.6.32-504.el6.x86_64)
这时候- grep '^title ' /boot/grub/grub.conf | awk -F'title ' '{print i++ " : " $2}' | grep ${KVersion}
复制代码 输出为空
解决方法如下:
将- INS_OK=`grep '^title ' /boot/grub/grub.conf | awk -F'title ' '{print i++ " : " $2}' | grep ${KVersion} | grep -v debug | cut -d' ' -f1`
复制代码
修改为
- INS_OK=`grep '^title ' /boot/grub/grub.conf | awk -F'title ' '{print i++ " : " $2}' | grep ${KVersion%-*}| grep -v debug | cut -d' ' -f1`
复制代码
参考这里
http://xiaosu.blog.51cto.com/2914416/735189 |
|