zoukankan      html  css  js  c++  java
  • grub 启动错误 "file not found"

    刚安装ubuntu 14.4 竟然出现这么尴尬的事,ubuntu 行不行?

    幸好还是能从u盘启动后,转到硬盘。

    然后在网上找到了解决方法。

    http://askubuntu.com/questions/88384/how-can-i-repair-grub-how-to-get-ubuntu-back-after-installing-windows


    Boot from the live CD or live USB, in "Try Ubuntu" mode.
    Determine the partition number of your main partition. GParted (which should already be installed, by default, on the live session) can help you here. I'm going to assume in this answer that it's /dev/sda2, but make sure you use the correct partition number for your system!

    Mount your partition:

    sudo mount /dev/sda2 /mnt #Replace sda2 with your partition number

    Bind mount some other necessary stuff:

    for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done

    chroot into your Ubuntu install:

    sudo chroot /mnt

    At this point, you're in your install, not the live session, and running as root. Update grub:

    update-grub

    If you get errors, go to step 7. (Otherwise, it is optional.)

    Depending on your situation, you might have to reinstall grub:

    grub-install /dev/sda
    update-grub # I'm not sure if this is necessary, but it doesn't hurt.

    If everything worked without errors, then you're all set:

    exit
    sudo reboot

    At this point, you should be able to boot normally.

  • 相关阅读:
    UVA 221
    A Typical Homework(学生信息管理系统)
    追踪电子表格中的单元格
    浮点数!!!(摘)
    poj 3158kickdown
    循环小数 UVa202
    Unix is 命令
    W
    V
    完美世界 字符串倒置输出
  • 原文地址:https://www.cnblogs.com/johnsonshu/p/5159194.html
Copyright © 2011-2022 走看看