更改linux默认启动内核加载顺序

在安装vmware tools 的时候,需要安装rhel-5-server-i386-disc1.iso\Server中的
kernel-2.6.18-8.el5.i686.rpm
kernel-devel-2.6.18-8.el5.i686.rpm
kernel-headers-2.6.18-8.el5.i386.rpm
并且从kernel-2.6.18-8.el5.i686内核启动

这样RHEL 5会有多个内核,经过长期实践观察,xen内核容易出问题。
可修改启动配置文件,更改系统默认加载的内核!
查看有两个grub.conf,分别是/etc/grub.conf,还有/boot/grub/grub.conf
两个文件应该是一样的
/etc/grub.conf: symbolic link to `../boot/grub/grub.conf'
#vi /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=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-53.el5PAE)
       root (hd0,0)
       kernel /vmlinuz-2.6.18-53.el5PAE ro root=LABEL=/1 3 rhgb quiet
       initrd /initrd-2.6.18-53.el5PAE.img
title Red Hat Enterprise Linux Server-xen (2.6.18-53.el5xen)
       root (hd0,0)
       kernel /xen.gz-2.6.18-53.el5
       module /vmlinuz-2.6.18-53.el5xen ro root=LABEL=/1 3 rhgb quiet
       module /initrd-2.6.18-53.el5xen.img
title Red Hat Enterprise Linux Server-base (2.6.18-53.el5)
       root (hd0,0)
       kernel /vmlinuz-2.6.18-53.el5 ro root=LABEL=/1 3 rhgb quiet
       initrd /initrd-2.6.18-53.el5.img
将其中的default =1改为你需要的。(注:默认顺序是从0开始)

 

更多精彩linux视频教程,尽在51CTO学院:
http://edu.51cto.com/course/courseList/id-48.html
wKioL1PE_n3z629yAACXIHScsJM092.jpg
posted on 2014-08-28 15:33  Linux小红花  阅读(893)  评论(0编辑  收藏  举报