grub進入windows和linux

來源:互聯網
上載者:User
 

裝了windows和linux雙系統,突然開機後沒有出現啟動菜單,而是出現了

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the
possible completions of a device/filename. ]

grub>;

 

在這種情況下怎麼進入windows和linux系統呢?

 

進入windows,進行如下操作:

grub>root (hd0,0)         //第1塊硬碟的第一個分區C

grub>chainloader (hd0,0)+1     //加入鏈

grub>boot       //即可進入windows系統

 

進入linux,進行如下操作:

grub>root (hd0,6)   //這裡的6表示的是我機器上linux系統/boot所在的分區號,具體數值取決於自己實際情況
grub>kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686 ro root=LABEL=/  
//vmlinuz-2.6.27.5-117.fc10.i686是可執行檔Linux核心,位於/boot目錄下,核心版本不一樣,這個檔案也不一
樣,所以具體檔案名稱取決於自己實際情況
grub>initrd /boot/initrd-2.6.27.5-117.fc10.i686.img  
//initrd-2.6.27.5-117.fc10.i686.img是初始化linux的鏡像,位於/boot目錄下,核心版本不一樣,這個檔案也
不一樣,所以具體檔案名稱取決於自己實際情況
grbu>boot    //即可進入linux系統

 

以上方法雖然可以進入系統,但是每次開機都要輸入這些命令。解決方案就是重新將grub寫入mbr,使得開機後啟動菜單能夠出現。

具體方法如下:

1. 進入linux系統

2. [root@localhost ~]# grub  //會出現grub>提示符,這是grub命令列模式 ,如果能在開機中出現提示符,沒有引導不起來的系統,除非您的系統破壞的極為嚴重。如果僅僅是GRUB被破壞了,GRUB命令列是能讓作業系統引導起來

3. grub> find /boot/grub/stage1 //找到 /boot/grub/stage1,我的系統會出現(hd0,6),這是/boot所在的分區;不要誤解為是Linux 的/所在的分區

4. grub>root (hd0,6)  //這是/boot所在的分區
5.grub>setup (hd0)  //把GRUB寫到MBR上

 

這樣以後,再開機啟動,就會出現啟動選擇菜單了。

聯繫我們

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