天天看點

雙系統重裝windows/Xp後如何恢複ubuntu引導

在重裝系統之後,開機啟動界面的ubuntu引導不見了,直接進入新安裝的window系統中。

下面是如何恢複ubuntu引導的方法:

1)準備一張ubuntu系統安裝盤;

2)将ubuntu系統安裝盤放入光驅,重新啟動計算機,進入BIOS,将開機啟動設定為光驅(CD/ROM)啟動方式;

3)然後儲存設定退出,等待片刻就進入到ubuntu的安裝界面,此時有兩個選擇:1.在該CD光牒上試用ubuntu系統,2.将ubuntu系統安裝到計算機上,選擇"在該CD光牒上試用ubuntu系統",進入到ubuntu系統之後,打開終端(快捷鍵組合是Ctrl+Alt+T);

4)在終端下輸入sudo -i(獲得管理者權限)

5)在終端下輸入fdisk -l(是小寫的字母'L',檢視盤符清單)

    會出現類似下面的資訊:

    Disk /dev/sda: 320.1 GB, 320072933376 bytes 

    255 heads, 63 sectors/track, 38913 cylinders 

    Units = cylinders of 16065 * 512 = 8225280 bytes 

    Disk identifier: 0x70f7ab9c

    Device    Boot    Start   End Blocks    Id   System 

    /dev/sda1 1       1627     13060096     27   Unknown 

    Partition 1       does not end on cylinder boundary. 

    /dev/sda2 *       1627     1639102400   7    HPFS/NTFS 

    Partition 2 does not end on cylinder boundary. 

    /dev/sda3 1639     8166     52429859     7   HPFS/NTFS 

    /dev/sda4 8167     38913    246975277+   5   Extended 

    /dev/sda5 8167     32385    194539082+  7    HPFS/NTFS 

    /dev/sda6 32386    38788    51432066    83   Linux 

    /dev/sda7 38789    38913    1004031     82   Linux swap / Solaris

    然後找到ID為83的盤符,根據上面顯示的資訊可知當時裝ubuntu時是裝在sda6這個分區。

6)在終端輸入mount /dev/sda* /mnt

    (*代表ubuntu系統所在的分區,即上一步顯示結果中ID為83的分區号,如上面顯示的是在sda6這個分區,

    是以輸入的是mount /dev/sda6 /mnt

    注意:mount後面有一個空格,sda6後面也有一個空格,這兩個空格千萬不要漏掉,否則會報錯)

7)上一步結束之後,繼續在終端中輸入grub-install --root-directory=/mnt /dev/sda

    等待一會兒,若出現Installationfinished,No Error Reported則表示成功了

    (注意:grub-install之間沒有空格,--root前面有一個空格,--root前面是兩個'-',/mnt後面有一個空格)

8)到此,ubuntu引導基本恢複,重新開機電腦後,就可以看到熟悉的ubuntu引導界面了,進入ubuntu系統,打開終端輸入

    sudo update-grub

    等待片刻顯示以下資訊:

           Generating grub.cfg ... 

    Found linux image: /boot/vmlinuz-2.6.31-20-generic 

    Found initrd image: /boot/initrd.img-2.6.31-20-generic 

    Found memtest86+ image: /boot/memtest86+.bin 

    Found Windows Vista (loader) on /dev/sda1 

    Found Windows 7 (loader) on /dev/sda2 

    done

    恢複工作便全部完成了。

繼續閱讀