重裝Win7後ubuntu啟動項不見的解決方案

來源:互聯網
上載者:User

轉載請註明地址:http://blog.csdn.net/ethan_xue/article/details/7538568

1.u盤燒錄ubuntu鏡像,只貼有痛點的圖(從別的部落格找的圖,懶的了)

點寫入即可

2.設定bios為usb 啟動

3.會從u盤進入ubuntu,點試用ubuntu

4.ctrl+alt+t開啟終端輸入sudo -i(獲得管理員權限)

輸入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這個分區。有時會有多個83,可根據大小判斷哪個是真正的分區

5.在終端輸入mount /dev/sda* /mnt

  mount /dev/sda* /mnt/boot

   (*代表ubuntu系統所在的分區,即上一步顯示結果中ID為83的分區號,如上面顯示的是在sda6這個分區,所以輸入的是mount /dev/sda6 /mnt

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

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

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

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

7.到此,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

   恢複工作便全部完成了。

參考文章:http://www.cnblogs.com/dolphin0520/archive/2012/03/11/2390175.html

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.