Centos启动报错error can’t find command的修复方法

现有一台centos服务器,断电后,再重启,在5秒倒计时的启动项(按e进入单用户模式的启动项菜单)之后报错,报错信息如下:
error can’t find command ‘setparams’ .
error can’t find command ‘insmod’ .
error can’t find command ‘set’ .
error can’t find command ‘insmod’ .
error can’t find command ‘insmod’ .
error can’t find command ‘insmod’ .
error can’t find command ‘set’ .
error can’t find command ‘search’ .
error can’t find command ‘linux16’ .
error can’t find command ‘initrd16’ .

Press any key to continue…

此时,按任意键后会进入启动项菜单,然后再次出现此报错,如果再按键则又循环。

怀疑为grub文件损坏,准备进入救援模式修复grub。使用live镜像启动后,chroot /mnt/sysimage切换到根目录,发现chroot报错,通过lsblk发现根分区为sda2的centos-root,手动mount /dev/mapper/centos-root /mnt/sysimage报分区有问题需要修复,使用xfs_repair -L /dev/sda2修复后,直接reboot重启,这次可以跳过error can’t find command的报错,并且可以到登录界面,但是登录后出现报错dm-0:Unmount and run xfs_repair。

再次挂载live镜像,再次使用命令修复根分区xfs_repair -L /dev/sda2,然后reboot后,可正常启动并登录系统,未出现报错。