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

- Do not inst binaries explicitly into /bin or /usr/bin, it is already taken
  care of internally for that:
     Delete 0006-Install-bin-mount.patch
     Modify 0013-Correct-paths-for-openSUSE.patch
- Do not stop trying to load drivers (via add-drivers or filesystems) if one
  fails
     Add 0025-dracut_continue_adding_modules_also_on_error.patch
- Introduce force-drivers. mkinitrd should use this one instead of add-drivers
  later, if accepted mainline
     Add
  0026-force_to_add_and_load_kernel_modules_other_than_via_boot_param.patch

OBS-URL: https://build.opensuse.org/request/show/232961
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=141
This commit is contained in:
Shawn Dunn 2014-05-08 02:15:33 +00:00 committed by Git OBS Bridge
parent 2f8fa9a482
commit fda9818fc2
6 changed files with 159 additions and 40 deletions

View File

@ -1,25 +0,0 @@
From e147bd71656fb48c10520cad98b56f6355270afd Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Wed, 27 Nov 2013 14:35:19 +0100
Subject: [PATCH] Install /bin/mount
systemd relies on /bin/mount to be present, so install it.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/99fs-lib/module-setup.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules.d/99fs-lib/module-setup.sh b/modules.d/99fs-lib/module-setup.sh
index 7979bab..b24207d 100755
--- a/modules.d/99fs-lib/module-setup.sh
+++ b/modules.d/99fs-lib/module-setup.sh
@@ -85,4 +85,5 @@ install() {
fi
inst_multiple -o $_helpers fsck
+ inst /usr/bin/mount /bin/mount
}
--
1.8.1.4

View File

@ -27,19 +27,6 @@ Index: dracut-037/dracut.sh
[[ $tmpdir_l ]] && tmpdir="$tmpdir_l"
[[ $tmpdir ]] || tmpdir=/var/tmp
[[ $INITRD_COMPRESS ]] && compress=$INITRD_COMPRESS
Index: dracut-037/modules.d/10i18n/module-setup.sh
===================================================================
--- dracut-037.orig/modules.d/10i18n/module-setup.sh
+++ dracut-037/modules.d/10i18n/module-setup.sh
@@ -96,6 +96,8 @@ install() {
install_base() {
inst_multiple setfont loadkeys kbd_mode stty
+ inst /usr/bin/setfont /bin/setfont
+ inst /usr/bin/loadkeys /bin/loadkeys
if ! dracut_module_included "systemd"; then
inst ${moddir}/console_init.sh /lib/udev/console_init
Index: dracut-037/modules.d/98systemd/rescue.service
===================================================================
--- dracut-037.orig/modules.d/98systemd/rescue.service

View File

@ -0,0 +1,39 @@
dracut: Do not stop installing drivers if one fails
--add-drivers and --filesystems kernel drivers are added via:
instmods -c
The check option makes the function return if one driver could not get
installed without trying to install further drivers which is bad.
The user is still informed ($_silent is by default no), but all modules
passed to instmods are tried to be loaded, even if one fails.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Index: dracut-037/dracut-functions.sh
===================================================================
--- dracut-037.orig/dracut-functions.sh
+++ dracut-037/dracut-functions.sh
@@ -1689,18 +1689,16 @@ instmods() {
if (($# == 0)); then # filenames from stdin
while read _mod; do
inst1mod "${_mod%.ko*}" || {
- if [[ "$_check" == "yes" ]]; then
- [[ "$_silent" == "no" ]] && dfatal "Failed to install module $_mod"
- return 1
+ if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then
+ dfatal "Failed to install module $_mod"
fi
}
done
fi
while (($# > 0)); do # filenames as arguments
inst1mod ${1%.ko*} || {
- if [[ "$_check" == "yes" ]]; then
- [[ "$_silent" == "no" ]] && dfatal "Failed to install module $1"
- return 1
+ if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then
+ dfatal "Failed to install module $1"
fi
}
shift

View File

@ -0,0 +1,101 @@
dracut: Introduce --force-drivers parameter and force_drivers=+ config option
Which will not only add listed drivers, but also enforce that they are tried
to be loaded at early boot time.
This is needed if drivers which are not autoloaded (e.g. loop and a lot others)
shall get loaded via initramfs.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Index: dracut-037/dracut.sh
===================================================================
--- dracut-037.orig/dracut.sh
+++ dracut-037/dracut.sh
@@ -81,6 +81,10 @@ Creates initial ramdisk images for prelo
exclusively include in the initramfs.
--add-drivers [LIST] Specify a space-separated list of kernel
modules to add to the initramfs.
+ --force-drivers [LIST] Specify a space-separated list of kernel
+ modules to add to the initramfs and make sure they
+ are tried to be loaded via modprobe same as passing
+ rd.driver.pre=DRIVER kernel parameter.
--omit-drivers [LIST] Specify a space-separated list of kernel
modules not to add to the initramfs.
--filesystems [LIST] Specify a space-separated list of kernel filesystem
@@ -299,6 +303,7 @@ rearrange_params()
--long add: \
--long force-add: \
--long add-drivers: \
+ --long force-drivers: \
--long omit-drivers: \
--long modules: \
--long omit: \
@@ -463,6 +468,7 @@ while :; do
-a|--add) push add_dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--force-add) push force_add_dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--add-drivers) push add_drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
+ --force-drivers) push force_drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
--omit-drivers) push omit_drivers_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
-m|--modules) push dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
-o|--omit) push omit_dracutmodules_l "$2"; PARMS_TO_STORE+=" '$2'"; shift;;
@@ -880,6 +886,13 @@ if (( ${#add_drivers_l[@]} )); then
fi
add_drivers=${add_drivers/-/_}
+if (( ${#force_drivers_l[@]} )); then
+ while pop force_drivers_l val; do
+ force_drivers+=" $val "
+ done
+fi
+force_drivers=${force_drivers/-/_}
+
if (( ${#omit_drivers_l[@]} )); then
while pop omit_drivers_l val; do
omit_drivers+=" $val "
@@ -896,6 +909,7 @@ fi
omit_drivers_corrected=""
for d in $omit_drivers; do
[[ " $drivers $add_drivers " == *\ $d\ * ]] && continue
+ [[ " $drivers $force_drivers " == *\ $d\ * ]] && continue
omit_drivers_corrected+="$d|"
done
omit_drivers="${omit_drivers_corrected%|}"
@@ -1287,6 +1301,13 @@ if [[ $no_kernel != yes ]]; then
if [[ $add_drivers ]]; then
hostonly='' instmods -c $add_drivers
fi
+ if [[ $force_drivers ]]; then
+ hostonly='' instmods -c $force_drivers
+ rm -f $initdir/etc/cmdline.d/20-force_driver.conf
+ for mod in $force_drivers; do
+ echo "rd.driver.pre=$mod" >>$initdir/etc/cmdline.d/20-force_drivers.conf
+ done
+ fi
if [[ $filesystems ]]; then
hostonly='' instmods -c $filesystems
fi
Index: dracut-037/dracut.8.asc
===================================================================
--- dracut-037.orig/dracut.8.asc
+++ dracut-037/dracut.8.asc
@@ -136,6 +136,19 @@ example:
----
===============================
+**--force-drivers** _<list of kernel modules>_::
+ See add-drivers above. But in this case it is ensured that the drivers
+ are tried to be loaded early via modprobe.
++
+[NOTE]
+===============================
+If [LIST] has multiple arguments, then you have to put these in quotes. For
+example:
+----
+# dracut --force-drivers "kmodule1 kmodule2" ...
+----
+===============================
+
**--omit-drivers** _<list of kernel modules>_::
specify a space-separated list of kernel modules not to add to the
initramfs.

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Wed May 7 15:25:37 UTC 2014 - trenn@suse.de
- Do not inst binaries explicitly into /bin or /usr/bin, it is already taken
care of internally for that:
Delete 0006-Install-bin-mount.patch
Modify 0013-Correct-paths-for-openSUSE.patch
- Do not stop trying to load drivers (via add-drivers or filesystems) if one
fails
Add 0025-dracut_continue_adding_modules_also_on_error.patch
- Introduce force-drivers. mkinitrd should use this one instead of add-drivers
later, if accepted mainline
Add
0026-force_to_add_and_load_kernel_modules_other_than_via_boot_param.patch
-------------------------------------------------------------------
Mon May 5 08:55:37 CEST 2014 - hare@suse.de

View File

@ -36,7 +36,6 @@ Source5: purge-kernels.service
Source6: dracut-installkernel
Source7: write-ifcfg-suse.sh
Patch1: dracut_v37_to_HEAD.patch
Patch10: 0006-Install-bin-mount.patch
Patch11: 0013-Correct-paths-for-openSUSE.patch
Patch12: 0014-Check-for-plymouth-lib-directories.patch
Patch13: dracut_do_not_update_booloader_if_no_kernel_is_found.patch
@ -60,6 +59,8 @@ Patch34: add_dracuts_network_params_for_iscsi.patch
Patch35: 0022-90multipath-Fixup-service-file-for-booting.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
Patch38: 0025-dracut_continue_adding_modules_also_on_error.patch
Patch39: 0026-force_to_add_and_load_kernel_modules_other_than_via_boot_param.patch
BuildRequires: asciidoc
BuildRequires: bash
BuildRequires: docbook-xsl-stylesheets
@ -110,7 +111,6 @@ and its cryptography during startup.
%prep
%setup -q
%patch1 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
@ -134,6 +134,8 @@ and its cryptography during startup.
%patch35 -p1
%patch36 -p1
%patch37 -p1
%patch38 -p1
%patch39 -p1
%build
%configure\