add kdump parameter into kernel cmdline

This commit is contained in:
zhangqiumiao 2020-07-14 23:12:52 +08:00
parent 201df8521c
commit c2a1eacab2
2 changed files with 50 additions and 1 deletions

View File

@ -1,7 +1,7 @@
%define _empty_manifest_terminate_build 0 %define _empty_manifest_terminate_build 0
Name: anaconda Name: anaconda
Version: 33.19 Version: 33.19
Release: 1 Release: 2
Summary: Graphical system installer Summary: Graphical system installer
License: GPLv2+ and MIT License: GPLv2+ and MIT
URL: http://fedoraproject.org/wiki/Anaconda URL: http://fedoraproject.org/wiki/Anaconda
@ -27,6 +27,7 @@ Patch9013: disable-product-name-in-welcome-is-uppercase.patch
Patch9014: modify-default-timezone.patch Patch9014: modify-default-timezone.patch
Patch9015: modify-network-hostname-dot-illegal.patch Patch9015: modify-network-hostname-dot-illegal.patch
Patch9016: disable-ssh-login-checkbox.patch Patch9016: disable-ssh-login-checkbox.patch
Patch9017: bugfix-add-kdump-parameter-into-kernel-cmdline.patch
%define dbusver 1.2.3 %define dbusver 1.2.3
%define dnfver 3.6.0 %define dnfver 3.6.0
@ -238,6 +239,12 @@ update-desktop-database &> /dev/null || :
%{_datadir}/gtk-doc %{_datadir}/gtk-doc
%changelog %changelog
* Tue Jul 14 2020 zhangqiumiao <zhangqiumiao1@huawei.com> - 33.19-2
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:add kdump parameter into kernel cmdline
* Fri Jun 19 2020 fengtao <fengtao40@huawei.com> - 33.19-1 * Fri Jun 19 2020 fengtao <fengtao40@huawei.com> - 33.19-1
- update version to 33.19 - update version to 33.19

View File

@ -0,0 +1,42 @@
From e8e0d299420138e95dae58fcd4b5669e72217947 Mon Sep 17 00:00:00 2001
From: Jialong Chen <chenjialong@huawei.com>
Date: Tue, 14 Jul 2020 21:45:01 +0800
Subject: [PATCH] add kdump parameter into kernel cmdline
---
pyanaconda/modules/storage/bootloader/grub2.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/modules/storage/bootloader/grub2.py b/pyanaconda/modules/storage/bootloader/grub2.py
index c6b7db4..57fb2e5 100644
--- a/pyanaconda/modules/storage/bootloader/grub2.py
+++ b/pyanaconda/modules/storage/bootloader/grub2.py
@@ -17,6 +17,7 @@
#
import os
import re
+import blivet
from _ped import PARTITION_BIOS_GRUB
from blivet.devicelibs import raid
@@ -266,8 +267,15 @@ class GRUB2(BootLoader):
# this is going to cause problems for systems containing multiple
# linux installations or even multiple boot entries with different
# boot arguments
- log.info("bootloader.py: used boot args: %s ", self.boot_args)
- defaults.write("GRUB_CMDLINE_LINUX=\"%s\"\n" % self.boot_args)
+ arg_str = "%s" % self.boot_args
+ if blivet.arch.is_aarch64():
+ log.info("check boot args:%s", arg_str)
+ arg_str += "crashkernel=1024M,high"
+ else:
+ arg_str += "crashkernel=512M"
+
+ log.info("bootloader.py: used boot args: %s ", arg_str)
+ defaults.write("GRUB_CMDLINE_LINUX=\"%s\"\n" % arg_str)
defaults.write("GRUB_DISABLE_RECOVERY=\"true\"\n")
#defaults.write("GRUB_THEME=\"/boot/grub2/themes/system/theme.txt\"\n")
--
1.8.3.1