天天看點

更改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

更改linux預設啟動核心加載順序

轉載于:https://www.cnblogs.com/edu51cto/p/3941691.html