win7 & centos设置启动顺序

有时候为了学习的需要或是各种原因,总想要尝试一下双系统的玩意。

在已有win7系统的条件下再安装了centOS系统,形成双系统,但是安装完CentOS后,开机后默认开启的是CentOS,由于平时使用多的还是在windows,所以还是希望在启动时能直接进入windows,下面我就分享一下如何修改windows默认启动项。

不管是linux引导,还是windows引导,其实我们想要的就是让电脑启动时自动进入windows。

其实很简单,进入centOS系统直接修改linux启动文件就搞定了。

主要修改文件在:/etc/grub.conf

启用终端命令: sudo gedit /etc/grub.conf (如果你已经切换到root用户则不用sudo)

打开文件后看到下面内容,红色部分即为重点。

 

# 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,7) # kernel /vmlinuz-version ro root=/dev/sda10 # initrd /initrd-[generic-]version.img #boot=/dev/sda default=0 timeout=10 splashimage=(hd0,7)/grub/splash.xpm.gz hiddenmenu

title windows7 rootnoverify (hd0,0) chainloader +1

 

title CentOS (2.6.32-131.21.1.el6.i686) root (hd0,7) kernel /vmlinuz-2.6.32-131.21.1.el6.i686 ro root=UUID=229da276-96cf-4c80-81a3-851954c15831 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=zh_CN.UTF-8 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet initrd /initramfs-2.6.32-131.21.1.el6.i686.img

====================================================

以上面代码为例说明:

default=0,默认启动第一个,此处即win7,如果你把上面win7和centos处内容调换一下位置的话默认会启动上面第一个(即开机默认启动的系统)。

timeout=10,默认启动时间,单位秒,自己设置。

title后面的即标题。可以随意修改,启动时显示菜单。

hiddenmenu,即把菜单隐藏起来,只显示倒计时。

 

原文:http://blog.sina.com.cn/s/blog_73b89cd301015bvq.html

原文地址:https://www.cnblogs.com/shanguanghui/p/3048041.html