Remove mkinitrd script. (#8126)
This commit is contained in:
Родитель
dabe86a3e2
Коммит
de743d63b9
|
@ -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 <chrisgun@microsoft.com> - 6.6.7.1-2
|
||||
- Rename initrd.img-<kver> to initramfs-<kver>.img
|
||||
|
||||
* Fri Jan 26 2024 Harshit Gupta <guptaharshit@microsoft.com> - 6.6.7.1-1
|
||||
- Upgrade to kernel version 6.6.7.1
|
||||
|
||||
|
|
|
@ -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 <chrisgun@microsoft.com> - 6.6.14.1-3
|
||||
- Rename initrd.img-<kver> to initramfs-<kver>.img
|
||||
|
||||
* Tue Jan 30 2024 Cameron Baird <cameronbaird@microsoft.com> - 6.6.14.1-2
|
||||
- Remove legacy /boot/mariner.cfg
|
||||
- Introduce /etc/default/grub.d/10_kernel.cfg
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
diff --git a/lsinitrd.sh b/lsinitrd.sh
|
||||
old mode 100755
|
||||
new mode 100644
|
||||
index eaadc76..46f7af5
|
||||
--- a/lsinitrd.sh
|
||||
+++ b/lsinitrd.sh
|
||||
@@ -109,41 +109,7 @@ if [[ $1 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
- if [[ -d /efi/Default ]] || [[ -d /boot/Default ]] || [[ -d /boot/efi/Default ]]; then
|
||||
- MACHINE_ID="Default"
|
||||
- elif [[ -f /etc/machine-id ]]; then
|
||||
- read -r MACHINE_ID < /etc/machine-id
|
||||
- else
|
||||
- MACHINE_ID="Default"
|
||||
- fi
|
||||
-
|
||||
- if [[ -d /efi/loader/entries || -L /efi/loader/entries ]] \
|
||||
- && [[ $MACHINE_ID ]] \
|
||||
- && [[ -d /efi/${MACHINE_ID} || -L /efi/${MACHINE_ID} ]]; then
|
||||
- image="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
|
||||
- elif [[ -d /boot/loader/entries || -L /boot/loader/entries ]] \
|
||||
- && [[ $MACHINE_ID ]] \
|
||||
- && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]]; then
|
||||
- image="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
|
||||
- elif [[ -d /boot/efi/loader/entries || -L /boot/efi/loader/entries ]] \
|
||||
- && [[ $MACHINE_ID ]] \
|
||||
- && [[ -d /boot/efi/${MACHINE_ID} || -L /boot/efi/${MACHINE_ID} ]]; then
|
||||
- image="/boot/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
|
||||
- elif [[ -f /lib/modules/${KERNEL_VERSION}/initrd ]]; then
|
||||
- image="/lib/modules/${KERNEL_VERSION}/initrd"
|
||||
- elif [[ -f /lib/modules/${KERNEL_VERSION}/initramfs.img ]]; then
|
||||
- image="/lib/modules/${KERNEL_VERSION}/initramfs.img"
|
||||
- elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then
|
||||
- image="/boot/initramfs-${KERNEL_VERSION}.img"
|
||||
- elif [[ $MACHINE_ID ]] \
|
||||
- && mountpoint -q /efi; then
|
||||
- image="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
|
||||
- elif [[ $MACHINE_ID ]] \
|
||||
- && mountpoint -q /boot/efi; then
|
||||
- image="/boot/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
|
||||
- else
|
||||
- image=""
|
||||
- fi
|
||||
+ image="/boot/initrd.img-${KERNEL_VERSION}"
|
||||
fi
|
||||
|
||||
shift
|
|
@ -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
|
|
@ -3,7 +3,6 @@
|
|||
"dracut-059.tar.gz": "eabf0bb685420c1e1d5475b6855ef787104508f0135ff570312845256e0fcecf",
|
||||
"lgpl-2.1.txt": "dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551",
|
||||
"megaraid.conf": "914824cdbe0c525b71efa05a75e453335b0068beb8bc28bef2a5866d74bf7dd4",
|
||||
"mkinitrd": "32a0e19de954a356a0f1903a1f75d3266493b55d71b0eeab6bd07b585e955dcf",
|
||||
"module-setup.sh": "330af5c105793fb37434730ce0ff59467a9cc60a81a5e32193dc53235e9744c1",
|
||||
"overlayfs-mount.sh": "63552c4115b5c37ed04c5311367301483e2dfe1091dc5717b2bd22d9cdda044b"
|
||||
}
|
||||
|
|
|
@ -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 <chrisgun@microsoft.com> - 059-13
|
||||
- Remove mkinitrd script
|
||||
- Set hostonly as default in /etc/dracut.conf
|
||||
|
||||
* Wed Feb 07 2024 Dan Streetman <ddstreet@ieee.org> - 059-12
|
||||
- update to 059
|
||||
|
||||
|
|
|
@ -1,184 +0,0 @@
|
|||
#!/bin/bash --norc
|
||||
kernel_ver_dir='/var/lib/initramfs/kernel'
|
||||
|
||||
boot_dir="/boot"
|
||||
quiet=0
|
||||
host_only=0
|
||||
force=0
|
||||
|
||||
error() { echo "$@" >&2; }
|
||||
|
||||
usage () {
|
||||
[[ $1 = '-n' ]] && cmd=echo || cmd=error
|
||||
|
||||
$cmd "usage: ${0##*/} [--version] [--help] [-v] [-f] [--preload <module>]"
|
||||
$cmd " [--image-version] [--with=<module>]"
|
||||
$cmd " [--nocompress]"
|
||||
$cmd " <initrd-image> <kernel-version>"
|
||||
$cmd ""
|
||||
$cmd " (ex: ${0##*/} /boot/initramfs-$kver.img $kver)"
|
||||
|
||||
[[ $1 = '-n' ]] && exit 0
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Little helper function for reading args from the commandline.
|
||||
# it automatically handles -a b and -a=b variants, and returns 1 if
|
||||
# we need to shift $3.
|
||||
read_arg() {
|
||||
# $1 = arg name
|
||||
# $2 = arg value
|
||||
# $3 = arg parameter
|
||||
param="$1"
|
||||
local rematch='^[^=]*=(.*)$' result
|
||||
if [[ $2 =~ $rematch ]]; then
|
||||
read "$param" <<< "${BASH_REMATCH[1]}"
|
||||
else
|
||||
for ((i=3; $i <= $#; i++)); do
|
||||
# Only read next arg if it not an arg itself.
|
||||
if [[ ${@:$i:1} = -* ]];then
|
||||
break
|
||||
fi
|
||||
result="$result ${@:$i:1}"
|
||||
# There is no way to shift our callers args, so
|
||||
# return "no of args" to indicate they should do it instead.
|
||||
done
|
||||
read "$1" <<< "$result"
|
||||
return $(($i - 3))
|
||||
fi
|
||||
}
|
||||
|
||||
# For mariner
|
||||
default_kernel_images() {
|
||||
local kernel_version
|
||||
|
||||
for kernel_version in $(ls $kernel_ver_dir) ; do
|
||||
|
||||
# Take this directory as the source of truth
|
||||
kernels="$kernels $kernel_version"
|
||||
targets="$targets $boot_dir/initrd.img-$kernel_version"
|
||||
|
||||
done
|
||||
host_only=1
|
||||
force=1
|
||||
}
|
||||
|
||||
while (($# > 0)); do
|
||||
case ${1%%=*} in
|
||||
--with-usb) read_arg usbmodule "$@" || shift $?
|
||||
basicmodules="$basicmodules ${usbmodule:-usb-storage}"
|
||||
unset usbmodule;;
|
||||
--with-avail) read_arg modname "$@" || shift $?
|
||||
basicmodules="$basicmodules $modname";;
|
||||
--with) read_arg modname "$@" || shift $?
|
||||
basicmodules="$basicmodules $modname";;
|
||||
--version)
|
||||
echo "mkinitrd: dracut compatibility wrapper"
|
||||
exit 0;;
|
||||
-v|--verbose) dracut_args="${dracut_args} -v";;
|
||||
-f|--force) force=1;;
|
||||
--preload) read_arg modname "$@" || shift $?
|
||||
basicmodules="$basicmodules $modname";;
|
||||
--image-version) img_vers=yes;;
|
||||
--rootfs|-d) read_arg rootfs "$@" || shift $?
|
||||
dracut_args="${dracut_args} --filesystems $rootfs";;
|
||||
--nocompress) dracut_args="$dracut_args --no-compress";;
|
||||
--help) usage -n;;
|
||||
--builtin) ;;
|
||||
--without*) ;;
|
||||
--without-usb) ;;
|
||||
--fstab*) ;;
|
||||
--ifneeded) ;;
|
||||
--omit-scsi-modules) ;;
|
||||
--omit-ide-modules) ;;
|
||||
--omit-raid-modules) ;;
|
||||
--omit-lvm-modules) ;;
|
||||
--omit-dmraid) ;;
|
||||
--allow-missing) ;;
|
||||
--net-dev*) ;;
|
||||
--noresume) ;;
|
||||
--rootdev*) ;;
|
||||
--thawdev*) ;;
|
||||
--rootopts*) ;;
|
||||
--root*) ;;
|
||||
--loopdev*) ;;
|
||||
--loopfs*) ;;
|
||||
--loopopts*) ;;
|
||||
--looppath*) ;;
|
||||
--dsdt*) ;;
|
||||
--bootchart) ;;
|
||||
-s) ;;
|
||||
--quiet|-q) quiet=1;;
|
||||
-b) read_arg boot_dir "$@" || shift $?
|
||||
if [ ! -d $boot_dir ];then
|
||||
error "Boot directory $boot_dir does not exist"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
-k) # Would be nice to get a list of images here
|
||||
read_arg kernel_images "$@" || shift $?
|
||||
for kernel_image in $kernel_images;do
|
||||
kernels="$kernels ${kernel_image#*-}"
|
||||
done
|
||||
host_only=1
|
||||
force=1
|
||||
;;
|
||||
-i) read_arg initrd_images "$@" || shift $?
|
||||
for initrd_image in $initrd_images;do
|
||||
targets="$targets $boot_dir/$initrd_image"
|
||||
done
|
||||
;;
|
||||
*) if [[ ! $targets ]]; then
|
||||
targets=$1
|
||||
elif [[ ! $kernels ]]; then
|
||||
kernels=$1
|
||||
else
|
||||
usage
|
||||
fi;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
[[ $targets && $kernels ]] || default_kernel_images
|
||||
[[ $targets && $kernels ]] || (error "No Kernel Registered")
|
||||
|
||||
# We can have several targets/kernels, transform the list to an array
|
||||
targets=( $targets )
|
||||
[[ $kernels ]] && kernels=( $kernels )
|
||||
|
||||
[[ $host_only == 1 ]] && dracut_args="${dracut_args} -H"
|
||||
[[ $force == 1 ]] && dracut_args="${dracut_args} -f"
|
||||
|
||||
for ((i=0 ; $i<${#targets[@]} ; i++)); do
|
||||
|
||||
if [[ $img_vers ]];then
|
||||
target="${targets[$i]}-${kernels[$i]}"
|
||||
else
|
||||
target="${targets[$i]}"
|
||||
fi
|
||||
kernel="${kernels[$i]}"
|
||||
|
||||
if [[ -s "$kernel_ver_dir/$kernel" ]]; then
|
||||
readarray -t kernel_cfg < <(xargs -n1 -a $kernel_ver_dir/$kernel)
|
||||
else
|
||||
kernel_cfg=()
|
||||
fi
|
||||
|
||||
# Duplicate code: No way found how to redirect output based on $quiet
|
||||
if [[ $quiet == 1 ]];then
|
||||
echo "Creating $target"
|
||||
if [[ $basicmodules ]]; then
|
||||
dracut $dracut_args --add-drivers "$basicmodules" "${kernel_cfg[@]}" "$target" \
|
||||
"$kernel" &>/dev/null
|
||||
else
|
||||
dracut $dracut_args "${kernel_cfg[@]}" "$target" "$kernel" &>/dev/null
|
||||
fi
|
||||
else
|
||||
if [[ $basicmodules ]]; then
|
||||
dracut $dracut_args --add-drivers "$basicmodules" "${kernel_cfg[@]}" "$target" \
|
||||
"$kernel"
|
||||
else
|
||||
dracut $dracut_args "${kernel_cfg[@]}" "$target" "$kernel"
|
||||
fi
|
||||
fi
|
||||
done
|
|
@ -1,7 +1,7 @@
|
|||
Summary: initramfs
|
||||
Name: initramfs
|
||||
Version: 3.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: Apache License
|
||||
Vendor: Microsoft Corporation
|
||||
Distribution: Azure Linux
|
||||
|
@ -45,13 +45,13 @@ install -d -m755 %{buildroot}%{_localstatedir}/lib/initramfs/kernel
|
|||
# will be left over for the new initramfs rpm, since triggerin/un
|
||||
# in the new rpm will execute after the postun in the old rpm
|
||||
#
|
||||
# The order of the scriptlet is critical. The heavy lifting mkinitrd is
|
||||
# The order of the scriptlet is critical. The heavy lifting dracut is
|
||||
# always done post transaction, as it's always invoked in posttrans/
|
||||
# transfiletriggerin/transfiletriggerpostun. Whereas the creation of flag
|
||||
# is in the middle of transaction.
|
||||
#
|
||||
# The kernel rpm has triggers for initramfs. This is an optimization, as
|
||||
# we don't want mkinitrd be invoked for all the kernels if some of the kernel
|
||||
# we don't want dracut be invoked for all the kernels if some of the kernel
|
||||
# rpms is being installed/upgraded/uninstalled. Hence, there is no trigger
|
||||
# in initramfs watching for linux, but there is file transaction trigger
|
||||
# watching for /lib/modules. The triggerin in linux.rpm will create flag as
|
||||
|
@ -67,31 +67,15 @@ mkdir -p %{_localstatedir}/lib/rpm-state/initramfs \
|
|||
touch %{_localstatedir}/lib/rpm-state/initramfs/regenerate \
|
||||
echo "initramfs (re)generation" %* >&2
|
||||
|
||||
# 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 "host-only" mode.
|
||||
#
|
||||
# The -k option forces "host-only" initrd build for the specified kernel version.
|
||||
# The -q option suppresses verbose output
|
||||
#
|
||||
# If mkinitrd is called without <image> and <kernel-version> parameters, it will
|
||||
# default to invoking dracut in "host-mode" mode on every kernel version it can
|
||||
# find in /boot.
|
||||
#
|
||||
# If mkinitrd is called with <image> and <kernel-version> parameters, it will
|
||||
# default to invoking dracut in "generic host" mode to create an initrd.
|
||||
#
|
||||
# So in order to be compatible with kdump, we need to make sure to add the -k
|
||||
# option when invoking mkinitrd with an explicit <image> and <kernel version>
|
||||
%define file_trigger_action() \
|
||||
cat > /dev/null \
|
||||
if [ -f %{_localstatedir}/lib/rpm-state/initramfs/regenerate ]; then \
|
||||
echo "(re)generate initramfs for all kernels," %* >&2 \
|
||||
mkinitrd -q \
|
||||
dracut --quiet --force --regenerate-all \
|
||||
elif [ -d %{_localstatedir}/lib/rpm-state/initramfs/pending ]; then \
|
||||
for k in `ls %{_localstatedir}/lib/rpm-state/initramfs/pending/`; do \
|
||||
echo "(re)generate initramfs for $k," %* >&2 \
|
||||
mkinitrd -q /boot/initrd.img-$k $k -k \
|
||||
dracut --quiet --force --fstab --kver $k \
|
||||
done; \
|
||||
fi \
|
||||
%grub2_post
|
||||
|
@ -100,7 +84,7 @@ fi \
|
|||
%posttrans
|
||||
echo "initramfs" %{version}-%{release} "posttrans" >&2
|
||||
%removal_action
|
||||
mkinitrd -q
|
||||
dracut --quiet --force --regenerate-all
|
||||
%grub2_post
|
||||
|
||||
%postun
|
||||
|
@ -130,6 +114,10 @@ echo "initramfs" %{version}-%{release} "postun" >&2
|
|||
%dir %{_localstatedir}/lib/initramfs/kernel
|
||||
|
||||
%changelog
|
||||
* Fri Feb 23 2024 Chris Gunn <chrisgun@microsoft.com> - 3.0-2
|
||||
- Call dracut instead of mkinitrd
|
||||
- Rename initrd.img-<kver> to initramfs-<kver>.img
|
||||
|
||||
* Mon Feb 26 2024 Sean Dougherty <sdougherty@microsoft.com> - 3.0-1
|
||||
- Version bump for Azure Linux 3.0
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
Summary: Linux API header files
|
||||
Name: kernel-headers
|
||||
Version: 6.6.14.1
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: GPLv2
|
||||
Vendor: Microsoft Corporation
|
||||
Distribution: Azure Linux
|
||||
|
@ -75,6 +75,9 @@ done
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Feb 27 2024 Chris Gunn <chrisgun@microsoft.com> - 6.6.14.1-3
|
||||
- Bump release to match kernel
|
||||
|
||||
* Tue Jan 30 2024 Cameron Baird <cameronbaird@microsoft.com> - 6.6.14.1-2
|
||||
- Bump release to match kernel
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ for i in /boot/vmlinuz*mshv*; do
|
|||
if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi
|
||||
done;
|
||||
initrd_list=
|
||||
for i in /boot/initrd.img*mshv*; do
|
||||
for i in /boot/initramfs-*mshv*.img; do
|
||||
if grub_file_is_not_garbage "$i" ; then initrd_list="$initrd_list $i" ; fi
|
||||
done;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"Signatures": {
|
||||
"50_mariner_mshv.cfg": "12bf23f8857f893549933a20062ad2a69c3c654b87893e8dd3ce42f9329801c7",
|
||||
"50_mariner_mshv_menuentry": "3d8767be86cb259c1becab82f46e26966f961f9fbdc06aa9c0f2709739017ee4",
|
||||
"50_mariner_mshv_menuentry": "5a46bb273be0e829fec4e1f498b1a11b59ded6e14d42a19be7da860c3f4c35be",
|
||||
"cbl-mariner-ca-20211013.pem": "5ef124b0924cb1047c111a0ecff1ae11e6ad7cac8d1d9b40f98f99334121f0b0",
|
||||
"config": "2227744a0089cceae344dec57d6ff0540e265056f3831e24805d9cad4571e825",
|
||||
"kernel-mshv-5.15.126.mshv3.tar.gz": "a4a19caadbcb6c367bbc8d92338bbf6843f5e0fbd411f0ff0ba7650d44505e87"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
Summary: Mariner kernel that has MSHV Host support
|
||||
Name: kernel-mshv
|
||||
Version: 5.15.126.mshv3
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: GPLv2
|
||||
Group: Development/Tools
|
||||
Vendor: Microsoft Corporation
|
||||
|
@ -181,7 +181,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/efi/initrd.img-%{uname_r}
|
||||
rm -rf /boot/efi/initramfs-%{uname_r}.img
|
||||
echo "initrd of kernel %{uname_r} removed" >&2
|
||||
|
||||
%postun
|
||||
|
@ -231,6 +231,9 @@ echo "initrd of kernel %{uname_r} removed" >&2
|
|||
%{_includedir}/perf/perf_dlfilter.h
|
||||
|
||||
%changelog
|
||||
* Fri Feb 23 2024 Chris Gunn <chrisgun@microsoft.com> - 5.15.126.mshv3-5
|
||||
- Rename initrd.img-<kver> to initramfs-<kver>.img
|
||||
|
||||
* Tue Feb 20 2024 Cameron Baird <cameronbaird@microsoft.com> - 5.15.126.mshv3-4
|
||||
- Remove legacy /boot/mariner-mshv.cfg
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
Summary: Linux Kernel
|
||||
Name: kernel
|
||||
Version: 6.6.14.1
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: GPLv2
|
||||
Vendor: Microsoft Corporation
|
||||
Distribution: Azure Linux
|
||||
|
@ -312,7 +312,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
|
||||
|
@ -416,6 +416,10 @@ echo "initrd of kernel %{uname_r} removed" >&2
|
|||
%{_sysconfdir}/bash_completion.d/bpftool
|
||||
|
||||
%changelog
|
||||
* Fri Feb 23 2024 Chris Gunn <chrisgun@microsoft.com> - 6.6.14.1-3
|
||||
- Call dracut instead of mkinitrd
|
||||
- Rename initrd.img-<kver> to initramfs-<kver>.img
|
||||
|
||||
* Tue Feb 20 2024 Cameron Baird <cameronbaird@microsoft.com> - 6.6.14.1-2
|
||||
- Remove legacy /boot/mariner.cfg
|
||||
- Introduce /etc/default/grub.d/10_kernel.cfg
|
||||
|
|
|
@ -311,8 +311,8 @@ setup_initrd()
|
|||
|
||||
kdump_kernel="${KDUMP_BOOTDIR}/${KDUMP_IMG}-${kdump_kver}${KDUMP_IMG_EXT}"
|
||||
|
||||
DEFAULT_INITRD="${KDUMP_BOOTDIR}/initrd.img-`uname -r`"
|
||||
DEFAULT_INITRD_BAK="${KDUMP_BOOTDIR}/.initrd.img-`uname -r`.default"
|
||||
DEFAULT_INITRD="${KDUMP_BOOTDIR}/initramfs-`uname -r`".img
|
||||
DEFAULT_INITRD_BAK="${KDUMP_BOOTDIR}/.initramfs-`uname -r`.default".img
|
||||
if [ $DEFAULT_DUMP_MODE == "fadump" ]; then
|
||||
TARGET_INITRD="$DEFAULT_INITRD"
|
||||
|
||||
|
@ -320,7 +320,7 @@ setup_initrd()
|
|||
# with fadump aware initrd
|
||||
backup_default_initrd
|
||||
else
|
||||
TARGET_INITRD="${KDUMP_BOOTDIR}/initrd.img-${kdump_kver}"
|
||||
TARGET_INITRD="${KDUMP_BOOTDIR}/initramfs-${kdump_kver}".img
|
||||
|
||||
# check if a backup of default initrd exists. If yes,
|
||||
# it signifies a switch from fadump mode. So, restore
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
"kdump.sysconfig.aarch64": "a829f3a0f88d983ccec2782b048f12a2eafca71aac4dd42acac2eaea8f7dd8d9",
|
||||
"kdump.sysconfig.i386": "1175bcc11be49841d4b8c3f9612e68bb7b2e0e8f00067ffa782fd9dba04f821d",
|
||||
"kdump.sysconfig.x86_64": "850b3be780165d0721edb8d34b2ba28aafc60b29850ff627daf04190369e359c",
|
||||
"kdumpctl": "d511b5db0ea2de014fb06ec9fa0a6a4fdf508a3ba6c0d73344870f245ebd4c23",
|
||||
"kdumpctl": "c014109354c488f04330c1c0c6c35940c77feaf2a9160ce40f86348b57a0a5b1",
|
||||
"kdumpctl.8": "025a39d212eed0584da7c23c1bb50d6ab797a0fa3c686ac6b80391af875dbaec",
|
||||
"kexec-kdump-howto.txt": "e783390a9aa582a2b5e7981cd3277081385340b5873a3f0633c789811876eccb",
|
||||
"kexec-tools-2.0.27.tar.xz": "38d78bcfa33a88928324b57dc81f50c1dfc279eede45e80957ca18f4e84b8187",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
Summary: The kexec/kdump userspace component
|
||||
Name: kexec-tools
|
||||
Version: 2.0.27
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPLv2
|
||||
Vendor: Microsoft Corporation
|
||||
Distribution: Azure Linux
|
||||
|
@ -331,6 +331,9 @@ done
|
|||
/usr/share/makedumpfile/
|
||||
|
||||
%changelog
|
||||
* Fri Feb 23 2024 Chris Gunn <chrisgun@microsoft.com> - 2.0.27-4
|
||||
- Rename initrd.img-<kver> to initramfs-<kver>.img
|
||||
|
||||
* Fri Jan 19 2024 Elaheh Dehghani <edehghani@microsoft.com> - 2.0.27-3
|
||||
- Upgrade makedumpfile to 1.7.4 - Azure Linux 3.0 - package upgrades
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
filesystem-1.1-19.azl3.aarch64.rpm
|
||||
kernel-headers-6.6.14.1-2.azl3.noarch.rpm
|
||||
kernel-headers-6.6.14.1-3.azl3.noarch.rpm
|
||||
glibc-2.38-2.azl3.aarch64.rpm
|
||||
glibc-devel-2.38-2.azl3.aarch64.rpm
|
||||
glibc-i18n-2.38-2.azl3.aarch64.rpm
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
filesystem-1.1-19.azl3.x86_64.rpm
|
||||
kernel-headers-6.6.14.1-2.azl3.noarch.rpm
|
||||
kernel-headers-6.6.14.1-3.azl3.noarch.rpm
|
||||
glibc-2.38-2.azl3.x86_64.rpm
|
||||
glibc-devel-2.38-2.azl3.x86_64.rpm
|
||||
glibc-i18n-2.38-2.azl3.x86_64.rpm
|
||||
|
|
|
@ -136,7 +136,7 @@ intltool-0.51.0-7.azl3.noarch.rpm
|
|||
itstool-2.0.7-1.azl3.noarch.rpm
|
||||
kbd-2.2.0-2.azl3.aarch64.rpm
|
||||
kbd-debuginfo-2.2.0-2.azl3.aarch64.rpm
|
||||
kernel-headers-6.6.14.1-2.azl3.noarch.rpm
|
||||
kernel-headers-6.6.14.1-3.azl3.noarch.rpm
|
||||
kmod-30-1.azl3.aarch64.rpm
|
||||
kmod-debuginfo-30-1.azl3.aarch64.rpm
|
||||
kmod-devel-30-1.azl3.aarch64.rpm
|
||||
|
|
|
@ -141,8 +141,8 @@ intltool-0.51.0-7.azl3.noarch.rpm
|
|||
itstool-2.0.7-1.azl3.noarch.rpm
|
||||
kbd-2.2.0-2.azl3.x86_64.rpm
|
||||
kbd-debuginfo-2.2.0-2.azl3.x86_64.rpm
|
||||
kernel-cross-headers-6.6.14.1-2.azl3.noarch.rpm
|
||||
kernel-headers-6.6.14.1-2.azl3.noarch.rpm
|
||||
kernel-cross-headers-6.6.14.1-3.azl3.noarch.rpm
|
||||
kernel-headers-6.6.14.1-3.azl3.noarch.rpm
|
||||
kmod-30-1.azl3.x86_64.rpm
|
||||
kmod-debuginfo-30-1.azl3.x86_64.rpm
|
||||
kmod-devel-30-1.azl3.x86_64.rpm
|
||||
|
|
|
@ -778,11 +778,12 @@ func updateInitramfsForEncrypt(installChroot *safechroot.Chroot) (err error) {
|
|||
const (
|
||||
libModDir = "/lib/modules"
|
||||
dracutModules = "dm crypt crypt-gpg crypt-loop lvm"
|
||||
initrdPrefix = "/boot/initrd.img-"
|
||||
initrdPrefix = "/boot/initramfs-"
|
||||
initrdSuffix = ".img"
|
||||
cryptTabPath = "/etc/crypttab"
|
||||
)
|
||||
|
||||
initrdPattern := fmt.Sprintf("%v%v", initrdPrefix, "*")
|
||||
initrdPattern := fmt.Sprintf("%v*%v", initrdPrefix, initrdSuffix)
|
||||
initrdImageSlice, err := filepath.Glob(initrdPattern)
|
||||
if err != nil {
|
||||
logger.Log.Warnf("Unable to get initrd image: %v", err)
|
||||
|
@ -801,6 +802,7 @@ func updateInitramfsForEncrypt(installChroot *safechroot.Chroot) (err error) {
|
|||
|
||||
// Get the kernel version
|
||||
kernel := strings.TrimPrefix(initrdImage, initrdPrefix)
|
||||
kernel = strings.TrimSuffix(kernel, initrdSuffix)
|
||||
|
||||
// Construct list of files to install in initramfs
|
||||
installFiles := fmt.Sprintf("%v %v", cryptTabPath, diskutils.DefaultKeyFilePath)
|
||||
|
|
|
@ -628,7 +628,7 @@ func buildImage(mountPointMap, mountPointToFsTypeMap, mountPointToMountArgsMap,
|
|||
return
|
||||
}
|
||||
installutils.ReportAction("Hashing root for read-only with dm-verity, this may take a long time if error correction is enabled")
|
||||
initramfsPathList, err = filepath.Glob(filepath.Join(installRoot, "/boot/initrd.img*"))
|
||||
initramfsPathList, err = filepath.Glob(filepath.Join(installRoot, "/boot/initramfs-*.img"))
|
||||
if err != nil || len(initramfsPathList) != 1 {
|
||||
return fmt.Errorf("could not find single initramfs (%v):\n%w", initramfsPathList, err)
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче