Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
482a2825c4 |
||
|
|
6095bc576b | ||
|
|
0eb1bed0a5 | ||
|
|
7d63bffff9 |
3 changed files with 37 additions and 11 deletions
22
grubby-bls
22
grubby-bls
|
|
@ -567,7 +567,7 @@ set_default_bls() {
|
|||
echo "default=${default}" >> "${zipl_config}"
|
||||
fi
|
||||
fi
|
||||
|
||||
update_grubcfg
|
||||
print_info "The default is ${bls_file[$index]} with index $index and kernel $(get_prefix)${bls_linux[$index]}"
|
||||
}
|
||||
|
||||
|
|
@ -599,17 +599,19 @@ remove_var_prefix() {
|
|||
|
||||
update_grubcfg()
|
||||
{
|
||||
# Older ppc64le OPAL firmware don't have BLS support so grub2-mkconfig has to be run
|
||||
# to generate a config with menuentry commands.
|
||||
if [ "${arch}" = "ppc64le" ] && [ -d /sys/firmware/opal ]; then
|
||||
# Turn on RUN_MKCONFIG on different archs/scenarios
|
||||
if [[ "${arch}" = 's390' ]] || [[ "${arch}" = 's390x' ]]; then
|
||||
# On s390/s390x systems, run mkconfig/zipl
|
||||
RUN_MKCONFIG="true"
|
||||
fi
|
||||
|
||||
# PV and PVH Xen DomU guests boot with pygrub that doesn't have BLS support,
|
||||
# also Xen Dom0 use the menuentries from 20_linux_xen and not the ones from
|
||||
# 10_linux. So grub2-mkconfig has to run for both Xen Dom0 and DomU.
|
||||
if [[ -e /sys/hypervisor/type ]] && grep -q "^xen$" /sys/hypervisor/type; then
|
||||
elif [[ "${arch}" = "ppc64le" ]] && [[ -d /sys/firmware/opal ]]; then
|
||||
# Older ppc64le OPAL firmware don't have BLS support so grub2-mkconfig has to be run
|
||||
# to generate a config with menuentry commands.
|
||||
RUN_MKCONFIG="true"
|
||||
elif [[ -e /sys/hypervisor/type ]] && grep -q "^xen$" /sys/hypervisor/type; then
|
||||
if [ ! -e /sys/hypervisor/guest_type ] || ! grep -q "^HVM$" /sys/hypervisor/guest_type; then
|
||||
# PV and PVH Xen DomU guests boot with pygrub that doesn't have BLS support,
|
||||
# also Xen Dom0 use the menuentries from 20_linux_xen and not the ones from
|
||||
# 10_linux. So grub2-mkconfig has to run for both Xen Dom0 and DomU.
|
||||
RUN_MKCONFIG=true
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
20
grubby.spec
20
grubby.spec
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
Name: grubby
|
||||
Version: 8.40
|
||||
Release: 82%{?dist}
|
||||
Release: 86%{?dist}
|
||||
Summary: Command line tool for updating bootloader configs
|
||||
License: GPL-2.0-or-later
|
||||
Source1: grubby-bls
|
||||
|
|
@ -12,6 +12,7 @@ Source3: COPYING
|
|||
Source5: 95-kernel-hooks.install
|
||||
Source6: 10-devicetree.install
|
||||
Source7: grubby.8
|
||||
Source8: kernel.sysconfig
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: glib2-devel
|
||||
|
|
@ -59,6 +60,9 @@ install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE6}
|
|||
mkdir -p %{buildroot}%{_mandir}/man8
|
||||
install -m 0644 %{SOURCE7} %{buildroot}%{_mandir}/man8/
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
||||
install -m 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/kernel
|
||||
|
||||
%post
|
||||
if [ "$1" = 2 ]; then
|
||||
arch=$(uname -m)
|
||||
|
|
@ -72,8 +76,22 @@ fi
|
|||
%attr(0755,root,root) %{_prefix}/lib/kernel/install.d/10-devicetree.install
|
||||
%attr(0755,root,root) %{_prefix}/lib/kernel/install.d/95-kernel-hooks.install
|
||||
%{_mandir}/man8/grubby.8*
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/kernel
|
||||
|
||||
%changelog
|
||||
* Wed Dec 10 2025 Simon de Vlieger <cmdr@supakeen.com> - 8.40-86
|
||||
- Own `/etc/sysconfig/kernel` which is used for `grubby` configuration
|
||||
|
||||
* Wed Jul 30 2025 Leo Sandoval <lsandova@redhat.com> - 8.40-85
|
||||
- Update cfg when setting a default kernel
|
||||
|
||||
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 8.40-84
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Thu Mar 20 2025 Leo Sandoval <lsandova@redhat.com> - 8.40-83
|
||||
- grubby-bls: in s390* systems, run zipl on grub cfg update event
|
||||
Fixes previous commit and formats better the conditions that trigger grub cfg updates
|
||||
|
||||
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 8.40-82
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
6
kernel.sysconfig
Normal file
6
kernel.sysconfig
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# UPDATEDEFAULT specifies if kernel-install should make
|
||||
# new kernels the default
|
||||
UPDATEDEFAULT=yes
|
||||
|
||||
# DEFAULTKERNEL specifies the default kernel package type
|
||||
DEFAULTKERNEL=kernel-core
|
||||
Loading…
Add table
Add a link
Reference in a new issue