http://www.erikrosado.com/2012/07/how-to-change-default-boot-order-in-linux-based-ubuntu-12-04-lts/
Note: This article is based on Ubuntu 12.04 Precise Pangolin LTS version. However it should work fine in all versions using GRUB2.
Well a lot many of us have a dual booting system setup with one operating system as Ubuntu and the other being Windows 7 in most cases or any other. However the problem Ubuntu beginners face is – getting used to it. The geeky linux culture is a bit of a daunting task to get used to, but then again, once used to it, people never turn back on open source.
How many times have you wanted to boot into Windows but forgot to select Windows in the boot menu or may be (in rare cases) ran out of time before you did that. Believe me, i’m one of such dreamy busy guys. After repeatedly booting into Ubuntu and restarting my system again only to get back to Windows, I was done. I set my mind, opened up the legendary Google Search page and typed ‘how to change boot order in ubuntu’. That’s it..! It was a piece of cake. Read on to know how i did it.
To change the default boot operating system, we have to first know its position. To know this, on your boot screen start counting from 0. That is, the first entry is numbered 0 and the last entry, Windows 7 in my case, is numbered 4【我的是5】. We will call this the boot-number.
First things first. Let me make you people clear that there are many small programs that do this in a jiffy. But what’s the fun in running applications in linux systems..? So lets get a bit more geeky and open up your ubuntu terminal by pressing Ctrl+T on your keyboard.
The file that needs our attention now is the ‘grub’ (GRUB: Grand Unified Bootloader) located in ‘/etc/default’. Before we make any changes to this file, lets take a backup of it. To do this, in the terminal, type the following command and hit enter.
sudo cp /etc/default/grub /etc/default/grub.bak
It may ask for the account password. And the password won’t be visible when typed (as you can see in the above image). Just type the password and hit enter.’cp’ is a command to copy files through terminal.
That ends the backup thing. Now lets complete our mission. In the terminal, type and execute
gksu gedit /etc/default/grub
This opens up the grub file in which the changes are to be made.
Now change boot-number in ‘GRUB_DEFAULT’ field (highlighted in the image below) from 0 to 4【我的是5.可以数出来的,从上到下0开始数,在第几个就是几】, so that Windows 7 becomes the default operating system to boot into.
Now save the file and come back to the terminal.
sudo update-grub
That’s it! Piece of cake isn’t it?
In case something goes wrong, replace the edited file with the backed up file by executing
sudo cp /etc/default/grub.bak /etc/default/grub
Nothing went wrong in my case though
相关推荐
Ubuntu_12.04和Windows_7双系统的安装方法
windows7下安装ubuntu12.04,双系统共存。图文详解,非常容易上手。最后采用windows进行引导进入不同系统,而非ubuntu的引导。好处是当你不要ubuntu的时候,直接在window里磁盘管理删了它所在的分区,然后在Easybcd...
win7下U盘安装ubuntu12.04双系统教程 亲测实现
实战安装双系统的图文教程 比较详细 还有图片 值得参考
Windows7系统下利用U盘安装Ubuntu_12.04实现双系统详细教程.
Ubuntu12.04 nginx python uwsgi Django安装步骤
使用VirtualBox在Windows系统下安装与配置Ubuntu 12.04 LTS虚拟机
Ubuntu 12.04 菜鸟完全使用教程让你用最快的速度熟悉使用Ubuntu 12.04!
虚拟机(VMware10.0)上安装ubuntu12.04操作系统.
libc6 for ubuntu 12.04 所有依赖的库都打包 .
Ubuntu12.04菜鸟使用手册合集+Ubuntu标准教程Ubuntu12.04菜鸟使用手册合集+Ubuntu标准教程Ubuntu12.04菜鸟使用手册合集+Ubuntu标准教程Ubuntu12.04菜鸟使用手册合集+Ubuntu标准教程Ubuntu12.04菜鸟使用手册合集+...
最全,最好用 自己试试啊ubuntu12.04 vim 配置
用 VMware 安装 Ubuntu 12.04详细过程图解
Win7和Ubuntu12.04 双系统重装win7引导不见问题.docx
Ubuntu 12.04下如何安装MySQL ,我按照这文档,已经成功在ubuntu 12.04安装成功mysql!
ubuntu12.04 server版本,虚拟机共享宿主机的无线网上网,亲测,有图。
ubuntu12.04 服务器 入门指南,包含有关如何安装和配置各种服务器的信息。
ubuntu12.04安装及配置过程详解
ubuntu12.04下Java开发环境的搭建