Accepting request 232828 from home:trenn:branches:Base:System

- Update add_dracuts_network_params_for_iscsi.patch to detect
  be2iscsi firmware devices
- Remove obsolete patch fix-iscsi-firmware.sh
- Fixup iscsi firmware booting with be2iscsi (bnc#873448):
  Added 0024-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch
- Renamed mkinird_differ_host_and_cmdline_only_properly.patch to
  0023-mkinitrd-suse.sh-Use-hostonly-and-hostonly-cmdline-c.patch

OBS-URL: https://build.opensuse.org/request/show/232828
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=140
This commit is contained in:
Thomas Renninger 2014-05-06 11:22:17 +00:00 committed by Git OBS Bridge
parent 30c51ef231
commit 2f8fa9a482
8 changed files with 163 additions and 82 deletions

View File

@ -0,0 +1,51 @@
From c99348f3337fde44a98abf5946b7cbf36bce1b0e Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Mon, 5 May 2014 08:38:44 +0200
Subject: mkinitrd-suse.sh: Use '--hostonly' and '--hostonly-cmdline' correctly
LVM and other systems might not be working properly as the
--hostonly-cmdline flag has to be active by default.
References: bnc#874000,bnc#874905,bnc#874363
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
mkinitrd-suse.8.asc | 4 +++-
mkinitrd-suse.sh | 6 +++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/mkinitrd-suse.8.asc b/mkinitrd-suse.8.asc
index 9eb8fc9..a181b75 100644
--- a/mkinitrd-suse.8.asc
+++ b/mkinitrd-suse.8.asc
@@ -76,7 +76,9 @@ OPTIONS
**-A**::
Create a so called "monster initrd" which includes all available
- features and modules.
+ features and modules. This calls dracut with --no-hostonly and
+ --no-hostonly-cmdline parameters internally, instead of the default
+ --hostonly and --hostonly-cmdline.
**-v, --verbose**::
increase verbosity level
diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh
index 1c2634f..c02062d 100755
--- a/mkinitrd-suse.sh
+++ b/mkinitrd-suse.sh
@@ -297,7 +297,11 @@ targets=( $targets )
[[ $kernels ]] && kernels=( $kernels )
[[ $logfile ]] && dracut_args="${dracut_args} --logfile $logfile"
-[[ $host_only == 1 ]] && dracut_args="${dracut_args} --hostonly"
+if [[ $host_only == 1 ]];then
+ dracut_args="${dracut_args} --hostonly --hostonly-cmdline"
+else
+ dracut_args="${dracut_args} --no-hostonly --no-hostonly-cmdline"
+fi
[[ $force == 1 ]] && dracut_args="${dracut_args} --force"
[[ $dracut_cmdline ]] && dracut_args="${dracut_args} --kernel-cmdline ${dracut_cmdline}"
[ -z "$(type -p update-bootloader)" ] && skip_update_bootloader=1
--
1.8.5.2

View File

@ -0,0 +1,37 @@
From 2a30da782e48d953507ca793ab0bc7f78b37db9f Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Mon, 5 May 2014 08:48:35 +0200
Subject: 95iscsi: Set correct iscsi_started value for iSCSI firmware
When iSCSI firmware booting is selected we should not rely on
'netroot' or 'iscsiroot' variables to be set.
References: bnc#873448
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/95iscsi/parse-iscsiroot.sh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
index a965cc6..c1a47d2 100755
--- a/modules.d/95iscsi/parse-iscsiroot.sh
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
@@ -98,8 +98,12 @@ if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; the
fi
fi
-netroot_enc=$(str_replace "$netroot" '/' '\2f')
-echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh
+if [ -n "$iscsi_firmware" ] ; then
+ echo "[ -f '/tmp/iscsistarted-firmware' ]" > $hookdir/initqueue/finished/iscsi_started.sh
+else
+ netroot_enc=$(str_replace "$netroot" '/' '\2f')
+ echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > $hookdir/initqueue/finished/iscsi_started.sh
+fi
# Done, all good!
rootok=1
--
1.8.5.2

View File

@ -1,22 +1,40 @@
Index: dracut-037/modules.d/95iscsi/module-setup.sh From c1db8b0b1a7545c9edf2b0b2328733c44ba4e8f1 Mon Sep 17 00:00:00 2001
=================================================================== From: Hannes Reinecke <hare@suse.de>
--- dracut-037.orig/modules.d/95iscsi/module-setup.sh 2014-03-19 17:16:08.000000000 +0100 Date: Mon, 5 May 2014 08:32:16 +0200
+++ dracut-037/modules.d/95iscsi/module-setup.sh 2014-04-14 13:40:02.560200357 +0200 Subject: 95iscsi: Autodetect iSCSI firmware
Some iSCSI initiator present firmware information in
/sys/firmware/ibft or /sys/firmware/iscsi_bootX
Whenever we detect one of those directories we should assume
that the iSCSI devices should be activated.
Signed-off-by: Pavel Wieczorkiewicz <pwieczorkiewicz@suse.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/95iscsi/module-setup.sh | 16 ++++++++++++++++
modules.d/95iscsi/parse-iscsiroot.sh | 10 ++++++++--
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
index 1b0f292..97e6e81 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -39,6 +39,22 @@ depends() { @@ -39,6 +39,22 @@ depends() {
installkernel() { installkernel() {
local _arch=$(uname -m) local _arch=$(uname -m)
+ install_ibft() { + install_ibft() {
+ local IBFT_NICS="ethernet" + # When iBFT / iscsi_boot is detected:
+ local IBFT_ROOT="/sys/firmware/ibft" + # - mark network as mandatory
+ # - specify firmware booting cmdline parameter
+ +
+ # When iBFT is detected: + for d in /sys/firmware/* ; do
+ # - mark network as mandatory + if [ -d ${d}/initiator ] ; then
+ # - specify firmware booting cmdline parameter + echo "rd.neednet=1" >> "${initdir}/etc/cmdline.d/95iscsi.conf"
+ if [ -d "${IBFT_ROOT}/${IBFT_NICS}"* ]; then + echo "rd.iscsi.firmware=1" >> "${initdir}/etc/cmdline.d/95iscsi.conf"
+ echo "rd.neednet=1" >> "${initdir}/etc/cmdline.d/95iscsi.conf" + fi
+ echo "rd.iscsi.firmware=1" >> "${initdir}/etc/cmdline.d/95iscsi.conf" + done
+ fi
+ } + }
+ +
+ # Detect iBFT and perform mandatory steps + # Detect iBFT and perform mandatory steps
@ -25,3 +43,30 @@ Index: dracut-037/modules.d/95iscsi/module-setup.sh
instmods bnx2i qla4xxx cxgb3i cxgb4i be2iscsi instmods bnx2i qla4xxx cxgb3i cxgb4i be2iscsi
hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs
iscsi_module_filter() { iscsi_module_filter() {
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
index 4be9d56..a965cc6 100755
--- a/modules.d/95iscsi/parse-iscsiroot.sh
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
@@ -59,11 +59,17 @@ if [ -n "$iscsiroot" ] ; then
[ -z "$netroot" ] || [ "$netroot" = "iscsi" ] && netroot=iscsi:$iscsiroot
fi
+# Autodetect iSCSI firmware targets
+if [ -z "$iscsiroot" ] ; then
+ modprobe -q iscsi_boot_sysfs
+ modprobe -q iscsi_ibft
+ [ -d /sys/firmware/ibft ] && iscsi_firmware="1"
+ [ -d /sys/firmware/iscsi_boot1 ] && iscsi_firmware="1"
+fi
+
# iscsi_firmware does not need argument checking
if [ -n "$iscsi_firmware" ] ; then
netroot=${netroot:-iscsi:}
- modprobe -q iscsi_boot_sysfs 2>/dev/null
- modprobe -q iscsi_ibft
initqueue --onetime --timeout "/sbin/iscsiroot dummy '$netroot' '$NEWROOT'"
fi
--
1.8.5.2

View File

@ -5,11 +5,12 @@ Subject: [PATCH] 45ifcfg: use distro-specific scripts
Detect the system flavor and write the ifcfg files accordingly. Detect the system flavor and write the ifcfg files accordingly.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Modified-by: Thomas Rennigner <trenn@suse.de>
- Do not move ifcfg to -suse and -redhat files to avoid re-diffing after - Do not move ifcfg to -suse and -redhat files to avoid re-diffing after
each upgrade. Handle this in the spec file and a separate each upgrade. Handle this in the spec file and a separate
write-ifcfg-suse.sh source file write-ifcfg-suse.sh source file
Signed-off-by: Hannes Reinecke <hare@suse.de>
Modified-by: Thomas Rennigner <trenn@suse.de>
--- ---
modules.d/40network/ifup.sh | 1 + modules.d/40network/ifup.sh | 1 +
modules.d/45ifcfg/module-setup.sh | 8 +- modules.d/45ifcfg/module-setup.sh | 8 +-

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Mon May 5 08:55:37 CEST 2014 - hare@suse.de
- Update add_dracuts_network_params_for_iscsi.patch to detect
be2iscsi firmware devices
- Remove obsolete patch fix-iscsi-firmware.sh
- Fixup iscsi firmware booting with be2iscsi (bnc#873448):
Added 0024-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch
- Renamed mkinird_differ_host_and_cmdline_only_properly.patch to
0023-mkinitrd-suse.sh-Use-hostonly-and-hostonly-cmdline-c.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Apr 30 15:18:45 UTC 2014 - trenn@suse.de Wed Apr 30 15:18:45 UTC 2014 - trenn@suse.de

View File

@ -42,7 +42,6 @@ Patch12: 0014-Check-for-plymouth-lib-directories.patch
Patch13: dracut_do_not_update_booloader_if_no_kernel_is_found.patch Patch13: dracut_do_not_update_booloader_if_no_kernel_is_found.patch
Patch14: suse_grub_manpage.patch Patch14: suse_grub_manpage.patch
Patch15: replace_dhclient_with_wickedd_dhcp_supplicants.patch Patch15: replace_dhclient_with_wickedd_dhcp_supplicants.patch
Patch16: fix-iscsi-firmware.patch
Patch18: 0015-add-new-s390x-specific-rule-files.patch Patch18: 0015-add-new-s390x-specific-rule-files.patch
Patch19: change_write_ifcfg_to_suse.patch Patch19: change_write_ifcfg_to_suse.patch
Patch20: dracut-fix-whitespace-add-drivers_call.patch Patch20: dracut-fix-whitespace-add-drivers_call.patch
@ -59,7 +58,8 @@ Patch32: 0020-95udev-rules-Include-correct-sg3_utils-rules.patch
Patch33: 0021-90multipath-install-correct-multipath-rules.patch Patch33: 0021-90multipath-install-correct-multipath-rules.patch
Patch34: add_dracuts_network_params_for_iscsi.patch Patch34: add_dracuts_network_params_for_iscsi.patch
Patch35: 0022-90multipath-Fixup-service-file-for-booting.patch Patch35: 0022-90multipath-Fixup-service-file-for-booting.patch
Patch36: mkinird_differ_host_and_cmdline_only_properly.patch Patch36: 0023-mkinitrd-suse.sh-Use-hostonly-and-hostonly-cmdline-c.patch
Patch37: 0024-95iscsi-Set-correct-iscsi_started-value-for-iSCSI-fi.patch
BuildRequires: asciidoc BuildRequires: asciidoc
BuildRequires: bash BuildRequires: bash
BuildRequires: docbook-xsl-stylesheets BuildRequires: docbook-xsl-stylesheets
@ -116,7 +116,6 @@ and its cryptography during startup.
%patch13 -p1 %patch13 -p1
%patch14 -p1 %patch14 -p1
%patch15 -p1 %patch15 -p1
%patch16 -p1
%patch18 -p1 %patch18 -p1
%patch19 -p1 %patch19 -p1
%patch20 -p1 %patch20 -p1
@ -134,6 +133,7 @@ and its cryptography during startup.
%patch34 -p1 %patch34 -p1
%patch35 -p1 %patch35 -p1
%patch36 -p1 %patch36 -p1
%patch37 -p1
%build %build
%configure\ %configure\

View File

@ -1,31 +0,0 @@
From af3c6eb8a04c2e526061f1dc82a94f01408bb415 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Mon, 7 Apr 2014 16:28:34 +0200
Subject: [PATCH] 95iscsi: Fix iSCSI firmware path
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/95iscsi/parse-iscsiroot.sh | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Index: dracut-037/modules.d/95iscsi/parse-iscsiroot.sh
===================================================================
--- dracut-037.orig/modules.d/95iscsi/parse-iscsiroot.sh 2014-03-19 17:16:08.000000000 +0100
+++ dracut-037/modules.d/95iscsi/parse-iscsiroot.sh 2014-04-15 11:49:40.922075002 +0200
@@ -64,7 +64,6 @@ if [ -n "$iscsi_firmware" ] ; then
netroot=${netroot:-iscsi:}
modprobe -q iscsi_boot_sysfs 2>/dev/null
modprobe -q iscsi_ibft
- initqueue --onetime --timeout "/sbin/iscsiroot dummy '$netroot' '$NEWROOT'"
fi
# If it's not iscsi we don't continue
@@ -88,7 +87,7 @@ fi
if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; then
if ! getargbool 1 rd.neednet >/dev/null || ! getarg "ip="; then
- initqueue --onetime --settled "/sbin/iscsiroot dummy '$netroot' '$NEWROOT'"
+ initqueue --settled /sbin/iscsiroot dummy "$netroot" "$NEWROOT"
fi
fi

View File

@ -1,33 +0,0 @@
Index: dracut-037/mkinitrd-suse.sh
===================================================================
--- dracut-037.orig/mkinitrd-suse.sh
+++ dracut-037/mkinitrd-suse.sh
@@ -297,7 +297,11 @@ targets=( $targets )
[[ $kernels ]] && kernels=( $kernels )
[[ $logfile ]] && dracut_args="${dracut_args} --logfile $logfile"
-[[ $host_only == 1 ]] && dracut_args="${dracut_args} --hostonly"
+if [[ $host_only == 1 ]];then
+ dracut_args="${dracut_args} --hostonly --hostonly-cmdline"
+else
+ dracut_args="${dracut_args} --no-hostonly --no-hostonly-cmdline"
+fi
[[ $force == 1 ]] && dracut_args="${dracut_args} --force"
[[ $dracut_cmdline ]] && dracut_args="${dracut_args} --kernel-cmdline ${dracut_cmdline}"
[ -z "$(type -p update-bootloader)" ] && skip_update_bootloader=1
Index: dracut-037/mkinitrd-suse.8
===================================================================
--- dracut-037.orig/mkinitrd-suse.8
+++ dracut-037/mkinitrd-suse.8
@@ -139,7 +139,10 @@ script after the initrd(s) have been cre
.PP
\fB\-A\fR
.RS 4
-Create a so called "monster initrd" which includes all available features and modules\&.
+Create a so called "monster initrd" which includes all available features and
+modules. This calls dracut with \-\-no\-hostonly and \-\-no-hostonly\-cmdline
+parameters internally (instead of \-\-hostonly, \-\-hostonly\-cmdline by
+default).\&.
.RE
.PP
\fB\-v, \-\-verbose\fR