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:
parent
e4c6ac2467
commit
b8c8cdcf6c
13
grubby-bls
13
grubby-bls
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user