• 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. How to Disable NetworkManager in CentOS/RHEL 8
  2. crontab error : “You (user) are not allowed to access to (crontab) because of pam configuration.”
  3. acme.sh –dns: Use a DNS-01 challenge to issue a TLS certificate (Command Examples)
  4. CentOS / RHEL 7 : How to boot into Rescue Mode or Emergency Mode
  5. How to troubleshoot NFS transfer latency issues using “nfsiostat” in CentOS / RHEL
  6. atoum: A simple, modern and intuitive unit testing framework for PHP (Command Examples)
  7. edquota Command Examples in Linux
  8. runcon: command not found
  9. i3lock: command not found
  10. Rpm: Error While Loading Shared Libraries: Libz.so.1: Cannot Open Shared Object File: No Such File

You May Also Like

Primary Sidebar

Recent Posts

  • batch: Execute commands at a later time when the system load levels permit
  • bat: Print and concatenate files
  • bastet: Clone of the game Tetris in the terminal
  • bashmarks: Save and jump to commonly used directories using 1 character commands

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright