雙系統(Windows+Ubuntu)重裝Ubuntu後,修複引導

來源:互聯網
上載者:User

標籤:str   出現   解決   umount   style   window   color   技術   bin   

重裝Ubuntu後,重啟機器,Windows系統消失了。進入BIOS修改啟動順序,Windows系統復原了,但是,剛裝好的Ubuntu沒了,一開機,電腦自動進入Windows。

解決辦法:

用裝系統的隨身碟進入Ubuntu live,開啟終端:

1、輸入sudo -i

2、找到安裝Ubuntu的掛載點(使用fdisk -l命令查看),,我的在/dev/sda9。

 

3、輸入 mount /dev/sda9 /mnt

4、如果有/boot分區,需要做此步,否則,跳過。具體為,再次輸入命令 mount boot分區的掛載點 /mnt,格式和步驟3是一樣的。

5、安裝grub,輸入 grub-install --root-directory=/mnt /dev/sda (注意空格。--root和/dev/sda前面都有個空格)

6、如果grub.cfg丟失,或者grub.cfg出現錯誤,那麼,執行下面的操作(注意空格):

  mount -bind /proc /mnt/proc

  mount -bind /dev /mnt/dev

  mount -bind /sys /mnt/sys

  chroot /mnt update-grub

  umount /mnt/sys

  umount /mnt/dev

  umount /mnt/proc

7、reboot

 

雙系統(Windows+Ubuntu)重裝Ubuntu後,修複引導

相關文章

聯繫我們

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