雙系統下重裝Windows後,如何恢複Ubuntu

來源:互聯網
上載者:User

        在重裝系統之後,開機啟動介面的ubuntu引導不見了,直接進入新安裝的window系統中。下面是如何恢複ubuntu引導的方法:

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

        2)將ubuntu系統安裝盤放入光碟機,重新啟動電腦,進入BIOS,將開機啟動設定為光碟機(CD/ROM)啟動方式;

        3)然後儲存設定退出,等待片刻就進入到ubuntu的安裝介面,此時有兩個選擇

           1.在該光碟片上試用ubuntu系統

           2.將ubuntu系統安裝到電腦上

           選擇"在該光碟片上試用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

           恢複工作便全部完成了。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.