mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdev/dracut: add field debugging capabilities with logging
Additional debugging output can be generated with e.g. dracut option "--stdlog 5" (or short -L5). It shows the chzdev export result, the output of chzdev imports, and an overview of the resulting persistent config within the initrd. On systems, which default to using dracut option "--quiet", you might need an additional "--verbose" to counter "--quiet" so -L5 has effect. Typically combined with "--debug" to get a shell trace from building an initrd (Note: --debug does not increase the log levels). Github-ID: https://github.com/ibm-s390-linux/s390-tools/pull/158 Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com> Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com> Acked-by: Vineeth Vijayan <vneethv@linux.ibm.com> Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Steffen Maier <maier@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
7ecfe2353f
commit
63f31bf73e
@@ -25,7 +25,7 @@ check() {
|
||||
zdev_is_kdump || return 1
|
||||
|
||||
# Ensure that required tools are available
|
||||
require_binaries chzdev || return 1
|
||||
require_binaries chzdev lszdev || return 1
|
||||
|
||||
return 0
|
||||
}
|
||||
@@ -61,8 +61,8 @@ install() {
|
||||
# many zFCP LUNs
|
||||
inst_dir /etc/modprobe.d
|
||||
chzdev zfcp --type "allow_lun_scan=0" --persistent \
|
||||
--base "/etc=${initdir:?}/etc" --yes --quiet --no-root-update \
|
||||
--force >/dev/null
|
||||
--base "/etc=${initdir:?}/etc" --yes --no-root-update \
|
||||
--force 2>&1 | ddebug
|
||||
# drop /etc/zfcp.conf from dracut module 95zfcp
|
||||
echo "rd.zfcp.conf=0" > "$initdir/etc/cmdline.d/00-no-zfcp-conf.conf"
|
||||
# => only activate individual zfcp paths found as required below
|
||||
@@ -81,9 +81,14 @@ install() {
|
||||
for_each_host_dev_and_slaves_all check_zdev
|
||||
sed -i -e 's/^\[active /\[persistent /' "$_tempfile"
|
||||
|
||||
ddebug < "$_tempfile"
|
||||
|
||||
# Apply via --import to prevent other devices from being configured
|
||||
chzdev --import "$_tempfile" --persistent --base "/etc=$initdir/etc" \
|
||||
--yes --quiet --no-root-update --force >/dev/null
|
||||
--yes --no-root-update --force 2>&1 | ddebug
|
||||
|
||||
lszdev --configured --persistent --info \
|
||||
--base "/etc=$initdir/etc" 2>&1 | ddebug
|
||||
|
||||
rm -f "$_tempfile"
|
||||
|
||||
|
||||
@@ -90,16 +90,21 @@ install() {
|
||||
--quiet 2>/dev/null >> "$_tempfile"
|
||||
done
|
||||
|
||||
ddebug < "$_tempfile"
|
||||
|
||||
# Apply via --import to prevent other devices from being configured
|
||||
chzdev --import "$_tempfile" --persistent --base "/etc=${initdir:?}/etc" \
|
||||
--yes --quiet --no-root-update --force >/dev/null
|
||||
--yes --no-root-update --force 2>&1 | ddebug
|
||||
# Apply site-specific configurations via --import
|
||||
for (( site=0; site<10; site++ ))
|
||||
do
|
||||
chzdev --import "$_tempfile" --persistent --base "/etc=$initdir/etc" \
|
||||
--site $site --yes --quiet --no-root-update --force >/dev/null
|
||||
--site $site --yes --no-root-update --force 2>&1 | ddebug
|
||||
done
|
||||
|
||||
lszdev --configured --persistent --info \
|
||||
--base "/etc=$initdir/etc" 2>&1 | ddebug
|
||||
|
||||
rm -f "$_tempfile"
|
||||
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user