首先模拟grub损坏,dd if=/dev/zero of=/dev/sda count=1 bs=400
grub引导破坏,但是此时并未重启,可以直接重新安装grub,从而达到恢复grub:
第一种方法:
1、首先输入grub 进入grub命令行
[[emailprotected] networking]# 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,0) 制定内核所在分区
root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0) 直接使用setup安装,setup (hd0)直接安装在hd0第一引导的硬盘上
setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if &#