SUSE Support

Here When You Need Us

Installing bootloader on POWER system fails with "symbol `grub_disk_get_size' not found"

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

Environment

SUSE Linux Enterprise Server 15SP4
SUSE Linux Enterprise Server 15SP3
SUSE Linux Enterprise Server 15SP2

Situation

A SUSE Linux Enterprise Server, POWER architecture is being installed, updated or migrated to the next Service Pack.
Kernel update or even installation fails with an error.
In the yast2 logs one can find e.g.
 
2022-06-28 11:09:46 <3> update-bootloader-9653 run_command.294: '/usr/lib/bootloader/grub2/install' failed with exit code 1, output:
<<<<<<<<<<<<<<<<
target = powerpc-ieee1275
+ /usr/sbin/grub2-install --suse-inhibit-signed --target=powerpc-ieee1275 --force --skip-fs-probe /dev/disk/by-id/<sanitized>
Installing for powerpc-ieee1275 platform.
nvram: ERROR: cannot open "/dev/nvram": No such device
nvram: ERROR: cannot open "/dev/misc/nvram": No such file or directory
/usr/sbin/grub2-install: error: `nvsetenv' failed. 
You will have to set `boot-device' variable manually.  At the IEEE1275 prompt, type:
  setenv boot-device /vdevice/vfc-client@30000015/disk@<serial-id>

Note the "nvram: ERROR: cannot open "/dev/nvram": No such device" which points to the problem

Resolution

Make sure the "nvram" kernel module is loaded before attempting to install or update a kernel.
# modprobe nvram 

Cause

Since kernel 5.1 nvram is not a builtin, but a kernel module (CONFIG_NVRAM=m) on the POWER architecture.
Under rare circumstances the nvram module is not loaded and a grub2 check fails during installing the bootloader.
If the old kernel is removed, booting will fail and the system stops in
# grub_rescue:> 

 

Additional Information

Issue is reported to SUSE engineering already.

In case the system is not booting anymore already, use the following fix:

Boot a rescue system from a SLES15 SP2/3/4 installation iso.
1 -  On the menu, select “Rescue system” or “more” and “Rescue system”.

2 - By default, the rescue system will activate the LVM volume group right away, which is not optimal when rescuing a system with multipath configured.

In order to deactivate the volume group, use the following command :
# vgchange -an 
Now,  start the multipath service with :
 
# modprobe dm_multipath
# systemctl restart multipathd  

Confirm that the paths are visible with the command :
# multipath -ll 

 3 – Make sure that the filter in /etc/lvm/lvm.conf is set to accept only multipath devices by changing the "filter =" line as described below :
filter = [ "a|/dev/disk/by-id/dm-uuid-.*mpath.*|", "r/.*/" ] 

Starting 15SP3, we don't use lvmetad anymore, so just check with
# pvscan ; vgscan 

If set correctly, the “pvscan” command shouldn't output "Found duplicate PV" messages.
If it does, or if no devices at all are shown, the filter is wrong. Check for typos.

4 – Mount the root LV using  /dev/mapper and bind /proc, /dev, /sys and /run to it:
# vgchange -ay
# mount /dev/mapper/system-root /mnt
# mount /dev/mapper/system-usr /mnt/usr  <---Necessary only if /usr is a separate partition!
# for i in /dev /proc /sys /run ; do mount -o bind /$i /mnt/$i ; done
 

  5 - Now the nvram kernel module must be loaded!
 
# modprobe nvram

6 - Make sure the LVM filter in the installed system is set similar to the above.

7 -  Next change  root to /mnt
# chroot /mnt
# mount -a
 
and check if all local volumes are mounted correctly

8 - First, determine the PReP partition. It is mandatory to boot the system and should be the first partition on the disk, size typically between 4 and 12MB, so, pretty small.
# fdisk -l  | less 

Then proceed with reinstalling grub2 into the PReP partition found above:
# grub2-install /dev/mapper/360000000000000000000000000000000-part1   # EXAMPLE!

Then exit chroot and reboot.

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:000020692
  • Creation Date: 07-Jul-2022
  • Modified Date:18-Jul-2022
    • SUSE Linux Enterprise Server
    • SUSE Linux Enterprise Server for SAP Applications

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

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

tick icon

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.

tick icon

Open an Incident

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