After windows is reinstalled, the ubuntu 12.04 Startup menu is restored (LiveCD)

Source: Internet
Author: User

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.

Related Article

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.