ZZ: Overwrite ubuntu boot recovery after reloading windows and change the default boot order

Source: Internet
Author: User

ZZ from:http://www.2cto.com/os/201410/341881.html


I think a lot of people have tried to install a dual system, the Windows system in the reload always the MBR rewrite, after reloading windows can not find the Ubuntu boot.

There are a lot of tutorials on the internet, but I think some of them are a little vague. I write in the form of a combination of graphics and text, hoping to help some beginners.

Recovery boot is also very simple, find an Ubuntu installation disk, boot from the installation disk, try Ubuntu, open the terminal.

1. Run command:sudo fdisk-l (This is not the number 1, the letter L), find the root directory of Ubuntu. 2. Run command: sudo mkdir/media/tmpdir to create a temporary folder, and then enter the command: sudo mount/dev/sda11/media/tmpdir mount the system.

3. Next is the most important step, enter the command: sudo grub-install--root-directory=/media/tmpdir/dev/sda (note, here is SDA, do not write sda11), if the display no error, then said the basic success.

4. Next, reboot the system. The guide was already as usual.

but do not enter Windows, first into Ubuntu, in the Terminal input command:sudo update-grub2 update grub behind the successful completion, this time can be restarted into any one system.


If you want to change the boot order, refer to:

Http://jingyan.baidu.com/article/afd8f4de58959134e386e969.html

After opening the Ubuntu system, we open HyperTerminal and enter the following command sudo gedit/etc/default/grub

Shows the following

# If You change this file, run ' Update-grub ' afterwards to update
#/boot/grub/grub.cfg.
# for full documentation of the "options in" This file,
# 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= "LOCALE=ZH_CN"


Grub_default represents the order of the startup items, starting with the number 0, which in turn represents the following startup items (this is on my computer, different Ubuntu versions and Windows systems may be different):

Ubuntu
Advanced Options for Ubuntu
Memory Test (memtest86+)
Memory Test (memtest86+, serial console 115200)
Windows 8 (loader) (ON/DEV/SDA1)

Windows ranked fourth (note that the order starts at 0), so change the value of Grub_default to 4, and then don't forget to run the command:

sudo update-grub

OK, reboot the computer, the default boot system is switched to Windows.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.