系统为fedora+windows7的双系统,开机的默认启动项为fedora,用windows用的比较多,很不方便有时候一边开机然后去接一杯水回来发现系统进入到fedora了,就改了一下默认启动项
操作方法如下。
首先找到windows启动项的menuentry
shell# cat /boot/grub2/grub.cfg |grep Windows
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-021692BF1692B2E1' {
//记住 'Windows 7 (loader) (on /dev/sda1)'单引号里的
设置默认启动项
shell#grub2-set-default "Windows 7 (loader) (on /dev/sda1)"
验证启动项
# grub2-editenv list
saved_entry=Windows 7 (loader) (on /dev/sda1)
更新配置文件
# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.7.3-101.fc17.x86_64
Found initrd image: /boot/initramfs-3.7.3-101.fc17.x86_64.img
Found linux image: /boot/vmlinuz-3.6.10-2.fc17.x86_64
Found initrd image: /boot/initramfs-3.6.10-2.fc17.x86_64.img
Found linux image: /boot/vmlinuz-3.6.6-1.fc17.x86_64
Found initrd image: /boot/initramfs-3.6.6-1.fc17.x86_64.img
No volume groups found
Found Windows 7 (loader) on /dev/sda1
done
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于