Make grubby-bls execute grub2-mkconfig on ppc64

When booting an ppc64 machine on bare-metal (PowerNV) the OPAL firmware
interface is used. The firmware contains the Petitboot boot-loader that
can be used to parse the BootLoaderSpec (BLS) snippets in a BLS setup.

But machines could have an older version of Petitboot that doesn't have
BLS support, so on ppc64 machines can't be assumed that just modifying
the BLS files is enough for those changes to be reflected in the boot
menu. Instead, grub2-mkconfig is executed so the BLS can be parsed and
produce a grub config file that can be used by any Petitboot version.

Resolves: rhbz#1636039

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Javier Martinez Canillas 2018-10-05 12:13:49 +02:00
parent e4c6ac2467
commit b8c8cdcf6c
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69
1 changed files with 13 additions and 0 deletions

View File

@ -234,6 +234,8 @@ remove_bls_fragment() {
done
get_bls_values
update_grubcfg
}
add_bls_fragment() {
@ -308,6 +310,8 @@ add_bls_fragment() {
set_default_bls "TITLE=${title}"
fi
update_grubcfg
exit 0
}
@ -357,6 +361,8 @@ update_bls_fragment() {
set_bls_value "${bls_file[$i]}" "initrd" "${initrd}"
fi
done
update_grubcfg
}
set_default_bls() {
@ -397,6 +403,13 @@ remove_var_prefix() {
fi
}
update_grubcfg()
{
if [[ $arch = 'ppc64' || $arch = 'ppc64le' ]]; then
grub2-mkconfig -o /boot/grub2/grub.cfg >& /dev/null
fi
}
print_usage()
{
cat <<EOF