Accepting request 239989 from Base:System
- Print stored dracut commandline during initramfs build * Add: 0101-Print-stored-dracut-commandline-during-initramfs-bui.patch - Align dev_unit_name() with systemd's function * Add: 0102-Align-dev_unit_name-with-systemd-s-function.patch - Fixup missing separators in rootfs-block cmdline * Add: 0103-Fixup-missing-separators-in-rootfs-block-cmdline.patch - Generate fallback mount unit for root filesystem (bnc#855258) * Add: 0104-Generate-fallback-mount-unit-for-root-filesystem.patch - 95iscsi: parse output from iscsiadm correctly (bnc#886199) * Add: 0105-95iscsi-parse-output-from-iscsiadm-correctly.patch - Add btrfs rescue utilities: * Add: 0100-Add-btrfs-rescue-utilities.patch - 90btrfs: Install rescue utilities to initrd * Add: 0100-btrfs-add-initrd-rescue-utilities.patch - 40network: create /var/lib/wicked in ifup.sh (bnc#885141) * Add: 0089-40network-create-var-lib-wicked-in-ifup.sh.patch - dracut: caps: Remove whole caps module * Add: 0090-dracut-caps-Remove-whole-caps-module.patch - dracut: biosdevname: Only install if present * Add: 0091-dracut-biosdevname-In-SUSE-biosdevname-package-is-in.patch - dracut: nbd: Only complain of missing binary in hostonly mode if rootfs is on nbd * Add: 0092-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch - 95iscsi: generate commandline for software iscsi (bnc#880108) * Add: 0093-95iscsi-generate-commandline-for-software-iscsi.patch - Implement shortcut 'ip=<ifname>:static' for static configuration * Add: 0094-Implement-shortcut-ip-ifname-static-for-static-confi.patch - 95iscsi: use static configuration for software iscsi (bnc#884768) OBS-URL: https://build.opensuse.org/request/show/239989 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dracut?expand=0&rev=50
This commit is contained in:
commit
842a0537e4
186
0088-91zipl-Add-new-module-to-update-s390x-configuration.patch
Normal file
186
0088-91zipl-Add-new-module-to-update-s390x-configuration.patch
Normal file
@ -0,0 +1,186 @@
|
||||
From 78329f4df2afc9fae11ea30dd11839d956d4af08 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Fri, 27 Jun 2014 11:43:28 +0200
|
||||
Subject: 91zipl: Add new module to update s390x configuration
|
||||
|
||||
Add new module to update the dracut commandline values
|
||||
during booting with the values found in the file
|
||||
dracut-cmdline.conf on the device specified by
|
||||
rd.zipl.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
dracut.cmdline.7.asc | 14 ++++++++++
|
||||
modules.d/91zipl/install_zipl_cmdline.sh | 33 +++++++++++++++++++++++
|
||||
modules.d/91zipl/module-setup.sh | 45 ++++++++++++++++++++++++++++++++
|
||||
modules.d/91zipl/parse-zipl.sh | 41 +++++++++++++++++++++++++++++
|
||||
4 files changed, 133 insertions(+)
|
||||
create mode 100644 modules.d/91zipl/install_zipl_cmdline.sh
|
||||
create mode 100644 modules.d/91zipl/module-setup.sh
|
||||
create mode 100644 modules.d/91zipl/parse-zipl.sh
|
||||
|
||||
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
||||
index 0f1ef82..c7508ca 100644
|
||||
--- a/dracut.cmdline.7.asc
|
||||
+++ b/dracut.cmdline.7.asc
|
||||
@@ -726,6 +726,20 @@ CIO_IGNORE
|
||||
rd.cio_accept=0.0.0180,0.0.0800,0.0.0801,0.0.0802
|
||||
--
|
||||
|
||||
+ZIPL
|
||||
+~~~~
|
||||
+**rd.zipl=**__<path to blockdevice>__::
|
||||
+ Update the dracut commandline with the values found in the
|
||||
+ _dracut-cmdline.conf_ file on the given device.
|
||||
+ The values are merged into the existing commandline values
|
||||
+ and the udev events are regenerated.
|
||||
++
|
||||
+[listing]
|
||||
+.Example
|
||||
+--
|
||||
+rd.zipl=UUID=0fb28157-99e3-4395-adef-da3f7d44835a
|
||||
+--
|
||||
+
|
||||
Plymouth Boot Splash
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
**plymouth.enable=0**::
|
||||
diff --git a/modules.d/91zipl/install_zipl_cmdline.sh b/modules.d/91zipl/install_zipl_cmdline.sh
|
||||
new file mode 100644
|
||||
index 0000000..8b454b8
|
||||
--- /dev/null
|
||||
+++ b/modules.d/91zipl/install_zipl_cmdline.sh
|
||||
@@ -0,0 +1,33 @@
|
||||
+#!/bin/bash
|
||||
+
|
||||
+DEV=$1
|
||||
+MNT=/boot/zipl
|
||||
+
|
||||
+if [ -z "$DEV" ] ; then
|
||||
+ echo "No IPL device given"
|
||||
+ > /tmp/install.zipl.cmdline-done
|
||||
+ exit 1
|
||||
+fi
|
||||
+
|
||||
+[ -d ${MNT} ] || mkdir -p ${MNT}
|
||||
+
|
||||
+mount -o ro ${DEV} ${MNT}
|
||||
+if [ "$?" != "0" ] ; then
|
||||
+ echo "Failed to mount ${MNT}"
|
||||
+ > /tmp/install.zipl.cmdline-done
|
||||
+ exit 1
|
||||
+fi
|
||||
+
|
||||
+if [ -f ${MNT}/dracut-cmdline.conf ] ; then
|
||||
+ cp ${MNT}/dracut-cmdline.conf /etc/cmdline.d/99zipl.conf
|
||||
+fi
|
||||
+
|
||||
+umount ${MNT}
|
||||
+
|
||||
+if [ -f /etc/cmdline.d/99zipl.conf ] ; then
|
||||
+ systemctl restart dracut-cmdline.service
|
||||
+ systemctl restart systemd-udev-trigger.service
|
||||
+fi
|
||||
+> /tmp/install.zipl.cmdline-done
|
||||
+
|
||||
+exit 0
|
||||
diff --git a/modules.d/91zipl/module-setup.sh b/modules.d/91zipl/module-setup.sh
|
||||
new file mode 100644
|
||||
index 0000000..a8d95c5
|
||||
--- /dev/null
|
||||
+++ b/modules.d/91zipl/module-setup.sh
|
||||
@@ -0,0 +1,45 @@
|
||||
+#!/bin/bash
|
||||
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
+# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
+
|
||||
+# called by dracut
|
||||
+check() {
|
||||
+ local _arch=$(uname -m)
|
||||
+ [ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+# called by dracut
|
||||
+depends() {
|
||||
+ echo grub2
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+# called by dracut
|
||||
+installkernel() {
|
||||
+ instmods ext2
|
||||
+}
|
||||
+
|
||||
+# called by dracut
|
||||
+cmdline() {
|
||||
+ local _boot_zipl
|
||||
+
|
||||
+ _boot_zipl=$(sed -n 's/\(.*\)\w*\/boot\/zipl.*/\1/p' /etc/fstab)
|
||||
+ if [ -n "$_boot_zipl" ] ; then
|
||||
+ echo "rd.zipl=${_boot_zipl}"
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+# called by dracut
|
||||
+install() {
|
||||
+ inst_multiple mount umount
|
||||
+
|
||||
+ inst_hook cmdline 91 "$moddir/parse-zipl.sh"
|
||||
+ inst "${moddir}/install_zipl_cmdline.sh" /sbin/install_zipl_cmdline.sh
|
||||
+ if [[ $hostonly_cmdline == "yes" ]] ; then
|
||||
+ local _zipl=$(cmdline)
|
||||
+
|
||||
+ [[ $_zipl ]] && printf "%s\n" "$_zipl"
|
||||
+ fi
|
||||
+ dracut_need_initqueue
|
||||
+}
|
||||
diff --git a/modules.d/91zipl/parse-zipl.sh b/modules.d/91zipl/parse-zipl.sh
|
||||
new file mode 100644
|
||||
index 0000000..f8c2ca4
|
||||
--- /dev/null
|
||||
+++ b/modules.d/91zipl/parse-zipl.sh
|
||||
@@ -0,0 +1,41 @@
|
||||
+#!/bin/sh
|
||||
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
+# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
+
|
||||
+zipl_arg=$(getarg rd.zipl)
|
||||
+
|
||||
+if [ -n "$zipl_arg" ] ; then
|
||||
+ case "$zipl_arg" in
|
||||
+ LABEL=*) \
|
||||
+ zipl_env="ENV{ID_FS_LABEL}"
|
||||
+ zipl_val=${zipl_arg#LABEL=}
|
||||
+ zipl_arg="/dev/disk/by-label/${zipl_val}"
|
||||
+ ;;
|
||||
+ UUID=*) \
|
||||
+ zipl_env="ENV{ID_FS_UUID}"
|
||||
+ zipl_val=${zipl_arg#UUID=}
|
||||
+ zipl_arg="/dev/disk/by-uuid/${zipl_val}"
|
||||
+ ;;
|
||||
+ /dev/mapper/*) \
|
||||
+ zipl_env="ENV{DM_NAME}"
|
||||
+ zipl_val=${zipl_arg#/dev/mapper/}
|
||||
+ ;;
|
||||
+ /dev/disk/by-*) \
|
||||
+ zipl_env="SYMLINK"
|
||||
+ zipl_val=${zipl_arg#/dev/}
|
||||
+ ;;
|
||||
+ /dev/*) \
|
||||
+ zipl_env="KERNEL"
|
||||
+ zipl_val=${zipl_arg}
|
||||
+ ;;
|
||||
+ esac
|
||||
+ if [ "$zipl_env" ] ; then
|
||||
+ {
|
||||
+ printf 'ACTION=="add|change", SUBSYSTEM=="block", %s=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/install_zipl_cmdline.sh %s"\n' \
|
||||
+ ${zipl_env} ${zipl_val} ${zipl_arg}
|
||||
+ echo "[ -f /tmp/install.zipl.cmdline-done ]" >$hookdir/initqueue/finished/wait-zipl-conf.sh
|
||||
+ } >> /etc/udev/rules.d/99zipl-conf.rules
|
||||
+ cat /etc/udev/rules.d/99zipl-conf.rules
|
||||
+ fi
|
||||
+ wait_for_dev -n "$zipl_arg"
|
||||
+fi
|
||||
--
|
||||
1.8.4.5
|
||||
|
31
0089-40network-create-var-lib-wicked-in-ifup.sh.patch
Normal file
31
0089-40network-create-var-lib-wicked-in-ifup.sh.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From af384e51a1dff36b5554b05d2b940d0089c84000 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Tue, 1 Jul 2014 08:15:00 +0200
|
||||
Subject: 40network: create /var/lib/wicked in ifup.sh
|
||||
|
||||
wicked requires the /var/lib/wicked directory to be present.
|
||||
This is just a work-around; it should be fixed in wicked itself.
|
||||
|
||||
References: bnc#885141
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
modules.d/40network/ifup.sh | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||
index 494017b..6f279a4 100755
|
||||
--- a/modules.d/40network/ifup.sh
|
||||
+++ b/modules.d/40network/ifup.sh
|
||||
@@ -20,6 +20,8 @@ netif=$1
|
||||
use_bridge='false'
|
||||
use_vlan='false'
|
||||
|
||||
+[ -d /var/lib/wicked ] || mkdir -p /var/lib/wicked
|
||||
+
|
||||
# enslave this interface to bond?
|
||||
for i in /tmp/bond.*.info; do
|
||||
[ -e "$i" ] || continue
|
||||
--
|
||||
1.8.4.5
|
||||
|
135
0090-dracut-caps-Remove-whole-caps-module.patch
Normal file
135
0090-dracut-caps-Remove-whole-caps-module.patch
Normal file
@ -0,0 +1,135 @@
|
||||
From dccbc0fc7f1b814ad8a03f380a31bed2c9d86a9b Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.de>
|
||||
Date: Tue, 1 Jul 2014 13:53:43 +0200
|
||||
Subject: dracut: caps: Remove whole caps module
|
||||
|
||||
To get installed it must not have systemd included in initramfs which is
|
||||
an unsupported scenario for SUSE.
|
||||
This gets also rid of the error in its check function.
|
||||
|
||||
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
||||
---
|
||||
modules.d/02caps/README | 33 ---------------------------------
|
||||
modules.d/02caps/caps.sh | 36 ------------------------------------
|
||||
modules.d/02caps/module-setup.sh | 26 --------------------------
|
||||
3 files changed, 95 deletions(-)
|
||||
delete mode 100644 modules.d/02caps/README
|
||||
delete mode 100755 modules.d/02caps/caps.sh
|
||||
delete mode 100755 modules.d/02caps/module-setup.sh
|
||||
|
||||
diff --git a/modules.d/02caps/README b/modules.d/02caps/README
|
||||
deleted file mode 100644
|
||||
index 34e0f02..0000000
|
||||
--- a/modules.d/02caps/README
|
||||
+++ /dev/null
|
||||
@@ -1,33 +0,0 @@
|
||||
-This adds the following parameters:
|
||||
-rd.caps=1
|
||||
- turn the caps module on/off
|
||||
-rd.caps.initdrop=cap_sys_module,cap_sys_rawio
|
||||
- drop the specified comma separated capabilities
|
||||
-rd.caps.disablemodules=1
|
||||
- turn off module loading
|
||||
-rd.caps.disablekexec=1
|
||||
- turn off the kexec functionality
|
||||
-
|
||||
-If module loading is turned off, all modules have to be loaded in the
|
||||
-initramfs, which are used later on. This can be done with
|
||||
-"rd.driver.pre="
|
||||
-rd.driver.pre=autofs4,sunrpc,ipt_REJECT,nf_conntrack_ipv4,....
|
||||
-
|
||||
-Because the kernel command line would get huge with all those drivers, I
|
||||
-recommend to make use of $initramfs/etc/cmdline.
|
||||
-
|
||||
-So, all rd.caps.* and rd.driver.pre arguments are in caps.conf can be
|
||||
-copied to $initramfs/etc/cmdline with "-i caps.conf /etc/cmdline".
|
||||
-
|
||||
-Also all modules have to be loaded in the initramfs via "--add-drivers".
|
||||
-
|
||||
-The resulting initramfs creation would look like this:
|
||||
-
|
||||
- --add-drivers "autofs4 sunrpc ipt_REJECT nf_conntrack_ipv4 \
|
||||
- nf_defrag_ipv4 iptable_filter ip_tables
|
||||
- ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack
|
||||
- ip6table_filter ip6_tables dm_mirror dm_region_hash dm_log uinput ppdev
|
||||
- parport_pc parport ipv6 sg 8139too 8139cp mii i2c_piix4 i2c_core ext3
|
||||
- jbd mbcache sd_mod crc_t10dif sr_mod cdrom ata_generic pata_acpi ata_piix
|
||||
- dm_mod" \
|
||||
- /boot/initramfs-caps.img
|
||||
diff --git a/modules.d/02caps/caps.sh b/modules.d/02caps/caps.sh
|
||||
deleted file mode 100755
|
||||
index 6a8fe5d..0000000
|
||||
--- a/modules.d/02caps/caps.sh
|
||||
+++ /dev/null
|
||||
@@ -1,36 +0,0 @@
|
||||
-#!/bin/bash
|
||||
-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
-# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
-
|
||||
-capsmode=$(getarg rd.caps)
|
||||
-
|
||||
-if [ "$capsmode" = "1" ]; then
|
||||
- CAPS_INIT_DROP=$(getarg rd.caps.initdrop=)
|
||||
- CAPS_USERMODEHELPER_BSET=$(capsh --drop="$CAPS_INIT_DROP" -- -c 'while read a b ; do [ "$a" = "CapBnd:" ] && echo $((0x${b:$((${#b}-8)):8})) $((0x${b:$((${#b}-16)):8})) && break; done < /proc/self/status')
|
||||
- CAPS_MODULES_DISABLED=$(getarg rd.caps.disablemodules=)
|
||||
- CAPS_KEXEC_DISABLED=$(getarg rd.caps.disablekexec=)
|
||||
-
|
||||
- info "Loading CAPS_MODULES $CAPS_MODULES"
|
||||
- for i in $CAPS_MODULES;do modprobe $i 2>&1 >/dev/null | vinfo; done
|
||||
-
|
||||
- if [ "$CAPS_MODULES_DISABLED" = "1" -a -e /proc/sys/kernel/modules_disabled ]; then
|
||||
- info "Disabling module loading."
|
||||
- echo $CAPS_MODULES_DISABLED > /proc/sys/kernel/modules_disabled
|
||||
- fi
|
||||
-
|
||||
- if [ "$CAPS_KEXEC_DISABLED" = "1" -a -e /proc/sys/kernel/kexec_disabled ]; then
|
||||
- info "Disabling kexec."
|
||||
- echo $CAPS_KEXEC_DISABLED > /proc/sys/kernel/kexec_disabled
|
||||
- fi
|
||||
-
|
||||
- info "CAPS_USERMODEHELPER_BSET=$CAPS_USERMODEHELPER_BSET"
|
||||
- if [ -e /proc/sys/kernel/usermodehelper/bset ]; then
|
||||
- info "Setting usermode helper bounding set."
|
||||
- echo $CAPS_USERMODEHELPER_BSET > /proc/sys/kernel/usermodehelper/bset
|
||||
- echo $CAPS_USERMODEHELPER_BSET > /proc/sys/kernel/usermodehelper/inheritable
|
||||
- fi
|
||||
-
|
||||
- echo "CAPS_INIT_DROP=\"$CAPS_INIT_DROP\"" > /etc/capsdrop
|
||||
- info "Will drop capabilities $CAPS_INIT_DROP from init."
|
||||
-fi
|
||||
-
|
||||
diff --git a/modules.d/02caps/module-setup.sh b/modules.d/02caps/module-setup.sh
|
||||
deleted file mode 100755
|
||||
index 46e35a0..0000000
|
||||
--- a/modules.d/02caps/module-setup.sh
|
||||
+++ /dev/null
|
||||
@@ -1,26 +0,0 @@
|
||||
-#!/bin/bash
|
||||
-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
-# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
-
|
||||
-# called by dracut
|
||||
-check() {
|
||||
- require_binaries capsh
|
||||
-}
|
||||
-
|
||||
-# called by dracut
|
||||
-depends() {
|
||||
- return 0
|
||||
-}
|
||||
-
|
||||
-# called by dracut
|
||||
-install() {
|
||||
- if ! dracut_module_included "systemd"; then
|
||||
- inst_hook pre-pivot 00 "$moddir/caps.sh"
|
||||
- inst $(type -P capsh 2>/dev/null) /usr/sbin/capsh
|
||||
- # capsh wants bash and we need bash also
|
||||
- inst /bin/bash
|
||||
- else
|
||||
- dwarning "caps: does not work with systemd in the initramfs"
|
||||
- fi
|
||||
-}
|
||||
-
|
||||
--
|
||||
1.8.4.5
|
||||
|
@ -0,0 +1,31 @@
|
||||
From edfae68d9a9af81cd1ff230b72b9c320d4c58e82 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.de>
|
||||
Date: Tue, 1 Jul 2014 13:53:57 +0200
|
||||
Subject: dracut: biosdevname: In SUSE biosdevname package is installed on
|
||||
relevant platforms
|
||||
|
||||
all others should not add biosdevname on purpose. Do not complain about it.
|
||||
|
||||
|
||||
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
||||
---
|
||||
modules.d/97biosdevname/module-setup.sh | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/97biosdevname/module-setup.sh b/modules.d/97biosdevname/module-setup.sh
|
||||
index e285a7f..41ee39f 100755
|
||||
--- a/modules.d/97biosdevname/module-setup.sh
|
||||
+++ b/modules.d/97biosdevname/module-setup.sh
|
||||
@@ -5,7 +5,8 @@
|
||||
# called by dracut
|
||||
check() {
|
||||
[[ "$mount_needs" ]] && return 1
|
||||
- require_binaries biosdevname || return 1
|
||||
+ # Include biosdevname if the binary is installed
|
||||
+ type -P biosdevname >/dev/null || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
--
|
||||
1.8.4.5
|
||||
|
@ -0,0 +1,40 @@
|
||||
From e4e24c1e841f91987561c1970148872214bbaaf8 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.de>
|
||||
Date: Tue, 1 Jul 2014 13:54:04 +0200
|
||||
Subject: dracut: nbd: Only complain of missing binary in hostonly mode if
|
||||
rootfs is on nbd
|
||||
|
||||
In not hostonly mode, require_binaries will still complain.
|
||||
If in hostonly mode and the module is explicitly added via -a nbd, then
|
||||
install() section will still complain later:
|
||||
dracut-install: ERROR: installing 'nbd-client'
|
||||
|
||||
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
||||
---
|
||||
modules.d/95nbd/module-setup.sh | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh
|
||||
index e62f290..dc5102e 100755
|
||||
--- a/modules.d/95nbd/module-setup.sh
|
||||
+++ b/modules.d/95nbd/module-setup.sh
|
||||
@@ -5,8 +5,6 @@
|
||||
# called by dracut
|
||||
check() {
|
||||
local _rootdev
|
||||
- # If our prerequisites are not met, fail.
|
||||
- require_binaries nbd-client || return 1
|
||||
|
||||
# if an nbd device is not somewhere in the chain of devices root is
|
||||
# mounted on, fail the hostonly check.
|
||||
@@ -17,6 +15,7 @@ check() {
|
||||
[[ -b /dev/block/$_rootdev ]] || return 1
|
||||
check_block_and_slaves is_nbd "$_rootdev" || return 255
|
||||
}
|
||||
+ require_binaries nbd-client || return 1
|
||||
|
||||
return 0
|
||||
}
|
||||
--
|
||||
1.8.4.5
|
||||
|
123
0093-95iscsi-generate-commandline-for-software-iscsi.patch
Normal file
123
0093-95iscsi-generate-commandline-for-software-iscsi.patch
Normal file
@ -0,0 +1,123 @@
|
||||
From a7bac2f8271ff195fa0a5c021f40b7eeb48b3681 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed, 2 Jul 2014 10:36:50 +0200
|
||||
Subject: 95iscsi: generate commandline for software iscsi
|
||||
|
||||
When installing on an software iscsi root we need to generate
|
||||
the correct commandline, otherwise the system cannot boot.
|
||||
|
||||
References: bnc#880108
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
modules.d/95iscsi/module-setup.sh | 80 +++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 77 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
||||
index cfa6f39..e9bed24 100755
|
||||
--- a/modules.d/95iscsi/module-setup.sh
|
||||
+++ b/modules.d/95iscsi/module-setup.sh
|
||||
@@ -43,6 +43,75 @@ install_ibft() {
|
||||
done
|
||||
}
|
||||
|
||||
+install_iscsiroot() {
|
||||
+ local devpath=$1
|
||||
+ local scsi_path iscsi_lun session c d conn
|
||||
+ local iscsi_session iscsi_address iscsi_port iscsi_targetname iscsi_tpgt
|
||||
+
|
||||
+ scsi_path=${devpath%%/block*}
|
||||
+ [ "$scsi_path" = "$devpath" ] && return 1
|
||||
+ iscsi_lun=${scsi_path##*:}
|
||||
+ [ "$iscsi_lun" = "$scsi_path" ] && return 1
|
||||
+ session=${devpath%%/target*}
|
||||
+ [ "$session" = "$devpath" ] && return 1
|
||||
+ iscsi_session=${session##*/}
|
||||
+ [ "$iscsi_session" = "$session" ] && return 1
|
||||
+
|
||||
+ for d in ${session}/* ; do
|
||||
+ case $d in
|
||||
+ *connection*)
|
||||
+ c=${d##*/}
|
||||
+ conn=${d}/iscsi_connection/${c}
|
||||
+ if [ -d ${conn} ] ; then
|
||||
+ iscsi_address=$(cat ${conn}/persistent_address)
|
||||
+ iscsi_port=$(cat ${conn}/persistent_port)
|
||||
+ fi
|
||||
+ ;;
|
||||
+ *session)
|
||||
+ if [ -d ${d}/${iscsi_session} ] ; then
|
||||
+ iscsi_initiator=$(cat ${d}/${iscsi_session}/initiatorname)
|
||||
+ iscsi_targetname=$(cat ${d}/${iscsi_session}/targetname)
|
||||
+ fi
|
||||
+ ;;
|
||||
+ esac
|
||||
+ done
|
||||
+
|
||||
+ local_address=$(ip -o route get to $iscsi_address | cut -f 1 -d ' ')
|
||||
+ ifname=$(ip addr show to $local_address | head -1 | sed -n 's/[0-9]*: \(.*\): .*/\1/p')
|
||||
+ if [ -d /sys/class/net/$ifname/address ] ; then
|
||||
+ ifmac=$(cat /sys/class/net/$ifname/address)
|
||||
+ printf 'ifname=%s:%s ' ${ifname} ${ifmac}
|
||||
+ fi
|
||||
+
|
||||
+ if [ -n "$iscsi_address" -a -n "$iscsi_targetname" ] ; then
|
||||
+ if [ -n "$iscsi_port" -a "$iscsi_port" -eq 3260 ] ; then
|
||||
+ iscsi_port=
|
||||
+ fi
|
||||
+ if [ -n "$iscsi_lun" -a "$iscsi_lun" -eq 0 ] ; then
|
||||
+ iscsi_lun=
|
||||
+ fi
|
||||
+ echo "rd.iscsi.initiator=${iscsi_initiator} netroot=iscsi:${iscsi_address}::${iscsi_port}:${iscsi_lun}:${iscsi_targetname}"
|
||||
+ fi
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
+
|
||||
+install_softiscsi() {
|
||||
+ [ -d /sys/firmware/ibft ] && return 0
|
||||
+
|
||||
+ is_softiscsi() {
|
||||
+ local _dev=$1
|
||||
+ local iscsi_dev
|
||||
+
|
||||
+ [[ -L "/sys/dev/block/$_dev" ]] || return
|
||||
+ iscsi_dev=$(cd -P /sys/dev/block/$_dev; echo $PWD)
|
||||
+ install_iscsiroot $iscsi_dev
|
||||
+ }
|
||||
+
|
||||
+ for_each_host_dev_and_slaves is_softiscsi || return 255
|
||||
+ return 0
|
||||
+}
|
||||
+
|
||||
# called by dracut
|
||||
check() {
|
||||
local _rootdev
|
||||
@@ -121,7 +190,12 @@ installkernel() {
|
||||
|
||||
# called by dracut
|
||||
cmdline() {
|
||||
- install_ibft
|
||||
+ local _iscsiconf=$(install_ibft)
|
||||
+ if [ "$_iscsiconf" ] ; then
|
||||
+ echo ${_iscsiconf}
|
||||
+ else
|
||||
+ install_softiscsi
|
||||
+ fi
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
@@ -132,8 +206,8 @@ install() {
|
||||
|
||||
# Detect iBFT and perform mandatory steps
|
||||
if [[ $hostonly_cmdline == "yes" ]] ; then
|
||||
- local _ibftconf=$(install_ibft)
|
||||
- [[ $_ibftconf ]] && printf "%s\n" "$_ibftconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf"
|
||||
+ local _iscsiconf=$(cmdline)
|
||||
+ [[ $_iscsiconf ]] && printf "%s\n" "$_iscsiconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf"
|
||||
fi
|
||||
|
||||
inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
|
||||
--
|
||||
1.8.4.5
|
||||
|
@ -0,0 +1,86 @@
|
||||
From a345cf3c3d7c15cfca5735c531f825062235c135 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed, 2 Jul 2014 11:20:22 +0200
|
||||
Subject: Implement shortcut 'ip=<ifname>:static' for static configuration
|
||||
|
||||
To simplify static configurate we should be pulling in the
|
||||
existing 'ifcfg' files when running in hostonly mode.
|
||||
With that we can implement the shortcut 'ip=<ifname>:static'
|
||||
to use the existing configuration from the ifcfg file.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
modules.d/40network/ifup.sh | 14 +++++++++++++-
|
||||
modules.d/40network/module-setup.sh | 4 ++++
|
||||
modules.d/40network/parse-ip-opts.sh | 8 +++++++-
|
||||
3 files changed, 24 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
|
||||
index 6f279a4..f3e07a6 100755
|
||||
--- a/modules.d/40network/ifup.sh
|
||||
+++ b/modules.d/40network/ifup.sh
|
||||
@@ -399,6 +399,18 @@ for p in $(getargs ip=); do
|
||||
[ "$use_bridge" != 'true' ] && \
|
||||
[ "$use_vlan" != 'true' ] && continue
|
||||
|
||||
+ if [ "$autoconf" = "static" ] &&
|
||||
+ [ -e /etc/sysconfig/network/ifcfg-${netif} ] ; then
|
||||
+ # Pull in existing static configuration
|
||||
+ . /etc/sysconfig/network/ifcfg-${netif}
|
||||
+ ip=${IPADDR}
|
||||
+ mask=${PREFIXLEN}
|
||||
+ mtu=${MTU}
|
||||
+ server=${REMOTE_IPADDR}
|
||||
+ gw=${GATEWAY}
|
||||
+ autoconf=${BOOTPROTO}
|
||||
+ fi
|
||||
+
|
||||
# setup nameserver
|
||||
namesrv="$dns1 $dns2 $(getargs nameserver)"
|
||||
for s in $namesrv; do
|
||||
@@ -411,7 +423,7 @@ for p in $(getargs ip=); do
|
||||
done > /tmp/net.$netif.override
|
||||
|
||||
case $autoconf in
|
||||
- dhcp|on|any)
|
||||
+ dhcp4|dhcp|on|any)
|
||||
do_dhcp -4 ;;
|
||||
dhcp6)
|
||||
load_ipv6
|
||||
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
|
||||
index 7e7f087..690ff08 100755
|
||||
--- a/modules.d/40network/module-setup.sh
|
||||
+++ b/modules.d/40network/module-setup.sh
|
||||
@@ -101,6 +101,10 @@ install() {
|
||||
|
||||
_arch=$(uname -m)
|
||||
|
||||
+ [[ $hostonly ]] && {
|
||||
+ inst_multiple /etc/sysconfig/network/ifcfg-*
|
||||
+ }
|
||||
+
|
||||
inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
|
||||
{"tls/$_arch/",tls/,"$_arch/",}"libnss_mdns4_minimal.so.*"
|
||||
|
||||
diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
|
||||
index 7e73574..e48b0f3 100755
|
||||
--- a/modules.d/40network/parse-ip-opts.sh
|
||||
+++ b/modules.d/40network/parse-ip-opts.sh
|
||||
@@ -64,7 +64,13 @@ for p in $(getargs ip=); do
|
||||
# Error checking for autoconf in combination with other values
|
||||
case $autoconf in
|
||||
error) die "Error parsing option 'ip=$p'";;
|
||||
- bootp|rarp|both) die "Sorry, ip=$autoconf is currenty unsupported";;
|
||||
+ bootp|rarp|both) die "Sorry, ip=$autoconf is currently unsupported";;
|
||||
+ static)
|
||||
+ if [ ! -e /etc/sysconfig/network/ifcfg-${dev} ] ; then
|
||||
+ warn "No ifcfg configuration present for interface $dev, skipping"
|
||||
+ continue
|
||||
+ fi
|
||||
+ ;;
|
||||
none|off)
|
||||
[ -z "$ip" ] && \
|
||||
die "For argument 'ip=$p'\nValue '$autoconf' without static configuration does not make sense"
|
||||
--
|
||||
1.8.4.5
|
||||
|
@ -0,0 +1,37 @@
|
||||
From d62ee7be6309c4f5e3f8b0d3c6e825da03095ed7 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed, 2 Jul 2014 11:56:29 +0200
|
||||
Subject: 95iscsi: use static configuration for software iscsi
|
||||
|
||||
When using software iscsi we should be using the existing
|
||||
configuration from the system for the time being.
|
||||
|
||||
References: bnc#884768
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
modules.d/95iscsi/module-setup.sh | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
||||
index e9bed24..81ffb18 100755
|
||||
--- a/modules.d/95iscsi/module-setup.sh
|
||||
+++ b/modules.d/95iscsi/module-setup.sh
|
||||
@@ -76,9 +76,11 @@ install_iscsiroot() {
|
||||
esac
|
||||
done
|
||||
|
||||
- local_address=$(ip -o route get to $iscsi_address | cut -f 1 -d ' ')
|
||||
- ifname=$(ip addr show to $local_address | head -1 | sed -n 's/[0-9]*: \(.*\): .*/\1/p')
|
||||
- if [ -d /sys/class/net/$ifname/address ] ; then
|
||||
+ local_address=$(ip -o route get to $iscsi_address | sed -n 's/.*src \([0-9a-f.:]*\).*/\1/p')
|
||||
+ ifname=$(ip -o route get to $iscsi_address | sed -n 's/.*dev \([^ ]*\).*/\1/p')
|
||||
+ printf 'ip=%s:static ' ${ifname}
|
||||
+
|
||||
+ if [ -e /sys/class/net/$ifname/address ] ; then
|
||||
ifmac=$(cat /sys/class/net/$ifname/address)
|
||||
printf 'ifname=%s:%s ' ${ifname} ${ifmac}
|
||||
fi
|
||||
--
|
||||
1.8.4.5
|
||||
|
@ -0,0 +1,45 @@
|
||||
From 3dc48f4ee656529936a6021fb0f0885ece2dc26e Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.de>
|
||||
Date: Thu, 3 Jul 2014 15:16:42 +0200
|
||||
Subject: dracut: Fix error: local: can only be used in a function
|
||||
|
||||
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
||||
---
|
||||
modules.d/98systemd/dracut-pre-udev.sh | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/98systemd/dracut-pre-udev.sh b/modules.d/98systemd/dracut-pre-udev.sh
|
||||
index 77977d2..68021aa 100755
|
||||
--- a/modules.d/98systemd/dracut-pre-udev.sh
|
||||
+++ b/modules.d/98systemd/dracut-pre-udev.sh
|
||||
@@ -26,10 +26,12 @@ fi
|
||||
|
||||
for i in $(getargs rd.driver.pre -d rdloaddriver=); do
|
||||
(
|
||||
- local IFS=,
|
||||
+ _IFS="$IFS"
|
||||
+ IFS=,
|
||||
for p in $i; do
|
||||
modprobe $p 2>&1 | vinfo
|
||||
done
|
||||
+ IFS="$_IFS"
|
||||
)
|
||||
done
|
||||
|
||||
@@ -38,10 +40,12 @@ done
|
||||
|
||||
for i in $(getargs rd.driver.blacklist -d rdblacklist=); do
|
||||
(
|
||||
- local IFS=,
|
||||
+ _IFS="$IFS"
|
||||
+ IFS=,
|
||||
for p in $i; do
|
||||
echo "blacklist $p" >> $_modprobe_d/initramfsblacklist.conf
|
||||
done
|
||||
+ IFS="$_IFS"
|
||||
)
|
||||
done
|
||||
|
||||
--
|
||||
1.8.4.5
|
||||
|
106
0097-Implement-rd.timeout-to-modify-the-device-timeout.patch
Normal file
106
0097-Implement-rd.timeout-to-modify-the-device-timeout.patch
Normal file
@ -0,0 +1,106 @@
|
||||
From 59be707744473b82f2ae6d14a159fbf94834d4b6 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu, 3 Jul 2014 11:21:29 +0200
|
||||
Subject: Implement 'rd.timeout' to modify the device timeout
|
||||
|
||||
When generating units for devices the administrator might
|
||||
want to use a different timeout than the default.
|
||||
So implement a new parameter 'rd.timeout' for this.
|
||||
|
||||
References: bnc#878770
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
dracut.cmdline.7.asc | 7 ++++++-
|
||||
modules.d/98systemd/rootfs-generator.sh | 7 +++++--
|
||||
modules.d/99base/dracut-lib.sh | 6 +++++-
|
||||
3 files changed, 16 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
||||
index 84fe794..2dc795b 100644
|
||||
--- a/dracut.cmdline.7.asc
|
||||
+++ b/dracut.cmdline.7.asc
|
||||
@@ -117,11 +117,16 @@ Misc
|
||||
have been loaded. This parameter can be specified multiple times.
|
||||
|
||||
**rd.retry=**__<seconds>__::
|
||||
- specify how long dracut should wait for devices to appear.
|
||||
+ specify how long dracut should retry the initqueue to configure devices.
|
||||
The default is 30 seconds. After 2/3 of the time, degraded raids are force
|
||||
started. If you have hardware, which takes a very long time to announce its
|
||||
drives, you might want to extend this value.
|
||||
|
||||
+**rd.timeout=**__<seconds>__::
|
||||
+ specify how long dracut should wait for devices to appear. The
|
||||
+ default is '0', which means 'forever'. Note that this timeout
|
||||
+ should be longer than rd.retry to allow for proper configuration.
|
||||
+
|
||||
**rd.noverifyssl**::
|
||||
accept self-signed certificates for ssl downloads.
|
||||
|
||||
diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh
|
||||
index 2c09895..a2b71ff 100755
|
||||
--- a/modules.d/98systemd/rootfs-generator.sh
|
||||
+++ b/modules.d/98systemd/rootfs-generator.sh
|
||||
@@ -7,8 +7,11 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||
generator_wait_for_dev()
|
||||
{
|
||||
local _name
|
||||
+ local _timeout
|
||||
|
||||
_name="$(str_replace "$1" '/' '\x2f')"
|
||||
+ _timeout=$(getarg rd.timeout)
|
||||
+ _timeout=${_timeout:-0}
|
||||
|
||||
[ -e "$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0
|
||||
|
||||
@@ -29,7 +32,7 @@ generator_wait_for_dev()
|
||||
mkdir -p /run/systemd/generator/${_name}.device.d
|
||||
{
|
||||
echo "[Unit]"
|
||||
- echo "JobTimeoutSec=0"
|
||||
+ echo "JobTimeoutSec=$_timeout"
|
||||
} > /run/systemd/generator/${_name}.device.d/timeout.conf
|
||||
fi
|
||||
}
|
||||
@@ -60,6 +63,6 @@ case "$root" in
|
||||
rootok=1 ;;
|
||||
esac
|
||||
|
||||
-[ "${root%%:*}" = "block" ] && generator_wait_for_dev "${root#block:}"
|
||||
+[ "${root%%:*}" = "block" ] && generator_wait_for_dev "${root#block:}" "$RDRETRY"
|
||||
|
||||
exit 0
|
||||
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
||||
index 33f7678..5a867b8 100755
|
||||
--- a/modules.d/99base/dracut-lib.sh
|
||||
+++ b/modules.d/99base/dracut-lib.sh
|
||||
@@ -876,12 +876,16 @@ wait_for_dev()
|
||||
local _name
|
||||
local _needreload
|
||||
local _noreload
|
||||
+ local _timeout
|
||||
|
||||
if [ "$1" = "-n" ]; then
|
||||
_noreload=1
|
||||
shift
|
||||
fi
|
||||
|
||||
+ _timeout=$(getarg rd.timeout)
|
||||
+ _timeout=${_timeout:-0}
|
||||
+
|
||||
_name="$(str_replace "$1" '/' '\x2f')"
|
||||
|
||||
[ -e "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0
|
||||
@@ -905,7 +909,7 @@ wait_for_dev()
|
||||
mkdir -p ${PREFIX}/etc/systemd/system/${_name}.device.d
|
||||
{
|
||||
echo "[Unit]"
|
||||
- echo "JobTimeoutSec=0"
|
||||
+ echo "JobTimeoutSec=$_timeout"
|
||||
} > ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf
|
||||
_needreload=1
|
||||
fi
|
||||
--
|
||||
1.8.4.5
|
||||
|
37
0098-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch
Normal file
37
0098-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From 438b80786d2d3f729620bcf73d65732e9e84c52e Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu, 3 Jul 2014 14:44:22 +0200
|
||||
Subject: Do not call 'lvm' for non-LVM device-mapper devices
|
||||
|
||||
If a device-mapper device is not created by LVM it's pointless
|
||||
to call any 'lvm' programs got extract details; they'll be
|
||||
failing anyway. So check the UUID before calling 'lvm'.
|
||||
This speeds up initrd creation and avoids I/O errors on
|
||||
multipath devices.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
dracut-functions.sh | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||
index 1e0779a..b6247f5 100755
|
||||
--- a/dracut-functions.sh
|
||||
+++ b/dracut-functions.sh
|
||||
@@ -700,10 +700,12 @@ for_each_host_dev_and_slaves()
|
||||
# but you cannot create the logical volume without the volume group.
|
||||
# And the volume group might be bigger than the devices the LV needs.
|
||||
check_vol_slaves() {
|
||||
- local _lv _vg _pv
|
||||
+ local _lv _vg _pv _dm
|
||||
for i in /dev/mapper/*; do
|
||||
[[ $i == /dev/mapper/control ]] && continue
|
||||
_lv=$(get_maj_min $i)
|
||||
+ _dm=/sys/dev/block/$_lv/dm
|
||||
+ [[ -f $_dm/uuid && $(<$_dm/uuid) =~ LVM-* ]] || continue
|
||||
if [[ $_lv = $2 ]]; then
|
||||
_vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null)
|
||||
# strip space
|
||||
--
|
||||
1.8.4.5
|
||||
|
@ -0,0 +1,50 @@
|
||||
From 760bf001b3941f52451c148f3b3d66a38d4ef457 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu, 3 Jul 2014 15:29:59 +0200
|
||||
Subject: 90multipath: Load device_handler modules early during boot
|
||||
|
||||
The device handler modules need to be loaded early during boot
|
||||
to avoid I/O errors being printed to the system log.
|
||||
|
||||
References: bnc#871617
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
modules.d/90multipath/module-setup.sh | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
|
||||
index 22ff580..6ac8534 100755
|
||||
--- a/modules.d/90multipath/module-setup.sh
|
||||
+++ b/modules.d/90multipath/module-setup.sh
|
||||
@@ -30,6 +30,15 @@ depends() {
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
+cmdline() {
|
||||
+ for m in scsi_dh_alua scsi_dh_emc scsi_dh_rdac ; do
|
||||
+ if module_is_host_only $m ; then
|
||||
+ printf 'rd.driver.pre=%s ' "$m"
|
||||
+ fi
|
||||
+ done
|
||||
+}
|
||||
+
|
||||
+# called by dracut
|
||||
installkernel() {
|
||||
local _ret
|
||||
local _arch=$(uname -m)
|
||||
@@ -91,6 +100,11 @@ install() {
|
||||
inst_libdir_file "libmultipath*" "multipath/*"
|
||||
inst_libdir_file 'libgcc_s.so*'
|
||||
|
||||
+ if [[ $hostonly_cmdline ]] ; then
|
||||
+ local _conf=$(cmdline)
|
||||
+ [[ $_conf ]] && echo "$_conf" >> "${initdir}/etc/cmdline.d/90multipath.conf"
|
||||
+ fi
|
||||
+
|
||||
if dracut_module_included "systemd"; then
|
||||
inst_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service"
|
||||
mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.wants"
|
||||
--
|
||||
1.8.4.5
|
||||
|
28
0100-Add-btrfs-rescue-utilities.patch
Normal file
28
0100-Add-btrfs-rescue-utilities.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From b809bebcb9a32330e050fdaac0653379cbe4d01a Mon Sep 17 00:00:00 2001
|
||||
From: David Sterba <dsterba@suse.cz>
|
||||
Date: Fri, 4 Jul 2014 10:22:59 +0200
|
||||
Subject: Add btrfs rescue utilities
|
||||
|
||||
Signed-off-by: David Sterba <dsterba@suse.cz>
|
||||
---
|
||||
modules.d/90btrfs/module-setup.sh | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh
|
||||
index 406fd6d..d76e767 100755
|
||||
--- a/modules.d/90btrfs/module-setup.sh
|
||||
+++ b/modules.d/90btrfs/module-setup.sh
|
||||
@@ -46,7 +46,8 @@ install() {
|
||||
inst_hook initqueue/timeout 10 "$moddir/btrfs_timeout.sh"
|
||||
fi
|
||||
|
||||
- inst_multiple -o btrfsck btrfs-zero-log
|
||||
+ # rescue utilities
|
||||
+ inst_multiple btrfs-zero-log btrfs-image btrfs-dump-super
|
||||
+ inst_multiple btrfs-debug-tree mkfs.btrfs btrfstune btrfs-select-super
|
||||
inst $(command -v btrfs) /sbin/btrfs
|
||||
}
|
||||
-
|
||||
--
|
||||
1.8.4.5
|
||||
|
@ -0,0 +1,34 @@
|
||||
From 390474e70238c6585976bab3d37b0f82e5f1a417 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Fri, 4 Jul 2014 12:31:24 +0200
|
||||
Subject: Print stored dracut commandline during initramfs build
|
||||
|
||||
When generating the initramfs we should be printing out the
|
||||
generated dracut commandline used for booting.
|
||||
This will simplify debugging.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
dracut.sh | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 40006e7..a166cb6 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -1479,6 +1479,12 @@ if ! ( echo $PARMS_TO_STORE > $initdir/lib/dracut/build-parameter.txt ); then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
+if [[ $hostonly_cmdline ]] ; then
|
||||
+ dinfo "Stored kernel commandline:"
|
||||
+ for conf in $initdir/etc/cmdline.d/*.conf ; do
|
||||
+ dinfo "$(< $conf)"
|
||||
+ done
|
||||
+fi
|
||||
rm -f -- "$outfile"
|
||||
dinfo "*** Creating image file ***"
|
||||
|
||||
--
|
||||
1.8.4.5
|
||||
|
51
0102-Align-dev_unit_name-with-systemd-s-function.patch
Normal file
51
0102-Align-dev_unit_name-with-systemd-s-function.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From ad1acb808e5c7695cb54af7b449db11afd710f21 Mon Sep 17 00:00:00 2001
|
||||
From: Thorsten Behrens <tbehrens@suse.com>
|
||||
Date: Sun, 22 Jun 2014 03:19:51 +0200
|
||||
Subject: Align dev_unit_name() with systemd's function.
|
||||
|
||||
Add more corner cases from systemd's
|
||||
unit_name_from_path_instance() C function.
|
||||
|
||||
Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
|
||||
---
|
||||
modules.d/99base/dracut-lib.sh | 22 +++++++++++++++++-----
|
||||
1 file changed, 17 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
||||
index 5a867b8..e201af8 100755
|
||||
--- a/modules.d/99base/dracut-lib.sh
|
||||
+++ b/modules.d/99base/dracut-lib.sh
|
||||
@@ -857,13 +857,25 @@ wait_for_mount()
|
||||
} >> "$hookdir/emergency/90-${_name}.sh"
|
||||
}
|
||||
|
||||
+# get a systemd-compatible unit name from a path
|
||||
+# (mimicks unit_name_from_path_instance())
|
||||
dev_unit_name()
|
||||
{
|
||||
- _name="${1%%/}"
|
||||
- _name="${_name##/}"
|
||||
- _name="$(str_replace "$_name" '-' '\x2d')"
|
||||
- _name="$(str_replace "$_name" '/' '-')"
|
||||
- echo "$_name"
|
||||
+ local dev="$1"
|
||||
+
|
||||
+ if [ "$dev" = "/" -o -z "$dev" ]; then
|
||||
+ printf -- "-"
|
||||
+ exit 0
|
||||
+ fi
|
||||
+
|
||||
+ dev="${1%%/}"
|
||||
+ dev="${dev##/}"
|
||||
+ dev="$(str_replace "$dev" '\' '\x5c')"
|
||||
+ dev="$(str_replace "$dev" '-' '\x2d')"
|
||||
+ dev=${dev/#\./\\x2e}
|
||||
+ dev="$(str_replace "$dev" '/' '-')"
|
||||
+
|
||||
+ printf -- "%s" "$dev"
|
||||
}
|
||||
|
||||
# wait_for_dev <dev>
|
||||
--
|
||||
1.8.4.5
|
||||
|
50
0103-Fixup-missing-separators-in-rootfs-block-cmdline.patch
Normal file
50
0103-Fixup-missing-separators-in-rootfs-block-cmdline.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From 827e7c0e82c5ae7d0ddebc5b67a1c767d39eded6 Mon Sep 17 00:00:00 2001
|
||||
From: Thorsten Behrens <tbehrens@suse.com>
|
||||
Date: Mon, 7 Jul 2014 01:13:40 +0200
|
||||
Subject: Fixup missing separators in rootfs-block cmdline
|
||||
|
||||
This fixes up 21e4cbee5d852108880cedc9edc619cdd9b296a5 by
|
||||
re-introducing the spaces between the arguments.
|
||||
[hare: moving printf statement into one line]
|
||||
|
||||
Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
dracut.cmdline.7.asc | 3 +++
|
||||
modules.d/95rootfs-block/module-setup.sh | 6 +++---
|
||||
2 files changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
||||
index 2dc795b..228d571 100644
|
||||
--- a/dracut.cmdline.7.asc
|
||||
+++ b/dracut.cmdline.7.asc
|
||||
@@ -134,6 +134,9 @@ Misc
|
||||
specify the controlling terminal for the console.
|
||||
This is useful, if you have multiple "console=" arguments.
|
||||
|
||||
+**rd.nocmdline**::
|
||||
+ Skip built-in commandline arguments
|
||||
+
|
||||
[[dracutkerneldebug]]
|
||||
Debug
|
||||
~~~~~
|
||||
diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh
|
||||
index a620786..7f3b156 100755
|
||||
--- a/modules.d/95rootfs-block/module-setup.sh
|
||||
+++ b/modules.d/95rootfs-block/module-setup.sh
|
||||
@@ -34,9 +34,9 @@ cmdline_journal() {
|
||||
cmdline_rootfs() {
|
||||
local dev=/dev/block/$(find_root_block_device)
|
||||
if [ -e $dev ]; then
|
||||
- printf "root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")"
|
||||
- printf "rootflags=%s" "$(find_mp_fsopts /)"
|
||||
- printf "rootfstype=%s\n" "$(find_mp_fstype /)"
|
||||
+ printf "root=%s rootflags=%s rootfstype=%s\n" \
|
||||
+ "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")" \
|
||||
+ "$(find_mp_fsopts /)" "$(find_mp_fstype /)"
|
||||
fi
|
||||
}
|
||||
|
||||
--
|
||||
1.8.4.5
|
||||
|
70
0104-Generate-fallback-mount-unit-for-root-filesystem.patch
Normal file
70
0104-Generate-fallback-mount-unit-for-root-filesystem.patch
Normal file
@ -0,0 +1,70 @@
|
||||
From 7bbe5a2608be72ecc51c3a28f0da1ddaf522e293 Mon Sep 17 00:00:00 2001
|
||||
From: Thorsten Behrens <tbehrens@suse.com>
|
||||
Date: Mon, 7 Jul 2014 01:14:45 +0200
|
||||
Subject: Generate fallback mount unit for root filesystem
|
||||
|
||||
If kernel cmdline has no root= provided, *and* the initrd carries
|
||||
a default value, create a systemd mount unit to have it available
|
||||
in /sysroot
|
||||
|
||||
References: bnc#855258
|
||||
|
||||
Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
|
||||
---
|
||||
modules.d/98systemd/rootfs-generator.sh | 34 ++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 33 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/98systemd/rootfs-generator.sh b/modules.d/98systemd/rootfs-generator.sh
|
||||
index a2b71ff..13428da 100755
|
||||
--- a/modules.d/98systemd/rootfs-generator.sh
|
||||
+++ b/modules.d/98systemd/rootfs-generator.sh
|
||||
@@ -37,6 +37,35 @@ generator_wait_for_dev()
|
||||
fi
|
||||
}
|
||||
|
||||
+generator_mount_rootfs()
|
||||
+{
|
||||
+ local _type=$2
|
||||
+ local _flags=$3
|
||||
+ local _name
|
||||
+
|
||||
+ [ -z "$1" ] && return 0
|
||||
+
|
||||
+ _name=$(dev_unit_name "$1")
|
||||
+ [ -d /run/systemd/generator ] || mkdir -p /run/systemd/generator
|
||||
+ if ! [ -f /run/systemd/generator/sysroot.mount ]; then
|
||||
+ {
|
||||
+ echo "[Unit]"
|
||||
+ echo "Before=initrd-root-fs.target"
|
||||
+ echo "RequiresOverridable=systemd-fsck@${_name}.service"
|
||||
+ echo "After=systemd-fsck@${_name}.service"
|
||||
+ echo "[Mount]"
|
||||
+ echo "Where=/sysroot"
|
||||
+ echo "What=$1"
|
||||
+ echo "Options=${_flags}"
|
||||
+ echo "Type=${_type}"
|
||||
+ } > /run/systemd/generator/sysroot.mount
|
||||
+ fi
|
||||
+ if ! [ -L /run/systemd/generator/initrd-root-fs.target.requires/sysroot.mount ]; then
|
||||
+ [ -d /run/systemd/generator/initrd-root-fs.target.requires ] || mkdir -p /run/systemd/generator/initrd-root-fs.target.requires
|
||||
+ ln -s ../sysroot.mount /run/systemd/generator/initrd-root-fs.target.requires/sysroot.mount
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
root=$(getarg root=)
|
||||
case "$root" in
|
||||
block:LABEL=*|LABEL=*)
|
||||
@@ -63,6 +92,9 @@ case "$root" in
|
||||
rootok=1 ;;
|
||||
esac
|
||||
|
||||
-[ "${root%%:*}" = "block" ] && generator_wait_for_dev "${root#block:}" "$RDRETRY"
|
||||
+if [ "${root%%:*}" = "block" ]; then
|
||||
+ generator_wait_for_dev "${root#block:}" "$RDRETRY"
|
||||
+ grep -q 'root=' /proc/cmdline || generator_mount_rootfs "${root#block:}" "$(getarg rootfstype=)" "$(getarg rootflags=)"
|
||||
+fi
|
||||
|
||||
exit 0
|
||||
--
|
||||
1.8.4.5
|
||||
|
47
0105-95iscsi-parse-output-from-iscsiadm-correctly.patch
Normal file
47
0105-95iscsi-parse-output-from-iscsiadm-correctly.patch
Normal file
@ -0,0 +1,47 @@
|
||||
From a852317e8338ffb94fa1ac9512d465ac8c72cdc0 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Tue, 8 Jul 2014 13:16:41 +0200
|
||||
Subject: 95iscsi: parse output from iscsiadm correctly
|
||||
|
||||
Due to some obsure reason the IFS parameter is not set correctly
|
||||
when evaluating get_ibft_mod(). So change the parsing to not rely
|
||||
on IFS altogether.
|
||||
|
||||
References: bnc#886199
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
modules.d/95iscsi/module-setup.sh | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
||||
index 81ffb18..f63634a 100755
|
||||
--- a/modules.d/95iscsi/module-setup.sh
|
||||
+++ b/modules.d/95iscsi/module-setup.sh
|
||||
@@ -3,15 +3,15 @@
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
get_ibft_mod() {
|
||||
- local ibft_mac=$1 IFS
|
||||
+ local ibft_mac=$1
|
||||
+ local iface_mac iface_mod
|
||||
# Return the iSCSI offload module for a given MAC address
|
||||
- iscsiadm -m iface | while read iface_name iface_desc ; do
|
||||
- OLDIFS="$IFS"
|
||||
- IFS=$','
|
||||
- set -- $iface_desc
|
||||
- IFS="$OLDIFS"
|
||||
- if [ "$ibft_mac" = "$2" ] ; then
|
||||
- echo $1
|
||||
+ for iface_desc in $(iscsiadm -m iface | cut -f 2 -d ' '); do
|
||||
+ iface_mod=${iface_desc%%,*}
|
||||
+ iface_mac=${iface_desc#*,}
|
||||
+ iface_mac=${iface_mac%%,*}
|
||||
+ if [ "$ibft_mac" = "$iface_mac" ] ; then
|
||||
+ echo $iface_mod
|
||||
return 0
|
||||
fi
|
||||
|
||||
--
|
||||
1.8.4.5
|
||||
|
@ -1,3 +1,58 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 8 13:21:14 CEST 2014 - hare@suse.de
|
||||
|
||||
- Print stored dracut commandline during initramfs build
|
||||
* Add: 0101-Print-stored-dracut-commandline-during-initramfs-bui.patch
|
||||
- Align dev_unit_name() with systemd's function
|
||||
* Add: 0102-Align-dev_unit_name-with-systemd-s-function.patch
|
||||
- Fixup missing separators in rootfs-block cmdline
|
||||
* Add: 0103-Fixup-missing-separators-in-rootfs-block-cmdline.patch
|
||||
- Generate fallback mount unit for root filesystem (bnc#855258)
|
||||
* Add: 0104-Generate-fallback-mount-unit-for-root-filesystem.patch
|
||||
- 95iscsi: parse output from iscsiadm correctly (bnc#886199)
|
||||
* Add: 0105-95iscsi-parse-output-from-iscsiadm-correctly.patch
|
||||
- Add btrfs rescue utilities:
|
||||
* Add: 0100-Add-btrfs-rescue-utilities.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 3 18:16:11 CEST 2014 - dsterba@suse.cz
|
||||
|
||||
- 90btrfs: Install rescue utilities to initrd
|
||||
* Add: 0100-btrfs-add-initrd-rescue-utilities.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 3 15:41:16 CEST 2014 - hare@suse.de
|
||||
|
||||
- 40network: create /var/lib/wicked in ifup.sh (bnc#885141)
|
||||
* Add: 0089-40network-create-var-lib-wicked-in-ifup.sh.patch
|
||||
- dracut: caps: Remove whole caps module
|
||||
* Add: 0090-dracut-caps-Remove-whole-caps-module.patch
|
||||
- dracut: biosdevname: Only install if present
|
||||
* Add: 0091-dracut-biosdevname-In-SUSE-biosdevname-package-is-in.patch
|
||||
- dracut: nbd: Only complain of missing binary in hostonly mode
|
||||
if rootfs is on nbd
|
||||
* Add: 0092-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch
|
||||
- 95iscsi: generate commandline for software iscsi (bnc#880108)
|
||||
* Add: 0093-95iscsi-generate-commandline-for-software-iscsi.patch
|
||||
- Implement shortcut 'ip=<ifname>:static' for static configuration
|
||||
* Add: 0094-Implement-shortcut-ip-ifname-static-for-static-confi.patch
|
||||
- 95iscsi: use static configuration for software iscsi (bnc#884768)
|
||||
* Add: 0095-95iscsi-use-static-configuration-for-software-iscsi.patch
|
||||
- dracut: Fix error: local: can only be used in a function
|
||||
* Add: 0096-dracut-Fix-error-local-can-only-be-used-in-a-functio.patch
|
||||
- Implement 'rd.timeout' to modify the device timeout (bnc#878770)
|
||||
* Add: 0097-Implement-rd.timeout-to-modify-the-device-timeout.patch
|
||||
- Do not call 'lvm' for non-LVM device-mapper devices
|
||||
* Add: 0098-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch
|
||||
- 90multipath: Load device_handler modules early during boot (bnc#871617)
|
||||
* Add: 0099-90multipath-Load-device_handler-modules-early-during.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 27 15:23:37 CEST 2014 - hare@suse.de
|
||||
|
||||
- 91zipl: Add new module for s390x configuration changes (bnc#884743)
|
||||
* Add: 0088-91zipl-Add-new-module-to-update-s390x-configuration.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 26 16:41:58 CEST 2014 - hare@suse.de
|
||||
|
||||
|
37
dracut.spec
37
dracut.spec
@ -108,6 +108,24 @@ Patch84: 0084-95rootfs-block-Correctly-terminate-commandline-param.patch
|
||||
Patch85: 0085-95zfcp_rules-print-out-rd.zfcp-commandline-parameter.patch
|
||||
Patch86: 0086-95zfcp_rules-Auto-generate-udev-rule-for-ipl-device.patch
|
||||
Patch87: 0087-95dasd_rules-Auto-generate-udev-rule-for-ipl-device.patch
|
||||
Patch88: 0088-91zipl-Add-new-module-to-update-s390x-configuration.patch
|
||||
Patch89: 0089-40network-create-var-lib-wicked-in-ifup.sh.patch
|
||||
Patch90: 0090-dracut-caps-Remove-whole-caps-module.patch
|
||||
Patch91: 0091-dracut-biosdevname-In-SUSE-biosdevname-package-is-in.patch
|
||||
Patch92: 0092-dracut-nbd-Only-complain-of-missing-binary-in-hoston.patch
|
||||
Patch93: 0093-95iscsi-generate-commandline-for-software-iscsi.patch
|
||||
Patch94: 0094-Implement-shortcut-ip-ifname-static-for-static-confi.patch
|
||||
Patch95: 0095-95iscsi-use-static-configuration-for-software-iscsi.patch
|
||||
Patch96: 0096-dracut-Fix-error-local-can-only-be-used-in-a-functio.patch
|
||||
Patch97: 0097-Implement-rd.timeout-to-modify-the-device-timeout.patch
|
||||
Patch98: 0098-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch
|
||||
Patch99: 0099-90multipath-Load-device_handler-modules-early-during.patch
|
||||
Patch100: 0100-Add-btrfs-rescue-utilities.patch
|
||||
Patch101: 0101-Print-stored-dracut-commandline-during-initramfs-bui.patch
|
||||
Patch102: 0102-Align-dev_unit_name-with-systemd-s-function.patch
|
||||
Patch103: 0103-Fixup-missing-separators-in-rootfs-block-cmdline.patch
|
||||
Patch104: 0104-Generate-fallback-mount-unit-for-root-filesystem.patch
|
||||
Patch105: 0105-95iscsi-parse-output-from-iscsiadm-correctly.patch
|
||||
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: bash
|
||||
@ -236,6 +254,24 @@ and its cryptography during startup.
|
||||
%patch85 -p1
|
||||
%patch86 -p1
|
||||
%patch87 -p1
|
||||
%patch88 -p1
|
||||
%patch89 -p1
|
||||
%patch90 -p1
|
||||
%patch91 -p1
|
||||
%patch92 -p1
|
||||
%patch93 -p1
|
||||
%patch94 -p1
|
||||
%patch95 -p1
|
||||
%patch96 -p1
|
||||
%patch97 -p1
|
||||
%patch98 -p1
|
||||
%patch99 -p1
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
%patch104 -p1
|
||||
%patch105 -p1
|
||||
|
||||
%build
|
||||
%configure\
|
||||
@ -397,6 +433,7 @@ ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh %{buildroot}/%{dra
|
||||
%{dracutlibdir}/modules.d/90qemu
|
||||
%{dracutlibdir}/modules.d/91crypt-gpg
|
||||
%{dracutlibdir}/modules.d/91crypt-loop
|
||||
%{dracutlibdir}/modules.d/91zipl
|
||||
%{dracutlibdir}/modules.d/95znet
|
||||
%{dracutlibdir}/modules.d/95fcoe-uefi
|
||||
%{dracutlibdir}/modules.d/95nbd
|
||||
|
Loading…
x
Reference in New Issue
Block a user