disable kexec-syscall-auto flag on old kernels
This commit is contained in:
parent
1d92ed3028
commit
eaf2d21fa9
1 changed files with 8 additions and 1 deletions
|
@ -54,8 +54,15 @@ done
|
|||
|
||||
find . | cpio -o -H newc | gzip -9 >> "$SCRIPT_DIR/initrd"
|
||||
|
||||
kexecSyscallFlags=""
|
||||
# only do kexec-syscall-auto on kernels newer than 6.0.
|
||||
# On older kernel we often get errors like: https://github.com/nix-community/nixos-anywhere/issues/264
|
||||
if ! printf "%s\n" "6.1" "$(uname -r)" | sort -c -V; then
|
||||
kexecSyscallFlags="--kexec-syscall-auto"
|
||||
fi
|
||||
|
||||
if ! "$SCRIPT_DIR/kexec" --load "$SCRIPT_DIR/bzImage" \
|
||||
--kexec-syscall-auto \
|
||||
"$kexecSyscallFlags" \
|
||||
--initrd="$SCRIPT_DIR/initrd" --no-checks \
|
||||
--command-line "init=$init $kernelParams"; then
|
||||
echo "kexec failed, dumping dmesg"
|
||||
|
|
Loading…
Reference in a new issue