天天看點

重裝Windows 7後,Ubuntu 13.04 引導修複方法

由于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”,等待若幹分鐘,修複完成後可以看到一個連結,可儲存連結。之後重新開機系統。

如果問題沒有解決,把這個連結發送到[email protected]尋求進一步地幫助。

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

順便附上最初嘗試的時候參考的一些連結,以及方法。

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,打開終端後再輸入的。

不過我的問題已經解決了,是以暫時沒有嘗試,不過感覺上挺靠譜的。

繼續閱讀