裝了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上
這樣以後,再開機啟動,就會出現啟動選擇菜單了。