浏览量:112次
GNU GRUB(GRand Unified Bootloader简称“GRUB”)是一个来自GNU项目的多操作系统启动程序。GRUB是多启动规范的实现,它允许用户可以在计算机内同时拥有多个操作系统,并在计算机启动时选择希望运行的操作系统。GRUB可用于选择操作系统分区上的不同内核,也可用于向这些内核传递启动参数。
环境:Red Hat Enterprise Linux Server release 7.3
查看系统信息并重现故障
[root@localhost~]#lsb_release-aLSBVersion::core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarchDistributorID:RedHatEnterpriseServerDescription:RedHatEnterpriseLinuxServerrelease7.3(Maipo)Release:7.3Codename:Maipo[root@localhost~]#df-hFilesystemSizeUsedAvailUse%Mountedon/dev/mapper/rhel-root50G22G29G43%/devtmpfs1.9G01.9G0%/devtmpfs1.9G88K1.9G1%/dev/shmtmpfs1.9G9.0M1.9G1%/runtmpfs1.9G01.9G0%/sys/fs/cgroup/dev/sda11014M174M841M18%/boot/dev/sr03.6G3.6G0100%/media/cdrom/dev/mapper/rhel-home46G33M46G1%/hometmpfs378M8.0K378M1%/run/user/0[root@localhostgrub2]#grub2-install-Vgrub2-install(GRUB)2.02~beta2#用grub2-install--version也可以查看grub版本信息[root@localhost~]#ls/boot/grub2/device.mapfontsgrub.cfggrubenvi386-pclocalethemes[root@localhost~]#rm-rf/boot/grub2/grub.cfg[root@localhost~]#reboot故障重现
手动引导系统
重装grub
[root@localhost~]#ls/boot/grub2/device.mapfontsgrubenvi386-pclocalethemes[root@localhost~]#grub2-mkconfig>/boot/grub2/grub.cfgGeneratinggrubconfigurationfile...Foundlinuximage:/boot/vmlinuz-3.10.0-514.el7.x86_64Foundinitrdimage:/boot/initramfs-3.10.0-514.el7.x86_64.imgFoundlinuximage:/boot/vmlinuz-0-rescue-f0bcb62b11a44643824cde1c7f3833e4Foundinitrdimage:/boot/initramfs-0-rescue-f0bcb62b11a44643824cde1c7f3833e4.imgdone[root@localhost~]#ls/boot/grub2/device.mapfontsgrub.cfggrubenvi386-pclocalethemes[root@localhost~]#reboot#重启验证修复结果 重启后能再次成功进入系统,说明修复成功![声明]本网转载网络媒体稿件是为了传播更多的信息,此类稿件不代表本网观点,本网不承担此类稿件侵权行为的连带责任。故此,如果您发现本网站的内容侵犯了您的版权,请您的相关内容发至此邮箱【779898168@qq.com】,我们在确认后,会立即删除,保证您的版权。