How to fix grub in Ubuntu

Source: Internet
Author: User
1. try to enter the Ubuntu LiveCD system or other later versions of LiveCD system 2. open the terminal, enter sudofdisk-l, view the partition ID = 83, and record sd [NUM], such as sda83. if multiple partitions with ID = 83 exist in the previous step, try to determine the Partition Number of the partition, and mount/boot to the same partition as/. For example, sda84. enter sudo-I to obtain the root permission. 5. mkdir

1. Find a way to access the Live CD System of Ubuntu or other newer Live CD systems.

2. Open the terminal, enter sudo fdisk-l, view the partition ID = 83, and record sd [NUM], such as sda8

3. if multiple partitions with ID = 83 exist in the previous step, you can find a way to determine the Partition Number of the partition where/is located, and/boot is also mounted to the same partition as/, for example, sda8.

4. Enter sudo-I to obtain the root permission.

5. mkdir/media/tmp

6. mount/partition to the new directory mount/dev/sda8/media/tmp

7. If the previous system/boot was mounted separately, you need to find the/boot partition, such as sda7, And then mount/dev/sda7/media/tmp/boot. Otherwise, this step jumps directly.

8. Now you are ready to install grub. Enter grub-install -- root-directory =/media/tmp/dev/sda on the terminal.

9. If you see information such as Installation finished and no error occured, it indicates that the Installation is successful.

10. restart the system at this time. You can see that the grub2 boot interface is back, and if other systems exist, the startup Item List is displayed.

PS: If Step 10 does not see such as your Windows 8 boot item, then after Ubuntu is started properly, the terminal enters the sudo update-grub2, wait for a moment to see that the Windows 8 startup item will also be added to the list. Well, enjoy it!

It indicates that Grub had a problem before, and it was simply re-installed. Instead of trying to fix grub, it wasted a lot of time.

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-07/120225.htm

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.