在已经有Windows8的情况下,装了个Ubuntu12.10,用了几天又想用回Windows8,但是无奈默认启动项是Ubuntu12.10,导致很容易不注意就进去了。。。
那么,就把它改过来吧。。。
Ubuntu12.10的启动引导方式和以前的版本还是没有太大的区别的,因为。。。如图:
修改Ubuntu12.10启动顺序让他默认启动Windows8
我在启动项选择界面顶部看见了“GNU UBUNTU GRUB 2.00-7ununtu11 版”这样的字眼。。。
既然是GRUB那好办,直接:
sudo gedit /boot/grub/grub.cfg
不过打开之后我看见的是这么几行:
#
DO NOT EDIT THIS FILE
#
It is automatically generated by grub-mkconfig using templates
from /etc/grub.d and settings from /etc/default/grub
#
好吧,
sudo gedit /etc/grub.d
然后。。。然后显示grub.d是个目录。。。打开来一看,好吧,里面好多启动项。。。
于是:
sudo gedit /etc/default/grub
恩。。。终于找到了:
# If you change this file, run ‘update-grub’ afterwards to update
/boot/grub/grub.cfg.
For full documentation of the options in this file, see:
info -f grub -n ‘Simple configuration’
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
GRUB_CMDLINE_LINUX=””
- -等等,好像有哪里不对的,哦~没有备份~
你怕不小心改错了你可以先这样(但是我建议每一个人都这样,因为没人可以预料到可能会突然发生什么):
sudo cp /etc/default/grub /etc/default/grub.bak
恩。。。回到上面的
sudo gedit /etc/default/grub
把里面”GRUB_DEFAULT=0”这行改为你需要的引导启动项目。。。。刚才Windows8是第几个来着?第5个?哦不~你忘了Ubuntu是第0个~,那么,改成GRUB_DEFAULT=4好了。。。
最后,执行update-grub更新一下GRUB列表(当然对于Ubuntu,这里是sudo update-grub):
tuccuay@tuccuay-Y470Ubuntu:~$ update-grub
grub-mkconfig: You must run this as root //(好吧,忘了root权限。。。)
tuccuay@tuccuay-Y470Ubuntu:~$ sudo update-grub
Generating grub.cfg …
Found linux image: /boot/vmlinuz-3.5.0-19-generic
Found initrd image: /boot/initrd.img-3.5.0-19-generic
Found linux image: /boot/vmlinuz-3.5.0-17-generic
Found initrd image: /boot/initrd.img-3.5.0-17-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 8 (loader) on /dev/sda1
done //(done!看见done木有!成功了!)
tuccuay@tuccuay-Y470Ubuntu:~$
好了,完工~~(鼓掌~
- 声明: 除非注明,Tuccuay's Blog 文章均为原创,转载请以链接形式标明本文地址。
- 本博客原创文字只代表本人某一时间内的观点或结论,与本人当时或现在所在组织没有任何关系。
- BY-NC-SA 本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。
- 第三方若用于商业用途的转载,须取得本人授权。
- 本文作者:Tuccuay
- 本文地址:http://www.tuccuay.com/2012/12/修改ubuntu12-10启动顺序让他默认启动windows8/