After Windows 7 is reinstalled, the grub startup item cannot be entered.

Source: Internet
Author: User

It was originally installed with win7 and ubuntu10.10 dual systems, and later I felt that too many software was installed in win7, So I simply had to reinstall the win7 system. I know that the Windows 7 system was successfully reinstalled. After the restart, I lost the original grub option and failed to enter the Ubuntu system. It was a headache. So I went online to Google and finally found a feasible solution. Let's write it down and share it with you.

Step 1: Use the boot disk made of livecd or USB flash disk to start from the USB flash disk and enter Ubuntu

Step 2: Select Ubuntu for trial

Step 3: Open the terminal and obtain the Administrator's permissions. # Sudo-I, then the operation is performed under the root user.

Step 4: Enter # fdisk-L. This statement is used to view the partition of the entire hard disk, but it is a pity that when I type this command, it is not as I thought, the partition is on that disk, but it is roughly described, for example:

/Dev/sda7 *** (size) Block Value

There is no corresponding mount point, for example,/dev/sda7 is mounted under the root directory. Therefore, when installing a Linux system, remember the general situation of your partition.

Step 5: After learning about the partitions in your Linux system, mount the partitions.

# Mount/dev/sda7/mnt (my/dev/sda7 is mounted to the root directory)

# Mount/dev/sda8/mnt/boot

# Mount/dev/sda9/mnt/home

Swap does not need to be mounted. When the mounting is correct, go to the next step;

Step 6: Execute the statement. To be honest, I haven't figured out what it means.

# Grub-install -- root-directory =/mnt/dev/SDA

If the execution is successful, a prompt is displayed: Installation finished. No error reported.

Step 7: After the above steps are completed, the grub option is displayed at the startup, and there is no update at all. It is possible that Windows 7 cannot be entered. Therefore, start Ubuntu and restart grub Based on the options. Open the terminal, Type

Sudo update-grub2

If the call succeeds, the following message is displayed:

Grub. cfg...

Found Debian Background: moreblue-orbit-grub.png

And so on.

Done

Step 8: restart the machine. If the previous steps are correct, congratulations! The Machine is recovered !!!

 

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.