• 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. Understanding MySQL Privileges
  2. pwdx Command Examples in Linux
  3. “No space left on device” – kdump generation issue (CentOS/RHEL)
  4. How To Generate An CentOS/RHEL 6 UEFI Bootable ISO Image
  5. Linux OS Service ‘irqbalance’
  6. imagemagick for image optimization
  7. How To Send Mails To an External User With Mailx on Linux
  8. “su: Authentication failure” – in Docker
  9. How to Disable “alt+ctrl+Del” Key Combination causing reboot in CentOS/RHEL 4,5
  10. CentOS / RHEL 6 : How to configure kdump

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright