大家好,我是 linux 的新手,遇到以下问题请大家帮忙
一台装了 suse 9.1 的服务器,某日因为断电,重启后无法进入系统,只出现 grub 提示符
键入 root (hd0, [tab]
出现3个分区,第一个和第三个为 ex2, 向安装此服务器的人求证得知当初安装时 boot 为单独分区,应该为第一个分区,第二分区应该为 swap
于是尝试
root (hd0,0)
setup (hd0)
出现
Checking if "/boot/grub/stage1" exists ....no
Checking if "/grub/stage1" exists ... no
Error 15: File not found
就算尝试
root (hd0,2)
setup (hd0)
也是出现 File not found 的错误
用光盘启动然后启动 rescue system , 键入
mount /dev/hda1 /mnt/hda1
mount /dev/hda3 /mnt/hda3
查看 hda1 居然是空的,而 hda3 的数据还在,
而且 hda3 的 etc 和 bin 文件夹也不见了,汗
请问是不是 boot 分区被破坏了,或者以上操作有什么不对的地方,要怎样才能修复这个系统,是不是要重装 kernel ?还是这个硬盘已经坏了。
最近被这个问题烦扰了很久, 请各位高手们指教, 小弟先谢了
Suse无法启动
- xc1427
- 帖子: 276
- 注册时间: 2008-10-11 4:11
- 来自: 瑞金无线电学校
- 联系:
Re: Suse无法启动
用光盘启动然后启动 rescue system
然后重装一下grub,不知掉suse里是怎么重装。应该也是某个命令
然后重装一下grub,不知掉suse里是怎么重装。应该也是某个命令
You never know if you don't try
-
- 帖子: 3
- 注册时间: 2009-01-08 0:34
Re: Suse无法启动
请问怎样重装 grub 啊 ? 貌似没用哦..
论坛里的牛人都到哪去了啊, 帮帮小弟吧, 快崩溃了
论坛里的牛人都到哪去了啊, 帮帮小弟吧, 快崩溃了
- xc1427
- 帖子: 276
- 注册时间: 2008-10-11 4:11
- 来自: 瑞金无线电学校
- 联系:
Re: Suse无法启动
You never know if you don't try
-
- 帖子: 91
- 注册时间: 2008-11-22 9:38
Re: Suse无法启动
Suse 在 rescue mode 下 執行 grub-install /dev/sda 會發生錯誤
http://en.opensuse.org/SDB:Failure_of_grub-install
放入光碟 進入 rescue system
# mount /dev/sdaX /mnt
# mount -o bind /proc /mnt/proc
# mount -o bind /sys /mnt/sys
# mount -o bind /dev /mnt/dev
# chroot /mnt
# mount -a
# mount -o rw,remount /
# ls /usr/lib/grub/
有stage1 stage2 *1_5 的檔案
# cd /usr/lib/grub/ ; cp *1_5 stage* /boot/grub/
# cp stage1 stage2 /boot/grub/
# ls /boot/grub
stage1 stage2 *1_5 已經還原
還原之後執行 grub-install /dev/sda
# grub-install /dev/sda
# cd /boot/grub ; ls
device.map 也還原
# exit
# exit
root 登入 rescue 之後 init 0 退出光碟機
系統可正確進入!!!!
http://en.opensuse.org/SDB:Failure_of_grub-install
放入光碟 進入 rescue system
# mount /dev/sdaX /mnt
# mount -o bind /proc /mnt/proc
# mount -o bind /sys /mnt/sys
# mount -o bind /dev /mnt/dev
# chroot /mnt
# mount -a
# mount -o rw,remount /
# ls /usr/lib/grub/
有stage1 stage2 *1_5 的檔案
# cd /usr/lib/grub/ ; cp *1_5 stage* /boot/grub/
# cp stage1 stage2 /boot/grub/
# ls /boot/grub
stage1 stage2 *1_5 已經還原
還原之後執行 grub-install /dev/sda
# grub-install /dev/sda
# cd /boot/grub ; ls
device.map 也還原
# exit
# exit
root 登入 rescue 之後 init 0 退出光碟機
系統可正確進入!!!!
-
- 帖子: 91
- 注册时间: 2008-11-22 9:38
Re: Suse无法启动
你先用 rescue mode 進入後 chroot
去看 stage1 stage2 *1_5 menu.lst 這些檔案是否正常
1. 如果檔案存在 先 fsck (請先 exit exit 再用root login 記得不要掛載 partition !!!)
2. 如果檔案有問題依照上面的做法 去救援看看
Checking if "/boot/grub/stage1" exists ....no
Checking if "/grub/stage1" exists ... no
Error 15: File not found
看起來應該是 stage1 出問題
去看 stage1 stage2 *1_5 menu.lst 這些檔案是否正常
1. 如果檔案存在 先 fsck (請先 exit exit 再用root login 記得不要掛載 partition !!!)
2. 如果檔案有問題依照上面的做法 去救援看看
Checking if "/boot/grub/stage1" exists ....no
Checking if "/grub/stage1" exists ... no
Error 15: File not found
看起來應該是 stage1 出問題
-
- 帖子: 3
- 注册时间: 2009-01-08 0:34
Re: Suse无法启动
感谢ago1414的帮助, 但是我安装了 grub 之后应该怎样? load kernel 吗?
可是我的 boot 分区已经没东西了....
运行了 grub --install 后只有 grub , lost+found
我已经不抱希望了, 准备重装吧
可是我的 boot 分区已经没东西了....
运行了 grub --install 后只有 grub , lost+found
我已经不抱希望了, 准备重装吧
-
- 帖子: 91
- 注册时间: 2008-11-22 9:38
Re: Suse无法启动
kernel 都不見了
你去抓他的 kernel RPM 來裝 看看
不行就沒辦法了
你去抓他的 kernel RPM 來裝 看看
不行就沒辦法了