[root@rhel6 ~]# ls /etc/modprobe.d/ anaconda.conf dist-alsa.conf dist-oss.conf blacklist.conf dist.conf openfwwf.conf [root@rhel6 ~]# cat /etc/modprobe.d/dist.conf # default modutils aliases alias binfmt-204 binfmt_aout alias binfmt-263 binfmt_aout alias binfmt-264 binfmt_aout alias binfmt-267 binfmt_aout alias binfmt-387 binfmt_aout alias block-major-1-* rd alias block-major-3-* ide-probe-mod alias block-major-8-* sd_mod alias block-major-9-* md alias block-major-11-* sr_mod alias block-major-13-* xd alias block-major-15-* cdu31a alias block-major-16-* gscd alias block-major-17-* optcd alias block-major-18-* sjcd alias block-major-20-* mcdx alias block-major-22-* ide-probe-mod alias block-major-23-* mcd alias block-major-24-* sonycd535 alias block-major-25-* sbpcd alias block-major-26-* sbpcd alias block-major-27-* sbpcd alias block-major-29-* aztcd alias block-major-32-* cm206 alias block-major-33-* ide-probe-mod alias block-major-34-* ide-probe-mod alias block-major-37-* ide-tape alias block-major-44-* ftl alias block-major-46-* pcd alias block-major-47-* pf
[root@rhel7 ~]# ls anaconda-ks.cfg Downloads Music Templates Desktop initial-setup-ks.cfg Pictures Videos Documents kernel-lt-3.10.102-1.el6.elrepo.x86_64.rpm Public
[root@rhel7 grub2]# grub2-editenv list saved_entry=Red Hat Enterprise Linux Linux, with Linux 3.10.0-123.el7.x86_64
查看配置文件中有几个启动项
[root@rhel7 grub2]# grep "menuentry" /boot/grub2/grub.cfg if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" menuentry_id_option="" export menuentry_id_option menuentry 'Red Hat Enterprise Linux Server (3.10.102-1.el6.elrepo.x86_64) 7.0 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0- 123.el7.x86_64-advanced-5220f38d-edd6-45e5-a257-f1e9e6c80b4e' { menuentry 'Red Hat Enterprise Linux Server, with Linux 3.10.0-123.el7.x86_64' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0- 123.el7.x86_64-advanced-5220f38d-edd6-45e5-a257-f1e9e6c80b4e' { menuentry 'Red Hat Enterprise Linux Server, with Linux 0-rescue-14d17f362db9498eaa56aac326570c37' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-14d17f362db9498eaa56aac326570c37- advanced-5220f38d-edd6-45e5-a257-f1e9e6c80b4e' {
设置默认启动内核
[root@rhel7 grub2]# grub2-set-default 'Red Hat Enterprise Linux Server (3.10.102- 1.el6.elrepo.x86_64) 7.0 (Maipo)'
查看当前默认启动内核
[root@rhel7 grub2]# grub2-editenv list saved_entry=Red Hat Enterprise Linux Server (3.10.102-1.el6.elrepo.x86_64) 7.0 (Maipo)
更新一下配置 , 让新的内核启动生效
[root@rhel7 grub2]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.10.102-1.el6.elrepo.x86_64 Found initrd image: /boot/initramfs-3.10.102-1.el6.elrepo.x86_64.img Found linux image: /boot/vmlinuz-3.10.0-123.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-123.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-14d17f362db9498eaa56aac326570c37 Found initrd image: /boot/initramfs-0-rescue-14d17f362db9498eaa56aac326570c37.img done