歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Fedora grub修復

Fedora grub修復

日期:2017/2/28 16:58:17   编辑:Linux教程

Fedora grub修復其實很簡單,最關鍵的一步是進入rescue模式,我在Fedora下面怎麼都不知道哦如何進入,在Ubuntu下面還能進入,不過不進入 rescue模式也是可以安裝的。我是昨天安裝xp系統的時候,這個版本我以前沒用過,竟然不是ghost版本的,搞的我最終mbr被替換掉了。只好把 Fedora的grub修復一下了。

修復的步驟如下:

1,cd啟動盤,Fedora 8,或者Fedora 9都可以,甚至其他的有圖形界面安裝的linux版本都可以的,啟動後一直按照安裝的步驟進入安裝的桌 面,就是桌面上有一個文件夾,還有個計算機,還有個install的圖標的桌面,這時候,你從左上角的Fedora菜單欄裡面,找到系統工具,點擊終端。

2,終端裡面如何輸入請看我的輸入。

QUOTE:
[Fedora@localhost ~]$ grub
bash: grub: command not found
[Fedora@localhost ~]$ whereis grub
grub: /sbin/grub /usr/share/grub /usr/share/man/man8/grub.8.gz
[Fedora@localhost ~]$ su
[root@localhost Fedora]# /sbin/grub
Probing devices to guess BIOS drives. This may take a long time.
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ 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> root (hd0,7)
root (hd0,7)
Filesystem type is ext2fs, partition type 0×83
grub> setup (hd0)
setup (hd0)
Checking if “/boot/grub/stage1″ exists… yes
Checking if “/boot/grub/stage2″ exists… yes
Checking if “/boot/grub/e2fs_stage1_5″ exists… yes
Running “embed /boot/grub/e2fs_stage1_5 (hd0)”… 23 sectors are embedded.
succeeded
Running “install /boot/grub/stage1 (hd0) (hd0)1+23 p (hd0,7)/boot/grub/stage2 /boot/grub/grub.conf”… succeeded
Done.
grub>


3,解釋如下,su切換到root用戶,然後輸入 /sbin/grub 來啟動grub這樣就能開始grub>,然後開始安裝grub,輸入root (hd0,7),這裡面root後面有一個空格不要忘記了,hd後面的數字0,還有那個7要看你自己的情況來定了。0代表的是第幾塊硬盤,7代表的是第幾 個分區,你對於這不能很確定的話,可以點擊桌面上的install圖標,一直到他讓你選擇分區什麼的東西,你可以在那裡看看你的Fedora是裝在第幾個 分區裡面,我的是在第7個分區裡面,然後setup (hd0)也有空格的,這個0和前面的0是必須一樣的。

這個我的Fedora9的grub修復完了,我可以從grub引導啟動我的兩個系統了,windows和Fedora了。有問題給我留言,我會盡快解決。

Copyright © Linux教程網 All Rights Reserved