After Ubuntu is installed, Windows 7 and Windows XP cannot be started (Windows startup items are lost). Solution

Source: Internet
Author: User

Open the terminal program in Ubuntu and enter sudo fdisk-L to view the partition information:

You will see a system, which indicates the partition system type.

You can find the first partition in NTFS format, which is shown in the partition diagram of your Windows system. It is mounted to sda2. What we need to do is change the boot ID to sda2. Now we will see it in the figure. A "*" indicates the boot identifier. Enter the following code in the sda1 partition:

Sudo fdisk/dev/SDA

Next, you will be prompted to enter a-> 1 (this represents sda1)-> A-> 2 (this represents sda2)-> W

Enter sudo fdisk-l again to view the partition information and confirm the boot ID to be changed. Then mount/dev/sda2 to Ubuntu.

First, create a new directory in the/Media Directory to mount sda2 to this directory.

Code:

CD/Media

Mkdir windows7

Mount/dev/sda2/Media/windows7

(If the disk has been mounted, you must first unmount it and then mount the unmount code: umount/dev/sda2). Then we plug the win7 disc and then mount the disc.

Create a new directory under media for disk mounting

CD/Media

Mkdir cdwindows

Attach a CD:

Mount/dev/CDROM/Media/cdwindows, then go to the cdwindows directory and copy the bootmgr file and boot directory under the directory to the/sda2 (that is, the windows7 directory we created above) root directory, then run the Code:

Sudo Update-grub should have options such as Windows 7 lodaer on/dev/sda2. Restart and select the win7 disc to start. When the installation page is displayed, click repair computer in the lower left corner, run the following command to fix the problem:

Bootrec/rebuildbcd

Restart Windows 7 and try again. Finally, remind me not to install any partition in Ubuntu in the primary partition of the entire disk. Otherwise, the Windows Startup item will be lost.
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.