Fix Linux boot after Windows is reinstalled
Installed dual-system (Windows and Linux) after Windows is re-installed, Linux boot will be lost and you will not be able to enter the original Linux system [the reason is that Windows will overwrite the Linux BootLoader-GRUB in the original MBR]. In this case, you can recover the Linux system by fixing the boot.
Take Ubuntu14.04 as an example. First, find a Linux installation disk, put it into the optical drive, and restart the computer. Enter the BIOS, enable the computer to start from the CD, and then enter the Live CD mode (for example, after the computer is started from the Ubuntu installation disk, click "Try Ubuntu". If it is slow to enter the graphic interface at this time or it cannot enter the graphic interface at all, you can press <Ctrl + Alt> + [F1 ~ F7] enter the command line mode ).
Then open the terminal, enter the root mode (for example, enter sudo-I), and then enter the mount command to view the various partitions of the system (some people say that the fdisk-l command is used on the Internet, however, the disk unit shown in this command is Block, which requires conversion and is not intuitive. We recommend that you use the mount command ), record the partition where Linux is installed ("/" or "/boot" [if you have separately partitioned "/boot, take/dev/sda11 as an example );
Create a directory (mkdir/mnt/tmpdir) and run the mount/dev/sda11/mnt/tmpdir command to mount/dev/sda11 to/mnt/tmpdir;
It is worth noting that, when installing Linux,/boot occupies a single partition (take/dev/sda10 as an example), you also need to enter mount/dev/sda0/mnt/boot.
Finally, enter grub-install -- root-directory =/mnt/dev/sda.
Restart the computer, and then you will find that the original system boot selection directory re-appears, the Linux system boot will be successful repair.
But if the Windows system can not enter, you need to enter the Linux system, then enter the sudo update-grub2 in the terminal, and then restart the computer.