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