After windows is reinstalled, the ubuntu 12.04 Startup menu is restored (LiveCD)
When we installed ubuntu in the original system, if we reinstall or install a new windows system, we will find that the ubuntu System Startup menu is missing. We can also solve this problem by re-installing the ubuntu system, however, our previous efforts in the ubuntu system were all in vain. Here I will introduce how to use the ubuntu system disk to restore the ubuntu system boot menu.
Start the computer with a CD, and select "Try Ubuntu" to enter LiveCD.
1. Use LiveCD to start the computer
2. Open the terminal
3. query the partition where ubuntu is located
Sudo fdisk-l (note the lower-case L, not the number 1 ,)
4. Get the root permission
Sudo-I
Then input mkdir/media/ubuntu (here we will create a folder ubuntu for mounting the previous sda1. You can choose this folder name based on your interests, without too many requirements)
Mount/dev/sda1/media/ubuntu (mount sda1 to the ubuntu folder)
The following is the most critical and exciting time for this recovery. Enter the following command on the terminal:
Grub-install -- root-directory =/media/ubuntu/dev/sda
(This step is used to re-install grub2 (the software name is grub-pc) to the Master Boot Record [MBR] on the hard disk. It is very important !)
If the "Installation finished. No Error Reported." character appears after the input, the operation is successful. After restarting, the ubuntu startup interface is restored...
After restarting, enter the local Ubuntu system and run the following command on the terminal:
Windows menus have been added after restart.