linux与windows双系统如何修改默认启动方式

来源:互联网 发布:成都锐理数据 编辑:程序博客网 时间:2024/06/14 09:22


打开/boot/grub/grub.conf文件,修改其中的default的值即可。

当default=0时默认启动CentOS (2.6.32-279.el6.x86_64)
当default=1时默认启动Win7

# 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,6)
#          kernel /boot/vmlinuz-version ro root=/dev/sdb7
#          initrd /boot/initrd-[generic-]version.img
#boot=/dev/sdb
default=1
timeout=5
splashimage=(hd0,6)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-279.el6.x86_64)
        root (hd0,6)
        kernel /boot/vmlinuz-2.6.32-279.el6.x86_64 ro root=UUID=eddf8d64-30d2-4e6a-b559-7a69ce18581b rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD quiet rhgb crashkernel=auto LANG=zh_CN.UTF-8 rd_NO_LVM rd_NO_DM
        initrd /boot/initramfs-2.6.32-279.el6.x86_64.img
title Win7
        rootnoverify (hd0,1)
        chainloader +1