The fadump sysfs nodes /sys/kernel/fadump_[enabled|registered], have been relocated to /sys/kernel/fadump/[enabled|registered] by kernel commits d418b19f34ed ("powerpc/fadump: Reorganize /sys/kernel/fadump_* sysfs files").
To ensure compatibility, symbolic links were added for each relocated sysfs entry. Nonetheless, note that these symbolic links might be removed later, as they have been deprecated by kernel commit 3f5f1f22ef10 ("Documentation/ABI: Mark /sys/kernel/fadump_* sysfs files deprecated")
This patch updates the scripts to use the updated fadump sysfs files.
Signed-off-by: Sourabh Jain sourabhjain@linux.ibm.com --- 98-kexec.rules.ppc64 | 2 +- fadump-howto.txt | 2 +- kdump-lib.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/98-kexec.rules.ppc64 b/98-kexec.rules.ppc64 index a1c00a9..e9db276 100644 --- a/98-kexec.rules.ppc64 +++ b/98-kexec.rules.ppc64 @@ -17,6 +17,6 @@ GOTO="kdump_reload_end"
LABEL="kdump_reload_cpu"
-RUN+="/bin/sh -c '/usr/bin/systemctl is-active kdump.service || exit 0; ! test -f /sys/kernel/fadump_enabled || cat /sys/kernel/fadump_enabled | grep 0 || exit 0; /usr/bin/systemd-run --quiet --no-block /usr/lib/udev/kdump-udev-throttler'" +RUN+="/bin/sh -c '/usr/bin/systemctl is-active kdump.service || exit 0; ! test -f /sys/kernel/fadump/enabled || cat /sys/kernel/fadump/enabled | grep 0 || exit 0; /usr/bin/systemd-run --quiet --no-block /usr/lib/udev/kdump-udev-throttler'"
LABEL="kdump_reload_end" diff --git a/fadump-howto.txt b/fadump-howto.txt index 9773f78..2fe76cf 100644 --- a/fadump-howto.txt +++ b/fadump-howto.txt @@ -137,7 +137,7 @@ Then, start up kdump as well: # systemctl start kdump.service
This should turn on the firmware assisted functionality in kernel by -echo'ing 1 to /sys/kernel/fadump_registered, leaving the system ready +echo'ing 1 to /sys/kernel/fadump/registered, leaving the system ready to capture a vmcore upon crashing. For journaling filesystems like XFS an additional step is required to ensure bootloader does not pick the older initrd (without vmcore capture scripts): diff --git a/kdump-lib.sh b/kdump-lib.sh index 16238c5..99c726b 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -8,8 +8,8 @@ else . /lib/kdump/kdump-lib-initramfs.sh fi
-FADUMP_ENABLED_SYS_NODE="/sys/kernel/fadump_enabled" -FADUMP_REGISTER_SYS_NODE="/sys/kernel/fadump_registered" +FADUMP_ENABLED_SYS_NODE="/sys/kernel/fadump/enabled" +FADUMP_REGISTER_SYS_NODE="/sys/kernel/fadump/registered"
is_uki() {
Please share your comments on this.
On 17/08/23 16:38, Sourabh Jain wrote:
The fadump sysfs nodes /sys/kernel/fadump_[enabled|registered], have been relocated to /sys/kernel/fadump/[enabled|registered] by kernel commits d418b19f34ed ("powerpc/fadump: Reorganize /sys/kernel/fadump_* sysfs files").
To ensure compatibility, symbolic links were added for each relocated sysfs entry. Nonetheless, note that these symbolic links might be removed later, as they have been deprecated by kernel commit 3f5f1f22ef10 ("Documentation/ABI: Mark /sys/kernel/fadump_* sysfs files deprecated")
This patch updates the scripts to use the updated fadump sysfs files.
Signed-off-by: Sourabh Jain sourabhjain@linux.ibm.com
98-kexec.rules.ppc64 | 2 +- fadump-howto.txt | 2 +- kdump-lib.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/98-kexec.rules.ppc64 b/98-kexec.rules.ppc64 index a1c00a9..e9db276 100644 --- a/98-kexec.rules.ppc64 +++ b/98-kexec.rules.ppc64 @@ -17,6 +17,6 @@ GOTO="kdump_reload_end"
LABEL="kdump_reload_cpu"
-RUN+="/bin/sh -c '/usr/bin/systemctl is-active kdump.service || exit 0; ! test -f /sys/kernel/fadump_enabled || cat /sys/kernel/fadump_enabled | grep 0 || exit 0; /usr/bin/systemd-run --quiet --no-block /usr/lib/udev/kdump-udev-throttler'" +RUN+="/bin/sh -c '/usr/bin/systemctl is-active kdump.service || exit 0; ! test -f /sys/kernel/fadump/enabled || cat /sys/kernel/fadump/enabled | grep 0 || exit 0; /usr/bin/systemd-run --quiet --no-block /usr/lib/udev/kdump-udev-throttler'"
LABEL="kdump_reload_end" diff --git a/fadump-howto.txt b/fadump-howto.txt index 9773f78..2fe76cf 100644 --- a/fadump-howto.txt +++ b/fadump-howto.txt @@ -137,7 +137,7 @@ Then, start up kdump as well: # systemctl start kdump.service
This should turn on the firmware assisted functionality in kernel by -echo'ing 1 to /sys/kernel/fadump_registered, leaving the system ready +echo'ing 1 to /sys/kernel/fadump/registered, leaving the system ready to capture a vmcore upon crashing. For journaling filesystems like XFS an additional step is required to ensure bootloader does not pick the older initrd (without vmcore capture scripts): diff --git a/kdump-lib.sh b/kdump-lib.sh index 16238c5..99c726b 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -8,8 +8,8 @@ else . /lib/kdump/kdump-lib-initramfs.sh fi
-FADUMP_ENABLED_SYS_NODE="/sys/kernel/fadump_enabled" -FADUMP_REGISTER_SYS_NODE="/sys/kernel/fadump_registered" +FADUMP_ENABLED_SYS_NODE="/sys/kernel/fadump/enabled" +FADUMP_REGISTER_SYS_NODE="/sys/kernel/fadump/registered"
is_uki() {
Hi Sourabh,
sorry for the late answer, I was out of office.
On Thu, 17 Aug 2023 16:38:35 +0530 Sourabh Jain sourabhjain@linux.ibm.com wrote:
The fadump sysfs nodes /sys/kernel/fadump_[enabled|registered], have been relocated to /sys/kernel/fadump/[enabled|registered] by kernel commits d418b19f34ed ("powerpc/fadump: Reorganize /sys/kernel/fadump_* sysfs files").
The patch went upstream with v5.7 and got backported to rhel8 (rhel9 contained it from the beginning). So there shouldn't be a problem even if this patch needs to be backported.
To ensure compatibility, symbolic links were added for each relocated sysfs entry. Nonetheless, note that these symbolic links might be removed later, as they have been deprecated by kernel commit 3f5f1f22ef10 ("Documentation/ABI: Mark /sys/kernel/fadump_* sysfs files deprecated")
This patch updates the scripts to use the updated fadump sysfs files.
Signed-off-by: Sourabh Jain sourabhjain@linux.ibm.com
Looks good to me
Reviewed-by: Philipp Rudo prudo@redhat.com
98-kexec.rules.ppc64 | 2 +- fadump-howto.txt | 2 +- kdump-lib.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/98-kexec.rules.ppc64 b/98-kexec.rules.ppc64 index a1c00a9..e9db276 100644 --- a/98-kexec.rules.ppc64 +++ b/98-kexec.rules.ppc64 @@ -17,6 +17,6 @@ GOTO="kdump_reload_end"
LABEL="kdump_reload_cpu"
-RUN+="/bin/sh -c '/usr/bin/systemctl is-active kdump.service || exit 0; ! test -f /sys/kernel/fadump_enabled || cat /sys/kernel/fadump_enabled | grep 0 || exit 0; /usr/bin/systemd-run --quiet --no-block /usr/lib/udev/kdump-udev-throttler'" +RUN+="/bin/sh -c '/usr/bin/systemctl is-active kdump.service || exit 0; ! test -f /sys/kernel/fadump/enabled || cat /sys/kernel/fadump/enabled | grep 0 || exit 0; /usr/bin/systemd-run --quiet --no-block /usr/lib/udev/kdump-udev-throttler'"
LABEL="kdump_reload_end" diff --git a/fadump-howto.txt b/fadump-howto.txt index 9773f78..2fe76cf 100644 --- a/fadump-howto.txt +++ b/fadump-howto.txt @@ -137,7 +137,7 @@ Then, start up kdump as well: # systemctl start kdump.service
This should turn on the firmware assisted functionality in kernel by -echo'ing 1 to /sys/kernel/fadump_registered, leaving the system ready +echo'ing 1 to /sys/kernel/fadump/registered, leaving the system ready to capture a vmcore upon crashing. For journaling filesystems like XFS an additional step is required to ensure bootloader does not pick the older initrd (without vmcore capture scripts): diff --git a/kdump-lib.sh b/kdump-lib.sh index 16238c5..99c726b 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -8,8 +8,8 @@ else . /lib/kdump/kdump-lib-initramfs.sh fi
-FADUMP_ENABLED_SYS_NODE="/sys/kernel/fadump_enabled" -FADUMP_REGISTER_SYS_NODE="/sys/kernel/fadump_registered" +FADUMP_ENABLED_SYS_NODE="/sys/kernel/fadump/enabled" +FADUMP_REGISTER_SYS_NODE="/sys/kernel/fadump/registered"
is_uki() {
Hi Philipp,
On 30/08/23 18:34, Philipp Rudo wrote:
Hi Sourabh,
sorry for the late answer, I was out of office.
On Thu, 17 Aug 2023 16:38:35 +0530 Sourabh Jain sourabhjain@linux.ibm.com wrote:
The fadump sysfs nodes /sys/kernel/fadump_[enabled|registered], have been relocated to /sys/kernel/fadump/[enabled|registered] by kernel commits d418b19f34ed ("powerpc/fadump: Reorganize /sys/kernel/fadump_* sysfs files").
The patch went upstream with v5.7 and got backported to rhel8 (rhel9 contained it from the beginning). So there shouldn't be a problem even if this patch needs to be backported.
To ensure compatibility, symbolic links were added for each relocated sysfs entry. Nonetheless, note that these symbolic links might be removed later, as they have been deprecated by kernel commit 3f5f1f22ef10 ("Documentation/ABI: Mark /sys/kernel/fadump_* sysfs files deprecated")
This patch updates the scripts to use the updated fadump sysfs files.
Signed-off-by: Sourabh Jain sourabhjain@linux.ibm.com
Looks good to me
Reviewed-by: Philipp Rudo prudo@redhat.com
Thanks for the review.
- Sourabh
On Wed, Aug 30, 2023 at 06:40:15PM +0530, Sourabh Jain wrote:
Hi Philipp,
On 30/08/23 18:34, Philipp Rudo wrote:
Hi Sourabh,
sorry for the late answer, I was out of office.
On Thu, 17 Aug 2023 16:38:35 +0530 Sourabh Jain sourabhjain@linux.ibm.com wrote:
The fadump sysfs nodes /sys/kernel/fadump_[enabled|registered], have been relocated to /sys/kernel/fadump/[enabled|registered] by kernel commits d418b19f34ed ("powerpc/fadump: Reorganize /sys/kernel/fadump_* sysfs files").
The patch went upstream with v5.7 and got backported to rhel8 (rhel9 contained it from the beginning). So there shouldn't be a problem even if this patch needs to be backported.
To ensure compatibility, symbolic links were added for each relocated sysfs entry. Nonetheless, note that these symbolic links might be removed later, as they have been deprecated by kernel commit 3f5f1f22ef10 ("Documentation/ABI: Mark /sys/kernel/fadump_* sysfs files deprecated")
This patch updates the scripts to use the updated fadump sysfs files.
Signed-off-by: Sourabh Jain sourabhjain@linux.ibm.com
Looks good to me
Reviewed-by: Philipp Rudo prudo@redhat.com
Thanks for the review.
- Sourabh
Patch merged, thanks to Sourabh and Philipp!