Ubuntu: windows Installation Error sh: grub

Source: Internet
Author: User

 

First, when sh: grub is displayed, type the following code:
Ls will display the current hard disk partition, as my result is
(Hd0) (hd0, 1) (hd0, 5) (hd0, 6)

 

(Hd0, 1) is a C drive. I installed ubuntu on a D Drive, that is (hd0, 5). In fact, as long as you know which partitions are there, you can try them one by one, the following code is used:

Set root = (hd0, 5) enter
Loopback loop0/ubuntu/disks/root. disk enter
Set root = (loop0) enter
Linux/boot/vmlinuz-2.6.31-14 (TAB key filled) root =/dev/sda5 loop =/ubuntu/disks/root. disk enter
Initrd/boot/initrd. img-2.6.31-14 (TAB key filled) enter
Boot enter

In case of any exceptions, ubuntu can be started normally. After it is started, enter the following code in the terminal:
Sudo update-grub2 enter

Copy grub. cfg in the/boot/grub/directory to the/host/ubuntu/install/boot/grub/directory, and restart ubuntu.
If there is no install and there is no boot folder, create it by myself.

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.