• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Rebuild GRUB on MSDOS Partition Type in CentOS/RHEL/OEL 7

by admin

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

Filed Under: CentOS/RHEL 7, Linux, OEL 7

Some more articles you might also be interested in …

  1. fprintd-verify: command not found
  2. CentOS / RHEL 7 : How to install and configure ftp server (vsftpd)
  3. collectd : command not found
  4. CentOS / RHEL : How to find free space in a Volume Group in LVM
  5. CentOS / RHEL 7 : Beginners guide to systemd service units
  6. How to create virtual block device (loop device/filesystem) in Linux
  7. How to Change Default Permission of /var/log/messages in CentOS/RHEL
  8. What does refid value “.LOCL.” mean in NTP
  9. a2enconf Command Examples in Linux
  10. aptitude Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • ncat Command Examples in Linux
  • ncat: command not found
  • nautilus Command Examples in Linux
  • namei: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright