Chinaunix首页 | 论坛 | 博客
  • 博客访问: 565232
  • 博文数量: 127
  • 博客积分: 1169
  • 博客等级: 少尉
  • 技术积分: 1298
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-16 14:29
个人简介

空白

文章分类

全部博文(127)

分类: LINUX

2012-08-19 14:06:33

How to change boot sequence -Grub2 in feora 17

Works with Fedora 17

This is for dual boot os users, there are many who prefers dual boot to keep another OS optional. For any reason if you wish to change boot sequence unlike grub, grub2 requires couple of commands to run.

Here will take example to keep Windows as default boot.
First of all find menuentry for Windows

点击(此处)折叠或打开

  1. cat /boot/grub2/grub.cfg |grep Windows

result:-

点击(此处)折叠或打开

  1. menuentry 'Windows Recovery Environment (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-A4D6D327D6D2F90E' {
  2. menuentry 'Windows 7 (loader) (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-chain-3AC0F2D0C0F2917D' {
Set Windows menuentry as default (only entry mentioned in either " or ' from above command)

  1. grub2-set-default "Windows 7 (loader) (on /dev/sda2)"
Verify default entry

  1. grub2-editenv list
Generate updated grub.cfg

  1. grub2-mkconfig -o /boot/grub2/grub.cfg
Below is to set Fedora as default boot

  1. cat /boot/grub2/grub.cfg |grep Fedora
  2. grub2-set-default "Fedora Linux, with Linux 3.1.0-5.fc16.i686"
  3. grub2-editenv list
  4. grub2-mkconfig -o /boot/grub2/grub.cfg

阅读(1919) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~