diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh index d8d4893..9275c83 100755 --- a/kdump-lib-initramfs.sh +++ b/kdump-lib-initramfs.sh @@ -123,7 +123,7 @@ dump_fs() ddebug "_mp=$_mp _dev=$_dev _op=$_op" # If dump path have a corresponding device entry but not mounted, mount it. - if [ -n "$_dev" ]; then + if [ -n "$_dev" ] && [ "$_dev" != "rootfs" ]; then if ! is_mounted "$_mp"; then dinfo "dump target $_dev is not mounted, trying to mount..." mkdir -p $_mp diff --git a/kdump-lib.sh b/kdump-lib.sh index 98ff27c..f04095a 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -256,9 +256,9 @@ is_mounted() get_mount_info() { local _info_type=$1 _src_type=$2 _src=$3; shift 3 - local _info=$(findmnt --real -k -n -r -o $_info_type --$_src_type $_src $@) + local _info=$(findmnt -k -n -r -o $_info_type --$_src_type $_src $@) - [ -z "$_info" ] && [ -e "/etc/fstab" ] && _info=$(findmnt --real -s -n -r -o $_info_type --$_src_type $_src $@) + [ -z "$_info" ] && [ -e "/etc/fstab" ] && _info=$(findmnt -s -n -r -o $_info_type --$_src_type $_src $@) echo $_info }