From: mhuang <mhuang(a)redhat.com>
The device which is exclude by root device, must specify option in
/etc/dasd.conf to make it online on s390x when the machine is booting.
The kdump will fail to generate the vmcore in the 2nd kernel, if
the kdump target is not the root device.
In the initramfs, we will generate the config dasd.conf which contains
all of the online devices by sysfs.
Signed-off-by: mhuang <mhuang(a)redhat.com>
---
dracut-module-setup.sh | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index 38801de..48307e6 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -569,6 +569,29 @@ kdump_install_random_seed() {
bs=$poolsize count=1 2> /dev/null
}
+specify_dasd_conf() {
+ local dasd_dev
+ local dasd_conf="${initdir}/etc/dasd.conf"
+
+ [[ -f $dasd_conf ]] || touch $dasd_conf
+
+ for dasd_dev in /sys/block/dasd*
+ do
+ if [ `cat $dasd_dev/device/online` -eq 1 ]; then
+ dasd_dev=$(basename $(readlink $dasd_dev/device))
+ if ! grep -q "$dasd_dev" $dasd_conf 2>/dev/null; then
+ echo $dasd_dev >> $dasd_conf
+ fi
+ fi
+ done
+}
+
+kdump_specify_conf() {
+ if [ "$(uname -m)" = "s390x" ]; then
+ specify_dasd_conf
+ fi
+}
+
install() {
kdump_install_conf
@@ -601,6 +624,8 @@ install() {
# target. Ideally all this should be pushed into dracut iscsi module
# at some point of time.
kdump_check_iscsi_targets
+
+ kdump_specify_conf
}
installkernel() {
--
1.8.3.1
Show replies by thread