`

修改Ubuntu12.04和Windows双系统默认启动系统

 
阅读更多

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

Note:There is a space between ‘cp’ & ‘etc/default/grub’ and ‘/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.

In case, if the time to select your option isn’t sufficient for you in the boot screen, you can change it by changing the default 10 seconds in ‘GRUB_TIMEOUT’ field to any number of seconds you like.
 

Now save the file and come back to the terminal.

 
 
To update these new booting rules, type and execute

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

 

 

分享到:
评论

相关推荐

    win7下U盘安装ubuntu12.04双系统教程

    总体来说,win7下使用U盘安装ubuntu12.04双系统的过程涉及到了磁盘空间的预留、U盘启动盘的制作、独立显卡问题的解决、自定义分区和系统引导设置,以及最后系统的维护与卸载。这个过程需要用户对计算机系统有一定的...

    win7 ubuntu 12.04 xp双盘3系统grub配置.docx

    在本文档中,我们将讨论如何在Win7、Ubuntu 12.04和XP双盘3系统中配置GRUB,以实现三系统共存的目的。 一、GRUB基本概念 GRUB是一种启动引导程序,能够管理多个操作系统的启动过程。它可以识别不同的文件系统,并...

    win7_系统上安装Ubuntu_12.04_双系统

    在本文中,我们将详细介绍如何在已经安装了Windows 7的系统上安装Ubuntu 12.04双系统。这个过程涉及到几个关键步骤,包括检查Win7的保留分区,复制启动文件,制作menu.lst文件,关闭系统保留分区,以及最后安装...

    修复Ubuntu12.04 Grub 引导

    在使用双系统(如Windows 7与Ubuntu 12.04)时,经常会出现因为重新安装Windows而导致原本的Grub启动菜单丢失的情况。Grub是GNU GRand Unified Bootloader的缩写,是Linux系统中最常用的引导加载程序之一。它负责在...

    Ubuntu12.04菜鸟使用手册

    1. **安装Ubuntu 12.04**:介绍如何下载Ubuntu镜像文件,创建启动U盘或DVD,以及如何在计算机上安装Ubuntu,包括双系统安装与全盘替换。 2. **桌面环境**:Ubuntu 12.04采用Unity桌面环境,讲解Unity的特点,如左侧...

    在ubuntu12.04下编译内核

    本文将基于Ubuntu 12.04操作系统,详细介绍编译Linux内核的全过程,包括必要的准备工作、内核配置、生成与安装新内核以及如何调整默认配置文件等关键步骤。 #### 一、编译前的准备工作 在开始编译Linux内核之前,...

    VmWare虚拟机安装Ubuntu12.04

    如果是安装双系统,则必须将启动引导器安装到“/boot”所在磁盘(例如“/dev/sda7”),以避免Windows无法启动的问题。 - **安装开始**:确认所有设置无误后,点击“现在安装”开始安装过程。 #### 总结 通过以上...

    Ubuntu 12.04双网卡搭建局域网.docx

    通过以上步骤,你就可以成功地利用Ubuntu 12.04双网卡搭建起一个局域网,并使服务器具备路由功能,使得局域网内的客户端可以通过服务器访问外部网络。记得在完成所有配置后,测试网络连通性,确保一切工作正常。

    Ubuntu 12.04 OpenStack Essex安装(多节点)

    ### Ubuntu 12.04 OpenStack Essex安装(多节点) ...以上步骤完成了OpenStack Essex在Ubuntu 12.04系统上的初步安装环境准备和控制节点的基本配置。接下来可以继续进行其他组件的具体安装和配置工作。

    win7和ubuntu双系统

    在计算机操作系统领域,有时用户可能需要在一台电脑上同时安装并使用Windows 7和Ubuntu两个系统,这被称为双系统配置。这种配置允许用户在启动电脑时根据需要选择进入哪个操作系统。然而,在安装Ubuntu后,系统通常...

    ubuntu12使用文档合集

    1. **安装Ubuntu 12.04**:介绍如何在计算机上安装Ubuntu,包括双系统安装和全盘替换,强调安全性和数据保护。 2. **Unity桌面环境**:Ubuntu 12.04采用了Unity界面,讲解了Dash启动器、Launcher侧边栏、工作区切换...

    win7下装unix系统

    在 Windows 7 系统下安装 Unix 类系统(本例中为 Ubuntu 12.04),通常是为了实现双系统共存,便于用户在两种不同的操作系统间灵活切换。这种做法尤其适用于那些希望在保持原有 Windows 操作环境的同时,体验 Linux ...

    win7下安装Linux实现双系统全攻略

    本文将详细介绍如何在已安装Win7系统的计算机上安装Linux(本例中为Ubuntu 12.04),实现双系统共存。 #### 一、准备工作 在开始之前,你需要准备以下工具和资源: 1. **笔记本**:已安装Win7旗舰版64位系统。 2....

    win7下安装各版本linux教程.docx

    【描述】: 本教程详细介绍了如何在Windows 7操作系统中安装CentOS 6.4、Fedora以及Ubuntu等不同版本的Linux,实现双系统共存,让你的计算机同时享受多种Linux发行版的便利。 【标签】: Win7、CntOS6.4、Fedral、...

    云计算系统安装openstack之essex+quantum完整篇

    - 使用Ubuntu 12.04 LTS ISO镜像安装操作系统,安装过程中需设置时区为UTC,主机名为essex-1。 - 在安装过程中,选择安装OpenSSH-Server以方便后续远程管理操作。 ##### 2. 配置操作系统 - 更新系统软件源并执行...

    Linux下 wps安装 Linux安装

    本次实验使用OracleVirtualBox作为虚拟化平台,版本为12.04,虚拟机中安装的操作系统为Ubuntu12.04LTS,这是一个长期支持版本,稳定性较好,适合用于学习和开发环境。 #### 下载与安装Ubuntu Ubuntu的下载方式可以...

    A20_Android快速移植指南

    - **软件资源介绍**:针对A20芯片,提供了详细的软件开发包(SDK)、驱动程序、开发工具等资源,便于开发者进行软件开发和系统定制。 #### 二、建立开发环境 - **硬件资源**:为了进行A20 Android系统的开发,需要...

    OpenStack Grizzly版本单节点双网卡实验部署指导书

    - **选择操作系统:** 本实验选择了Ubuntu Server 12.04作为基础操作系统。这一步非常重要,因为不同的操作系统可能会有不同的包管理器、依赖库等差异,从而影响后续的安装过程。 - **安装步骤:** 在虚拟化环境中(如...

Global site tag (gtag.js) - Google Analytics