@ -295,17 +295,16 @@ read_arg() {
@@ -295,17 +295,16 @@ read_arg() {
fi
}
check_conf_file()
{
check_conf_file() {
if grep -H -e '^[^#]*[+]=\("[^ ]\|.*[^ ]"\)' "$@"; then
printf '\ndracut: WARNING: <key>+=" <values> ": <values> should have surrounding white spaces!\n' >&2
printf 'dracut: WARNING: This will lead to unwanted side effects! Please fix the configuration file.\n\n' >&2
fi
}
dropindirs_sort()
{
local suffix=$1; shift
dropindirs_sort() {
local suffix=$1
shift
local -a files
local f d
@ -329,8 +328,7 @@ dropindirs_sort()
@@ -329,8 +328,7 @@ dropindirs_sort()
}
}
rearrange_params()
{
rearrange_params() {
# Workaround -i, --include taking 2 arguments
newat=()
for i in "$@"; do
@ -342,7 +340,9 @@ rearrange_params()
@@ -342,7 +340,9 @@ rearrange_params()
done
set -- "${newat[@]}" # Set new $@
TEMP=$(unset POSIXLY_CORRECT; getopt \
TEMP=$(
unset POSIXLY_CORRECT
getopt \
-o "a:m:o:d:I:k:c:r:L:fvqlHhMN" \
--long kver: \
--long add: \
@ -435,7 +435,8 @@ rearrange_params()
@@ -435,7 +435,8 @@ rearrange_params()
--long hostonly-nics: \
--long no-machineid \
--long version \
-- "$@")
-- "$@"
)
# shellcheck disable=SC2181
if (($? != 0)); then
@ -454,10 +455,10 @@ eval set -- "$TEMP"
@@ -454,10 +455,10 @@ eval set -- "$TEMP"
# parse command line args to check if '--rebuild' option is present
unset append_args_l
unset rebuild_file
while :
do
while :; do
if [ "$1" == "--" ]; then
shift; break
shift
break
fi
if [ "$1" == "--rebuild" ]; then
append_args_l="yes"
@ -467,7 +468,8 @@ do
@@ -467,7 +468,8 @@ do
exit 1
fi
abs_rebuild_file=$(readlink -f "$rebuild_file") && rebuild_file="$abs_rebuild_file"
shift; continue
shift
continue
fi
shift
done
@ -476,7 +478,8 @@ done
@@ -476,7 +478,8 @@ done
while (($# > 0)); do
case ${1%%=*} in
++include)
shift 2;;
shift 2
;;
*)
if ! [[ ${outfile+x} ]]; then
outfile=$1
@ -484,7 +487,8 @@ while (($# > 0)); do
@@ -484,7 +487,8 @@ while (($# > 0)); do
kernel=$1
else
printf "\nUnknown arguments: %s\n\n" "$*" >&2
usage; exit 1;
usage
exit 1
fi
;;
esac
@ -520,53 +524,178 @@ eval set -- "$TEMP"
@@ -520,53 +524,178 @@ eval set -- "$TEMP"
while :; do
if [[ $1 != "--" ]] && [[ $1 != "--rebuild" ]]; then
PARMS_TO_STORE+=" $1";
PARMS_TO_STORE+=" $1"
fi
case $1 in
--kver) kernel="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
-a|--add) add_dracutmodules_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
--force-add) force_add_dracutmodules_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
--add-drivers) add_drivers_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
--force-drivers) force_drivers_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
--omit-drivers) omit_drivers_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
-m|--modules) dracutmodules_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
-o|--omit) omit_dracutmodules_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
-d|--drivers) drivers_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
--filesystems) filesystems_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
-I|--install) install_items_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
--install-optional) install_optional_items_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
--fwdir) fw_dir_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
--libdirs) libdirs_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
--fscks) fscks_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
--add-fstab) add_fstab_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
--mount) fstab_lines+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
--add-device|--device) add_device_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
--kernel-cmdline) kernel_cmdline_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
--kver)
kernel="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
-a | --add)
add_dracutmodules_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
--force-add)
force_add_dracutmodules_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
--add-drivers)
add_drivers_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
--force-drivers)
force_drivers_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
--omit-drivers)
omit_drivers_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
-m | --modules)
dracutmodules_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
-o | --omit)
omit_dracutmodules_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
-d | --drivers)
drivers_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
--filesystems)
filesystems_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
-I | --install)
install_items_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
--install-optional)
install_optional_items_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
--fwdir)
fw_dir_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
--libdirs)
libdirs_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
--fscks)
fscks_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
--add-fstab)
add_fstab_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
--mount)
fstab_lines+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
--add-device | --device)
add_device_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
--kernel-cmdline)
kernel_cmdline_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
--nofscks) nofscks_l="yes" ;;
--ro-mnt) ro_mnt_l="yes" ;;
-k|--kmoddir) drivers_dir_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
-c|--conf) conffile="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--confdir) confdir="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--tmpdir) tmpdir_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
-r|--sysroot) sysroot_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
-L|--stdlog) stdloglvl_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--compress) compress_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--prefix) prefix_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--loginstall) loginstall_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--rebuild) if [[ $rebuild_file == "$outfile" ]]; then
-k | --kmoddir)
drivers_dir_l="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
-c | --conf)
conffile="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
--confdir)
confdir="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
--tmpdir)
tmpdir_l="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
-r | --sysroot)
sysroot_l="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
-L | --stdlog)
stdloglvl_l="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
--compress)
compress_l="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
--prefix)
prefix_l="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
--loginstall)
loginstall_l="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
--rebuild)
if [[ $rebuild_file == "$outfile" ]]; then
force=yes
fi
shift
;;
-f | --force) force=yes ;;
--kernel-only) kernel_only="yes"; no_kernel="no";;
--no-kernel) kernel_only="no"; no_kernel="yes";;
--kernel-only)
kernel_only="yes"
no_kernel="no"
;;
--no-kernel)
kernel_only="no"
no_kernel="yes"
;;
--print-cmdline)
print_cmdline="yes"; hostonly_l="yes"; kernel_only="yes"; no_kernel="yes";;
print_cmdline="yes"
hostonly_l="yes"
kernel_only="yes"
no_kernel="yes"
;;
--early-microcode)
early_microcode_l="yes";;
early_microcode_l="yes"
;;
--no-early-microcode)
early_microcode_l="no";;
early_microcode_l="no"
;;
--strip) do_strip_l="yes" ;;
--nostrip) do_strip_l="no" ;;
--hardlink) do_hardlink_l="yes" ;;
@ -578,8 +707,15 @@ while :; do
@@ -578,8 +707,15 @@ while :; do
--nolvmconf) lvmconf_l="no" ;;
--debug) debug="yes" ;;
--profile) profile="yes" ;;
--sshkey) sshkey="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--logfile) logfile_l="$2"; shift;;
--sshkey)
sshkey="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
--logfile)
logfile_l="$2"
shift
;;
-v | --verbose) ((verbosity_mod_l++)) ;;
-q | --quiet) ((verbosity_mod_l--)) ;;
-l | --local)
@ -588,27 +724,46 @@ while :; do
@@ -588,27 +724,46 @@ while :; do
&& dracutbasedir="$(readlink -f "${0%/*}")"
;;
-H | --hostonly | --host-only)
hostonly_l="yes" ;;
hostonly_l="yes"
;;
-N | --no-hostonly | --no-host-only)
hostonly_l="no" ;;
hostonly_l="no"
;;
--hostonly-mode)
hostonly_mode_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
hostonly_mode_l="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
--hostonly-cmdline)
hostonly_cmdline_l="yes" ;;
hostonly_cmdline_l="yes"
;;
--hostonly-i18n)
i18n_install_all_l="no" ;;
i18n_install_all_l="no"
;;
--hostonly-nics)
hostonly_nics_l+=("$2"); PARMS_TO_STORE+=" '$2'"; shift;;
hostonly_nics_l+=("$2")
PARMS_TO_STORE+=" '$2'"
shift
;;
--no-hostonly-i18n)
i18n_install_all_l="yes" ;;
i18n_install_all_l="yes"
;;
--no-hostonly-cmdline)
hostonly_cmdline_l="no" ;;
hostonly_cmdline_l="no"
;;
--no-hostonly-default-device)
hostonly_default_device="no" ;;
hostonly_default_device="no"
;;
--persistent-policy)
persistent_policy_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
persistent_policy_l="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
--fstab) use_fstab_l="yes" ;;
-h|--help) long_usage; exit 1 ;;
-h | --help)
long_usage
exit 1
;;
--bzip2) compress_l="bzip2" ;;
--lzma) compress_l="lzma" ;;
--xz) compress_l="xz" ;;
@ -630,18 +785,37 @@ while :; do
@@ -630,18 +785,37 @@ while :; do
--uefi) uefi_l="yes" ;;
--no-uefi) uefi_l="no" ;;
--uefi-stub)
uefi_stub_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
uefi_stub_l="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
--uefi-splash-image)
uefi_splash_image_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
uefi_splash_image_l="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
--kernel-image)
kernel_image_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
kernel_image_l="$2"
PARMS_TO_STORE+=" '$2'"
shift
;;
--no-machineid)
machine_id_l="no";;
--version) long_version; exit 1 ;;
--) shift; break;;
machine_id_l="no"
;;
--version)
long_version
exit 1
;;
--)
shift
break
;;
*) # should not even reach this point
printf "\n!Unknown option: '%s'\n\n" "$1" >&2; usage; exit 1;;
printf "\n!Unknown option: '%s'\n\n" "$1" >&2
usage
exit 1
;;
esac
shift
done
@ -675,8 +849,8 @@ if [[ $regenerate_all == "yes" ]]; then
@@ -675,8 +849,8 @@ if [[ $regenerate_all == "yes" ]]; then
((len = ${#dracut_args[@]}))
for ((i = 0; i < len; i++)); do
[[ ${dracut_args[$i]} == "--regenerate-all" ]] && \
unset "dracut_args[$i]"
[[ ${dracut_args[$i]} == "--regenerate-all" ]] \
&& unset "dracut_args[$i]"
done
cd "$dracutsysrootdir"/lib/modules || exit 1
@ -703,12 +877,12 @@ unset GREP_OPTIONS
@@ -703,12 +877,12 @@ unset GREP_OPTIONS
export DRACUT_LOG_LEVEL=warning
[[ $debug ]] && {
export DRACUT_LOG_LEVEL=debug
export PS4='${BASH_SOURCE}@${LINENO}(${FUNCNAME[0]}): ';
export PS4='${BASH_SOURCE}@${LINENO}(${FUNCNAME[0]}): '
set -x
}
[[ $profile ]] && {
export PS4='+ $(date "+%s.%N") ${BASH_SOURCE}@${LINENO}: ';
export PS4='+ $(date "+%s.%N") ${BASH_SOURCE}@${LINENO}: '
set -x
debug=yes
}
@ -816,8 +990,8 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
@@ -816,8 +990,8 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
[[ $early_microcode_l ]] && early_microcode=$early_microcode_l
[[ $early_microcode ]] || early_microcode=yes
[[ $early_microcode_image_dir ]] || early_microcode_image_dir=('/boot')
[[ $early_microcode_image_name ]] || \
early_microcode_image_name=('intel-uc.img' 'intel-ucode.img' 'amd-uc.img' 'amd-ucode.img' 'early_ucode.cpio' 'microcode.cpio')
[[ $early_microcode_image_name ]] \
|| early_microcode_image_name=('intel-uc.img' 'intel-ucode.img' 'amd-uc.img' 'amd-ucode.img' 'early_ucode.cpio' 'microcode.cpio')
[[ $logfile_l ]] && logfile="$logfile_l"
[[ $reproducible_l ]] && reproducible="$reproducible_l"
[[ $loginstall_l ]] && loginstall="$loginstall_l"
@ -845,8 +1019,8 @@ if ! [[ $outfile ]]; then
@@ -845,8 +1019,8 @@ if ! [[ $outfile ]]; then
fi
BUILD_ID=$(cat "$dracutsysrootdir"/etc/os-release "$dracutsysrootdir"/usr/lib/os-release \
| while read -r line || [[ $line ]]; do \
[[ $line =~ BUILD_ID\=* ]] && eval "$line" && echo "$BUILD_ID" && break; \
| while read -r line || [[ $line ]]; do
[[ $line =~ BUILD_ID\=* ]] && eval "$line" && echo "$BUILD_ID" && break
done)
if [[ -z $dracutsysrootdir ]]; then
if [[ -d /efi ]] && mountpoint -q /efi; then
@ -910,7 +1084,8 @@ fi
@@ -910,7 +1084,8 @@ fi
case $hostonly_mode in
'')
[[ $hostonly ]] && hostonly_mode="sloppy" ;;
[[ $hostonly ]] && hostonly_mode="sloppy"
;;
sloppy | strict)
if [[ ! $hostonly ]]; then
unset hostonly_mode
@ -919,6 +1094,7 @@ case $hostonly_mode in
@@ -919,6 +1094,7 @@ case $hostonly_mode in
*)
printf "%s\n" "dracut: Invalid hostonly mode '$hostonly_mode'." >&2
exit 1
;;
esac
[[ $reproducible == yes ]] && DRACUT_REPRODUCIBLE=1
@ -1045,8 +1221,8 @@ unset omit_drivers_corrected
@@ -1045,8 +1221,8 @@ unset omit_drivers_corrected
# prepare args for logging
for ((i = 0; i < ${#dracut_args[@]}; i++)); do
[[ "${dracut_args[$i]}" == *\ * ]] && \
dracut_args[$i]="\"${dracut_args[$i]}\""
[[ "${dracut_args[$i]}" == *\ * ]] \
&& dracut_args[$i]="\"${dracut_args[$i]}\""
#" keep vim happy
done
@ -1054,9 +1230,9 @@ dinfo "Executing: $dracut_cmd ${dracut_args[*]}"
@@ -1054,9 +1230,9 @@ dinfo "Executing: $dracut_cmd ${dracut_args[*]}"
[[ $do_list = yes ]] && {
for mod in "$dracutbasedir"/modules.d/*; do
[[ -d $mod ]] || continue;
[[ -e $mod/install || -e $mod/installkernel || \
-e $mod/module-setup.sh ]] || continue
[[ -d $mod ]] || continue
[[ -e $mod/install || -e $mod/installkernel || -e \
$mod/module-setup.sh ]] || continue
printf "%s\n" "${mod##*/??}"
done
exit 0
@ -1069,7 +1245,6 @@ esac
@@ -1069,7 +1245,6 @@ esac
abs_outfile=$(readlink -f "$outfile") && outfile="$abs_outfile"
[[ -d $dracutsysrootdir$systemdutildir ]] \
|| systemdutildir=$(pkg-config systemd --variable=systemdutildir 2> /dev/null)
@ -1146,9 +1321,11 @@ if [[ ! $print_cmdline ]]; then
@@ -1146,9 +1321,11 @@ if [[ ! $print_cmdline ]]; then
unset EFI_MACHINE_TYPE_NAME
case $(uname -m) in
x86_64)
EFI_MACHINE_TYPE_NAME=x64;;
EFI_MACHINE_TYPE_NAME=x64
;;
i?86)
EFI_MACHINE_TYPE_NAME=ia32;;
EFI_MACHINE_TYPE_NAME=ia32
;;
*)
dfatal "Architecture '$(uname -m)' not supported to create a UEFI executable"
exit 1
@ -1287,9 +1464,7 @@ if [[ $hostonly ]] && [[ "$hostonly_default_device" != "no" ]]; then
@@ -1287,9 +1464,7 @@ if [[ $hostonly ]] && [[ "$hostonly_default_device" != "no" ]]; then
"/usr/lib64" \
"/boot" \
"/boot/efi" \
"/boot/zipl" \
;
do
"/boot/zipl"; do
mp=$(readlink -f "$dracutsysrootdir$mp")
mountpoint "$mp" > /dev/null 2>&1 || continue
_dev=$(find_block_device "$mp")
@ -1587,8 +1762,7 @@ for_each_module_dir check_mount
@@ -1587,8 +1762,7 @@ for_each_module_dir check_mount
dracut_module_included "fips" && export DRACUT_FIPS_MODE=1
do_print_cmdline()
{
do_print_cmdline() {
local -A _mods_to_print
for i in $modules_loaded $mods_to_load; do
_mods_to_print[$i]=1
@ -1596,7 +1770,8 @@ do_print_cmdline()
@@ -1596,7 +1770,8 @@ do_print_cmdline()
# source our modules.
for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
_d_mod=${moddir##*/}; _d_mod=${_d_mod#[0-9][0-9]}
_d_mod=${moddir##*/}
_d_mod=${_d_mod#[0-9][0-9]}
[[ ${_mods_to_print[$_d_mod]} ]] || continue
module_cmdline "$_d_mod" "$moddir"
done
@ -1614,7 +1789,7 @@ fi
@@ -1614,7 +1789,7 @@ fi
[[ $prefix ]] && mkdir -m 0755 -p "${initdir}${prefix}"
# shellcheck disable=SC2174
[[ -h $dracutsysrootdir/lib ]] || mkdir -m 0755 -p "${initdir}${prefix}/lib"
[[ -L $dracutsysrootdir/lib ]] || mkdir -m 0755 -p "${initdir}${prefix}/lib"
[[ $prefix ]] && ln -sfn "${prefix#/}/lib" "$initdir/lib"
if [[ $prefix ]]; then
@ -1680,7 +1855,8 @@ _isize=0 #initramfs size
@@ -1680,7 +1855,8 @@ _isize=0 #initramfs size
modules_loaded=" "
# source our modules.
for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
_d_mod=${moddir##*/}; _d_mod=${_d_mod#[0-9][0-9]}
_d_mod=${moddir##*/}
_d_mod=${_d_mod#[0-9][0-9]}
[[ "$mods_to_load" == *\ $_d_mod\ * ]] || continue
if [[ $show_modules = yes ]]; then
printf "%s\n" "$_d_mod"
@ -1706,7 +1882,10 @@ for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
@@ -1706,7 +1882,10 @@ for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
#print the module install size
if [ -n "$printsize" ]; then
_isize_new=$(du -sk "${initdir}" | { read -r a _; echo -n "$a"; })
_isize_new=$(du -sk "${initdir}" | {
read -r a _
echo -n "$a"
})
_isize_delta=$((_isize_new - _isize))
printf "%s\n" "$_d_mod install size: ${_isize_delta}k"
_isize=$_isize_new
@ -1732,7 +1911,7 @@ if [[ $no_kernel != yes ]]; then
@@ -1732,7 +1911,7 @@ if [[ $no_kernel != yes ]]; then
hostonly='' instmods $drivers
fi
if [[ -n "${add_drivers// }" ]]; then
if [[ -n "${add_drivers// /}" ]]; then
# shellcheck disable=SC2086
hostonly='' instmods -c $add_drivers
fi
@ -1754,8 +1933,8 @@ if [[ $no_kernel != yes ]]; then
@@ -1754,8 +1933,8 @@ if [[ $no_kernel != yes ]]; then
dinfo "*** Installing kernel module dependencies done ***"
if [[ $noimageifnotneeded == yes ]] && [[ $hostonly ]]; then
if [[ ! -f "$initdir/lib/dracut/need-initqueue" ]] && \
[[ -f ${initdir}/lib/modules/$kernel/modules.dep && ! -s ${initdir}/lib/modules/$kernel/modules.dep ]]; then
if [[ ! -f "$initdir/lib/dracut/need-initqueue" ]] \
&& [[ -f ${initdir}/lib/modules/$kernel/modules.dep && ! -s ${initdir}/lib/modules/$kernel/modules.dep ]]; then
for i in "${initdir}"/etc/cmdline.d/*.conf; do
# We need no initramfs image and do not generate one.
[[ $i == "${initdir}/etc/cmdline.d/*.conf" ]] && exit 0
@ -1836,7 +2015,7 @@ for ((i=0; i < ${#include_src[@]}; i++)); do
@@ -1836,7 +2015,7 @@ for ((i=0; i < ${#include_src[@]}; i++)); do
# symlinks to $prefix
# Objectname is a file or a directory
for objectname in "$src"/*; do
[[ -e "$objectname" || -h "$objectname" ]] || continue
[[ -e "$objectname" || -L "$objectname" ]] || continue
if [[ -d "$objectname" ]]; then
# objectname is a directory, let's compute the final directory name
object_destdir=${destdir}/${objectname#$src/}
@ -1925,8 +2104,8 @@ if [[ $early_microcode = yes ]]; then
@@ -1925,8 +2104,8 @@ if [[ $early_microcode = yes ]]; then
if cd "$early_cpio_dir/d"; then
for _ucodedir in "${early_microcode_image_dir[@]}"; do
for _ucodename in "${early_microcode_image_name[@]}"; do
[[ -e "$_ucodedir/$_ucodename" ]] && \
cpio --extract --file "$_ucodedir/$_ucodename" --quiet \
[[ -e "$_ucodedir/$_ucodename" ]] \
&& cpio --extract --file "$_ucodedir/$_ucodename" --quiet \
"kernel/x86/microcode/${ucode_dest[$idx]}"
if [[ -e "$_dest_dir/${ucode_dest[$idx]}" ]]; then
dinfo "*** Using microcode found in '$_ucodedir/$_ucodename' ***"
@ -2088,7 +2267,8 @@ if [[ $create_early_cpio = yes ]]; then
@@ -2088,7 +2267,8 @@ if [[ $create_early_cpio = yes ]]; then
# The microcode blob is _before_ the initramfs blob, not after
if ! (
umask 077; cd "$early_cpio_dir/d"
umask 077
cd "$early_cpio_dir/d"
find . -print0 | sort -z \
| cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null \
${cpio_owner:+-R "$cpio_owner"} -H newc -o --quiet > "${DRACUT_TMPDIR}/initramfs.img"
@ -2146,7 +2326,8 @@ case $compress in
@@ -2146,7 +2326,8 @@ case $compress in
esac
if ! (
umask 077; cd "$initdir"
umask 077
cd "$initdir"
find . -print0 | sort -z \
| cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null ${cpio_owner:+-R "$cpio_owner"} -H newc -o --quiet \
| $compress >> "${DRACUT_TMPDIR}/initramfs.img"
@ -2200,7 +2381,7 @@ if [[ $uefi = yes ]]; then
@@ -2200,7 +2381,7 @@ if [[ $uefi = yes ]]; then
--add-section .linux="$kernel_image" --change-section-vma .linux=0x2000000 \
--add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd=0x3000000 \
"$uefi_stub" "${uefi_outdir}/linux.efi"; then
if [[ -n "${uefi_secureboot_key}" && -n "${uefi_secureboot_cert}" ]]; then \
if [[ -n "${uefi_secureboot_key}" && -n "${uefi_secureboot_cert}" ]]; then
if sbsign \
--key "${uefi_secureboot_key}" \
--cert "${uefi_secureboot_cert}" \
@ -2258,11 +2439,14 @@ freeze_ok_for_fstype() {
@@ -2258,11 +2439,14 @@ freeze_ok_for_fstype() {
fstype=$(stat -f -c %T -- "$outfile")
case $fstype in
msdos)
return 1;;
return 1
;;
btrfs)
freeze_ok_for_btrfs "$outfile";;
freeze_ok_for_btrfs "$outfile"
;;
*)
return 0;;
return 0
;;
esac
}