Reinstalling GRUB Bootloader from the Rescue System

This document (000019909) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12

Situation

GRUB boot loader is damaged for some reason and needs to be reinstalled.

Resolution

In order to fix this problem, grub2 bootloader need to be reinstalled. 
  1. How to Chroot in Rescue Mode
  2. Make sure /boot is mounted. (mount -a)
  3. Run: grub2-install <ROOT_DISK> 
  4. /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
Note: in case the root disk is part of LVM, then this is the PV holding root FS. E.g. /dev/sda 

From man grub2-install : 
INSTALL_DEVICE must be system device filename. grub-install copies GRUB images into boot/grub2. On some platforms, it may also install GRUB into the boot sector.

The YaST "bootloader" module uses this full command:
/usr/sbin/grub2-install --target=i386-pc --force --skip-fs-probe <root_disk>
This may be needed in certain scenarios.

Also, using the "yast bootloader" module can help resolve grub issues by running the command list above and by allowing other selections.

Additional caveats:
If the system is UEFI/EFI there is a specific command for that:
/usr/sbin/shim-install --config-file=/boot/grub2/grub.cfg

If there was a grub update error during patching or otherwise,
it should be logged in /var/log/pbl.log.
 

Additional Information

For SLES 11 "Grub v1" : Reinstalling GRUB from the Rescue System  
 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000019909
  • Creation Date: 30-Apr-2021
  • Modified Date:30-Apr-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center