Question: How to Rebuild Grub on Linux servers with MSDOS Partition type.
(proc) (hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)
1. Execute the following commands in Grub prompt to set the root device and to load the boot image and initialize boot loader.
> set root=(hd0,msdos1) > linux16 /vmlinuz-3.10.0-327.el7.x86_64 root=/dev/sda5 > initrd16 /initramfs-3.10.0-327.el7.x86_64.img
Then boot the server.
2. Once the server boots up, rebuild the Grub config file. You can edit the /etc/default/grub and modify the parameter “GRUB_TIMEOUT=30”
# cat /etc/default/grub GRUB_TIMEOUT=30 GRUB_HIDDEN_MENU_QUIET=false GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL="serial console" GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1" GRUB_CMDLINE_LINUX="console=tty0" GRUB_DISABLE_RECOVERY="true"
3. Rebuild the grub.cfg. On BIOS-based machines, issue the following command as root:
# grub2-mkconfig -o /boot/grub2/grub.cfg