After windows is reinstalled, the ubuntu boot recovery will be overwritten. windowsubuntu

Source: Internet
Author: User

After windows is reinstalled, the ubuntu boot recovery will be overwritten. windowsubuntu

I think many people have tried to install dual systems. During windows system reinstallation, MBR is always rewritten. After windows is reinstalled, ubuntu boot cannot be found.

There are also many tutorials on the Internet, but I think some of them are vague. I write in the form of a combination of text and text, hoping to help some new users.

Recovery boot is actually very easy. Find an ubuntu installation disk, start it from the installation disk, try ubuntu, and open the terminal.

1. Run the following command:Sudo fdisk-l(Here is not the number 1, it is the letter l), find the ubuntu root directory.

You may display a different image than me, because I cut the image under the real ubuntu system, And I mount the image here.

/ /Dev/sda11
/Boot /Dev/sda8
/Tmp /Dev/sda10
Swap /Devsda9

2. Run the following command: Sudo mkdir/media/tmpdirCreate a temporary folder and enter the following command: Sudo mount/dev/sda11/media/tmpdirMount the system.

3. Next, enter the following command:Sudo grub-install -- root-directory =/media/tmpdir/dev/sda (Note: This is sda, which should not be written as sda11 ),IfNo error report.

4. restart the system as usual.

But do not enter windowsFirst, enter ubuntu and enter the command in the terminal:Sudo update-grub2After grub is updated, You can restart any system.


Reference: Click the open link.




Resume ubuntu boot after windows is reinstalled

Change the BOOT file
 
Reboot ubuntu after windows is reinstalled

Run ubuntu live cd to fix grub. Open the terminal --> enter the following command:
Sudo-I
Mount/dev/sdax/mnt (x indicates the ID of the partition where your Ubuntu is located. You can see it through the disk management tool in Ubuntu Live cd)
Grrub-install -- root-directory =/mnt/dev/sda
Reboot

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.