Cc Hari for fadump part.
On 07/04/17 at 01:45pm, Xunlei Pang wrote:
Resolves: bz1451717 https://bugzilla.redhat.com/1451717
When there is no crypt related kdump target, we can safely omit "crypt" dracut module, this can avoid the pop asking disk password during kdump boot in some cases.
Signed-off-by: Xunlei Pang xlpang@redhat.com
kdump-lib.sh | 12 ++++++++++++ kdumpctl | 12 ------------ mkdumprd | 26 ++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 12 deletions(-)
diff --git a/kdump-lib.sh b/kdump-lib.sh index 6b112a4..c09248d 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -6,6 +6,7 @@ DEFAULT_PATH="/var/crash/" FENCE_KDUMP_CONFIG_FILE="/etc/sysconfig/fence_kdump" FENCE_KDUMP_SEND="/usr/libexec/fence_kdump_send" +FADUMP_ENABLED_SYS_NODE="/sys/kernel/fadump_enabled"
perror_exit() { echo $@ >&2 @@ -485,3 +486,14 @@ get_dracut_args_target() { echo $1 | grep "--mount" | sed "s/.*--mount .(.*)/\1/" | cut -d' ' -f1 }
+is_fadump_capable() +{
- # Check if firmware-assisted dump is enabled
- # if no, fallback to kdump check
- if [ -f $FADUMP_ENABLED_SYS_NODE ]; then
rc=`cat $FADUMP_ENABLED_SYS_NODE`
[ $rc -eq 1 ] && return 0
- fi
- return 1
+} diff --git a/kdumpctl b/kdumpctl index fb4112e..8c57f5f 100755 --- a/kdumpctl +++ b/kdumpctl @@ -13,7 +13,6 @@ DUMP_TARGET="" DEFAULT_INITRD="" DEFAULT_INITRD_BAK="" TARGET_INITRD="" -FADUMP_ENABLED_SYS_NODE="/sys/kernel/fadump_enabled" FADUMP_REGISTER_SYS_NODE="/sys/kernel/fadump_registered" #kdump shall be the default dump mode DEFAULT_DUMP_MODE="kdump" @@ -934,17 +933,6 @@ handle_mode_switch() fi }
-is_fadump_capable() -{
- # Check if firmware-assisted dump is enabled
- # if no, fallback to kdump check
- if [ -f $FADUMP_ENABLED_SYS_NODE ]; then
rc=`cat $FADUMP_ENABLED_SYS_NODE`
[ $rc -eq 1 ] && return 0
- fi
- return 1
-}
check_current_fadump_status() { # Check if firmware-assisted dump has been registered. diff --git a/mkdumprd b/mkdumprd index 0fe1b30..0bd724c 100644 --- a/mkdumprd +++ b/mkdumprd @@ -382,6 +382,30 @@ check_crypt() return 1 }
+omit_dracut_modules() +{
- local target majmin
- local has_crypt
- # Skip fadump case
- is_fadump_capable && return
We have other default omitted modules in mkdumprd, seems fadump works well with it. Does that means we can omit below modules as well for fadump?
In fadump howto, it says there is some dracut changes to add kdump module to default initrd, but I do not find where is the dracut chagnes. I do not find anything in dracut repo..
- has_crypt=0
- for target in $(get_kdump_targets); do
if [ -b "$target" ]; then
# Check "crypt"
majmin=$(get_maj_min $target)
check_block_and_slaves is_crypt $majmin && has_crypt=1
fi
- done
- # Omit "crypt", BZ1451717
- if [ "$has_crypt" == "0" ]; then
add_dracut_arg "--omit" "crypt"
- fi
+}
if ! check_resettable; then exit 1 fi @@ -471,6 +495,8 @@ then add_dracut_arg "--add-drivers" "$extra_modules" fi
+omit_dracut_modules
dracut "${dracut_args[@]}" "$@" _rc=$? sync -- 1.8.3.1 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
Thanks Dave