zoukankan      html  css  js  c++  java
  • ubuntu: windows安装错误 sh:grub

    首先,当显示sh:grub的时候,敲入如下代码
    ls,会显示当前硬盘分区的情况,像我的结果就是
    (hd0) (hd0,1) (hd0,5) (hd0,6)

    (hd0,1)是C盘,我把ubuntu安装在D盘,就是(hd0,5),其实只要知道有哪几个分区就行了,可以一个个试的,然后是下面的代码:

    set root=(hd0,5) enter
    loopback loop0 /ubuntu/disks/root.disk enter
    set root=(loop0) enter
    linux /boot/vmlinuz-2.6.31-14(TAB键补齐) root=/dev/sda5 loop=/ubuntu/disks/root.disk enter
    initrd /boot/initrd.img-2.6.31-14(TAB键补齐) enter
    boot enter

    不出意外的话,ubuntu就能够正常启动了,启动之后终端中键入如下代码:
    sudo update-grub2 enter

    然后复制 /boot/grub/目录下的grub.cfg,到/host/ubuntu/install/boot/grub/目录下面,重启ubuntu应该就可以了
    如果没有install下面没有boot文件夹的话,自己新建吧,我就是自己建的

  • 相关阅读:
    inner join on, left join on, right join on讲解(转载)
    ref 与 out
    Shell基础01
    Python 基础01
    linux基础03
    Shell基础02
    linux基础02
    Linux基础01
    linux基础05
    linux基础04
  • 原文地址:https://www.cnblogs.com/forward/p/1710560.html
Copyright © 2011-2022 走看看