1.  MBR故障修复

 

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

备份

mkdir /pp

mount /dev/sdb1 /pp

dd if=/dev/sda of=/pp/mrb.bak bs=512 count=1

 

破坏mrb

dd if=/dev/zero of=/dev/sda bs=512 count=1

reboot

重启后镜像界面显示找不到引导系统,

连接光驱,进入紧急救援模式到shell字符界面还原备份

模拟MBR Grub故障修复 Linux 第1张

    2. Grub 文件丢失或损坏

 

挂载硬盘并备份groub.conf文件

mount /dev/sdb1 /pp

cd /boot/grub

cp grub.conf  /pp

破坏grub并重启系统

mv grub.conf grub.conf.bak

重新启动

 

引导停滞

模拟MBR Grub故障修复 Linux 第2张

 手动输入grup信息

模拟MBR Grub故障修复 Linux 第3张

最后输入boot启动系统

 进入系统,恢复原来文件

 cd /boot/grub/

mv grub.conf.bak  grub.conf

 

2.进入紧急救援模式,利用备份还原

 进入boot调整把光驱顺序提前,进入紧急救援模式,切换/ chroot/mnt/sysimage

模拟MBR Grub故障修复 Linux 第4张

重启系统

3.grub程序损坏

 

 

1.利用mrb的备份恢复

 破坏grub程序

dd if=/dev/zero of=/dev/sda bs=446 count=1

reboot

进入紧急救援模式,利用mrb备份还原

重启系统

 

2.重建grub

 破坏grub程序

dd if=/dev/zero of=/dev/sda bs=446 count=1

 进入紧急模式重新安装grub

chroot /mnt/sysimage

 grub -install /dev/sda

 vim /dev/grub/grub.conf

exit

reboot

3.rm -fr /booot/grub/利用备份还原文件

进入紧急救援模式重建grub

模拟MBR Grub故障修复 Linux 第5张

 模拟MBR Grub故障修复 Linux 第6张

 

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄