Dual System (Windows+ubuntu) re-installed after Ubuntu, repair boot

Source: Internet
Author: User

After reloading Ubuntu, restarting the machine, the Windows system disappears. Enter the BIOS to modify the boot sequence, Windows system Recovery, but, just installed Ubuntu No, a boot, the computer automatically into Windows.

Workaround:

Install the system's USB stick into Ubuntu live and open the terminal:

1. Input sudo-i

2. Find the mount point to install Ubuntu (use fdisk-l command to view), my in/dev/sda9.

3. Input mount/dev/sda9/mnt

4, if have/boot partition, need to do this step, otherwise, skip. Specifically, enter the command again on the Mount boot partition's mount point/mnt, and the format and step 3 are the same.

5, install grub, enter grub-install--ROOT-DIRECTORY=/MNT/DEV/SDA (note the space. --root and/DEV/SDA have a space in front of them)

6. If Grub.cfg is lost or grub.cfg error occurs, perform the following action (note the space):

  Mount-bind/proc/mnt/proc

Mount-bind/dev/mnt/dev

Mount-bind/sys/mnt/sys

Chroot/mnt Update-grub

Umount/mnt/sys

Umount/mnt/dev

Umount/mnt/proc

7,reboot

Dual System (Windows+ubuntu) re-installed after Ubuntu, repair boot

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.