您的位置:首页 > 其它

重装Windows 7后,Ubuntu 13.04 引导修复方法

2014-03-31 16:19 453 查看
由于Windows7系统用了一年半了,很卡,遂决定重装,重装后发现Ubuntu进不去了。

网上找到一个方法,但最后一步出了问题。

$ sudo update-grub2

/usr/sbin/grub-probe: error: failed to get canonical path of /cow.

注记:对于这个问题的解决后面我发现了一个方法,但暂时不需要去尝试了。详见页面最后。

在搜索过程中,发现了这个工具Boot-Repair

这个工具专门用于修复各种启动不了的问题。上面的链接给出了两种方法,这里只摘录之一。

通过Ubuntu live-CD或者live-USB启动系统,选择适用Ubuntu,之后要保证电脑可以联网。

打开终端,输入

$ sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

$ sudo apt-get install -y boot-repair && (boot-repair &)

之后Boot-Repair会自动打开,如果没有打开的话,可以在终端输入boot-repair。

选择“Recommended repair”,等待若干分钟,修复完成后可以看到一个链接,可保存链接。之后重启系统。

如果问题没有解决,把这个链接发送到boot.repair@gmail.com寻求进一步地帮助。

--------------

顺便附上最初尝试的时候参考的一些链接,以及方法。
http://zengwu3915.blog.163.com/blog/static/278348972011719111122960/ http://jingyan.baidu.com/album/e75aca85ae172f142edac62d.html http://www.linuxidc.com/Linux/2011-07/38086.htm http://www.tuicool.com/articles/VzYVJf
这个方法也需要通过Ubuntu live-CD或者live-USB启动系统。

$ sudo su

# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes

255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk identifier: 0x8384a74b

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *        2048   212721663   106359808    7  HPFS/NTFS/exFAT

/dev/sda2       212721664   929519615   358398976    7  HPFS/NTFS/exFAT

/dev/sda3       929519616  1543919615   307200000    7  HPFS/NTFS/exFAT

/dev/sda4      1543933502  1953523711   204795105    5  Extended

Partition 4 does not start on physical sector boundary.

/dev/sda5      1543933504  1850506559   153286528    7  HPFS/NTFS/exFAT

/dev/sda6      1945714688  1953523711     3904512   82  Linux swap / Solaris

/dev/sda7      1850507264  1945712639    47602688   83  Linux

Partition table entries are not in disk order

# mount /dev/sda7 /mnt

如果你的/boot是单独在一个分区,还需要装那个分区挂到/mnt/boot上,例如,/boot在sda5分区上。

输入 mount /dev/sda5 /mnt/boot

为了确保/boot是否挂上,可以使用 ls /boot 来查询。
# grub-install --root-directory=/mnt /dev/sda

Installation finished. No error reported.
$ sudo update-grub2

/usr/sbin/grub-probe: error: failed to get canonical path of /cow.

---------------

发现了这两个链接
http://blog.sina.com.cn/s/blog_6268defa0100t2d3.html http://hi.baidu.com/bandicam21/item/49f6adb71c56cb7b254b09b5
也就是说,最后一条命令实际应该是在重启后选择Ubuntu,打开终端后再输入的。

不过我的问题已经解决了,所以暂时没有尝试,不过感觉上挺靠谱的。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息