Linux and Windows: Install Ubuntu first and then install Windows

Source: Internet
Author: User

The general installation sequence of Linux and Windows dual systems is: first Windows and then Linux, so there is basically no problem, grub of Linux provides a dual system startup option. However, if the order is reversed, or Windows is reinstalled, Linux disappears from the Startup menu.

Simple solution:

1. Obtain the MBR backup file

Download this file: http://www.linux-wiki.cn/archieve/grldr.zip, unzip it, and put it under the C drive root directory.

If you have backed up MBR before reinstalling windows, you do not need to download the above files. You can simply use the MBR file you have backed up.

2. edit boot. ini.

In Windows, "My Computer" right-click "> Properties"> "advanced"> "Settings" on the right of START and fault recovery> "edit" in the upper part of the page, the boot file opened with notepad appears. INI file.

(Or directly go to disk C to find the file and modify it. It is generally read-only)

Add a line at the end of the file

c:/grldr="Grub"

Save the file, exit, and restart to go to Linux.

3. restore the original boot menu

In fact, this is enough for lazy people, but if you want to restore to the status before reinstalling windows, you can restore MBR.

 

**************************************** **********************

Back up MBR

Dd If =/dev/sda1 of =/root/mbr bs = 512 COUNT = 1

Recover MBR

Dd If =/root/MBR of =/dev/sda1 BS = 512 COUNT = 1

Restore A partitioned table

Dd If =/root/MBR of =/dev/sda1 BS = 512 skip = 446 COUNT = 66

Note: The MBR size is 512, so BS = 512 COUNT = 1

BS = 512 skip = 446 COUNT = 66 is used to determine the location of the partition table in the backup file

 

From: http://hi.baidu.com/andydidy/blog/item/73b244fd65851bf5fc037f92.html

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.