-
Notifications
You must be signed in to change notification settings - Fork 542
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This changes removes the mkinitrd script and replaces all calls with direct calls to dracut. In addition, the /boot/initrd.img-<kver> file has been renamed to /boot/initramfs-<kver>.img to match the default name used by dracut. This avoids needing to add a patch to dracut to change the default name of the initrd file. Also, previously the mkinitrd script passed the `--hostonly` flag to dracut to ensure the hostonly option was enabled. This has been replaced with setting the hostonly only in the `/etc/dracut.conf` file instead. One nice advantage this provides is that it allows a user to override this default by adding a config file under the `/etc/dracut.conf.d` directory.
- Loading branch information
Showing
22 changed files
with
76 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ | |
Summary: Realtime Linux Kernel | ||
Name: kernel-rt | ||
Version: 6.6.7.1 | ||
Release: 1%{?dist} | ||
Release: 2%{?dist} | ||
License: GPLv2 | ||
Vendor: Microsoft Corporation | ||
Distribution: Azure Linux | ||
|
@@ -249,7 +249,7 @@ cat > %{buildroot}/boot/linux-%{uname_r}.cfg << "EOF" | |
# GRUB Environment Block | ||
mariner_cmdline=init=/lib/systemd/systemd ro no-vmw-sta crashkernel=256M | ||
mariner_linux=vmlinuz-%{uname_r} | ||
mariner_initrd=initrd.img-%{uname_r} | ||
mariner_initrd=initramfs-%{uname_r}.img | ||
EOF | ||
chmod 600 %{buildroot}/boot/linux-%{uname_r}.cfg | ||
|
||
|
@@ -310,7 +310,7 @@ echo "initrd generation of kernel %{uname_r} will be triggered later" >&2 | |
|
||
%triggerun -- initramfs | ||
rm -rf %{_localstatedir}/lib/rpm-state/initramfs/pending/%{uname_r} | ||
rm -rf /boot/initrd.img-%{uname_r} | ||
rm -rf /boot/initramfs-%{uname_r}.img | ||
echo "initrd of kernel %{uname_r} removed" >&2 | ||
|
||
%preun tools | ||
|
@@ -421,6 +421,9 @@ ln -sf linux-%{uname_r}.cfg /boot/mariner.cfg | |
%{_sysconfdir}/bash_completion.d/bpftool | ||
|
||
%changelog | ||
* Fri Feb 23 2024 Chris Gunn <[email protected]> - 6.6.7.1-2 | ||
- Rename initrd.img-<kver> to initramfs-<kver>.img | ||
|
||
* Fri Jan 26 2024 Harshit Gupta <[email protected]> - 6.6.7.1-1 | ||
- Upgrade to kernel version 6.6.7.1 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
Summary: Signed Linux Kernel for %{buildarch} systems | ||
Name: kernel-signed-%{buildarch} | ||
Version: 6.6.14.1 | ||
Release: 2%{?dist} | ||
Release: 3%{?dist} | ||
License: GPLv2 | ||
Vendor: Microsoft Corporation | ||
Distribution: Azure Linux | ||
|
@@ -119,7 +119,7 @@ echo "initrd generation of kernel %{uname_r} will be triggered later" >&2 | |
|
||
%triggerun -n kernel -- initramfs | ||
rm -rf %{_localstatedir}/lib/rpm-state/initramfs/pending/%{uname_r} | ||
rm -rf /boot/initrd.img-%{uname_r} | ||
rm -rf /boot/initramfs-%{uname_r}.img | ||
echo "initrd of kernel %{uname_r} removed" >&2 | ||
|
||
%postun -n kernel | ||
|
@@ -147,6 +147,9 @@ echo "initrd of kernel %{uname_r} removed" >&2 | |
%exclude /module_info.ld | ||
|
||
%changelog | ||
* Fri Feb 23 2024 Chris Gunn <[email protected]> - 6.6.14.1-3 | ||
- Rename initrd.img-<kver> to initramfs-<kver>.img | ||
|
||
* Tue Jan 30 2024 Cameron Baird <[email protected]> - 6.6.14.1-2 | ||
- Remove legacy /boot/mariner.cfg | ||
- Introduce /etc/default/grub.d/10_kernel.cfg | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
diff --git a/dracut.conf b/dracut.conf | ||
index d6317a0f..390c377e 100644 | ||
--- a/dracut.conf | ||
+++ b/dracut.conf | ||
@@ -1,3 +1,5 @@ | ||
# PUT YOUR CONFIG IN separate files | ||
# in /etc/dracut.conf.d named "<name>.conf" | ||
# SEE man dracut.conf(5) for options | ||
+ | ||
+hostonly=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
Summary: dracut to create initramfs | ||
Name: dracut | ||
Version: 059 | ||
Release: 12%{?dist} | ||
Release: 13%{?dist} | ||
# The entire source code is GPLv2+ | ||
# except install/* which is LGPLv2+ | ||
License: GPLv2+ AND LGPLv2+ | ||
|
@@ -15,7 +15,6 @@ URL: https://github.com/dracutdevs/dracut/wiki | |
|
||
Source0: https://github.com/dracutdevs/dracut/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz | ||
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt | ||
Source2: mkinitrd | ||
Source3: megaraid.conf | ||
Source4: 20overlayfs/module-setup.sh | ||
Source5: 20overlayfs/overlayfs-mount.sh | ||
|
@@ -27,12 +26,16 @@ Patch: fix-functions-Avoid-calling-grep-with-PCRE-P.patch | |
Patch: allow-liveos-overlay-no-user-confirmation-prompt.patch | ||
|
||
Patch: 0002-disable-xattr.patch | ||
Patch: 0003-fix-initrd-naming-for-photon.patch | ||
Patch: 0006-dracut.sh-validate-instmods-calls.patch | ||
Patch: 0007-feat-dracut.sh-support-multiple-config-dirs.patch | ||
Patch: 0008-fix-dracut-systemd-rootfs-generator-cannot-write-out.patch | ||
Patch: 0009-install-systemd-executor.patch | ||
|
||
# kdump currently uses the host system's initrd when enrolling a crash kernel | ||
# and initrd. There is a limitation where the kdump initrd must be generated | ||
# with dracut in hostonly mode. So, set hostonly as the default. | ||
Patch: dracut-conf-add-defaults.patch | ||
|
||
BuildRequires: bash | ||
BuildRequires: kmod-devel | ||
BuildRequires: pkg-config | ||
|
@@ -131,8 +134,6 @@ mkdir -p %{buildroot}/boot/%{name} \ | |
install -m 0644 dracut.conf.d/fips.conf.example %{buildroot}%{_sysconfdir}/dracut.conf.d/40-fips.conf | ||
> %{buildroot}%{_sysconfdir}/system-fips | ||
|
||
install -m 0755 %{SOURCE2} %{buildroot}%{_bindir}/mkinitrd | ||
|
||
install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/dracut.conf.d/50-megaraid.conf | ||
|
||
mkdir -p %{buildroot}%{_libdir}/dracut/modules.d/20overlayfs/ | ||
|
@@ -148,7 +149,6 @@ ln -srv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_sbindir}/%{name} | |
%files | ||
%defattr(-,root,root,0755) | ||
%{_bindir}/%{name} | ||
%{_bindir}/mkinitrd | ||
%{_bindir}/lsinitrd | ||
# compat symlink | ||
%{_sbindir}/%{name} | ||
|
@@ -216,6 +216,10 @@ ln -srv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_sbindir}/%{name} | |
%dir %{_sharedstatedir}/%{name}/overlay | ||
|
||
%changelog | ||
* Fri Feb 23 2024 Chris Gunn <[email protected]> - 059-13 | ||
- Remove mkinitrd script | ||
- Set hostonly as default in /etc/dracut.conf | ||
|
||
* Wed Feb 07 2024 Dan Streetman <[email protected]> - 059-12 | ||
- update to 059 | ||
|
||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.