Commit Graph

2910 Commits (049)

Author SHA1 Message Date
Harald Hoyer ba2cfcab1e
Merge pull request #338 from danimo/fshelp
dracut-emergency: optionally print fs help
2018-01-08 15:05:28 +01:00
Mark Fasheh 1f8a7ae799 dracut-emergency: optionally print fs help
Allow filesystem modules to install a fs-specific text file with
instructions on what to do when mount fails. This is printed when we go into
an emergency shell.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
2018-01-08 14:14:05 +01:00
Harald Hoyer d300160e70 Revert "mdraid: call mdadm with "--wait-clean" instead of "-W""
This reverts commit bc4ce61efc.

Read wrong man page section. Got confused by
https://github.com/dracutdevs/dracut/issues/342
2018-01-05 11:02:12 +01:00
Harald Hoyer 03214e51ae
Merge pull request #343 from lnykryn/boot_image_once_more
01fips: Properly creating path to .hmac of kernel based on BOOT_IMAGE
2018-01-02 15:01:15 +01:00
Harald Hoyer bc4ce61efc mdraid: call mdadm with "--wait-clean" instead of "-W"
seems like -W changed meanings over the years :-/
2018-01-02 14:58:14 +01:00
Lukas Nykryn d818986db4 01fips: Properly fix creating path to .hmac of kernel based on BOOT_IMAGE
8f5c5 broke the case where BOOT_IMAGE is not set at all.
This code should handle following:
1) BOOT_IMAGE not set
2) BOOT_IMAGE set to something unrelated (s390)
3) BOOT_IMAGE=vmlinuz-4.14.7-300.fc27.x86_64
4) BOOT_IMAGE=/vmlinuz-4.14.7-300.fc27.x86_64
5) BOOT_IMAGE=/boot/vmlinuz-4.14.7-300.fc27.x86_64
6) BOOT_IMAGE=subdir/vmlinuz-4.14.7-300.fc27.x86_64
7) BOOT_IMAGE=/subdir/vmlinuz-4.14.7-300.fc27.x86_64
8) BOOT_IMAGE=/boot/subdir/vmlinuz-4.14.7-300.fc27.x86_64

https://bugzilla.redhat.com/show_bug.cgi?id=1415032
2017-12-28 09:59:48 +01:00
Harald Hoyer 8134db6c33
Merge pull request #321 from danimo/multipath-fixes
SUSE fixes for 90multipath
2017-12-19 15:43:58 +01:00
Harald Hoyer 8c3e65d1ce
Merge pull request #318 from danimo/fcoe-fixes
All FCOE-related SUSE patches, rebased on top of master
2017-12-19 15:43:13 +01:00
Hannes Reinecke 10f06425a5 95lunmask: Add module to handle LUN masking
Using the module option 'scsi_mod.scan=manual'
this implements LUN masking by selectively enable only those
devices required for booting.

References: bsc#954600,FATE#319786

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-12-19 00:34:45 +01:00
Hannes Reinecke 164760f4b0 95fcoe: use interface names instead of MAC addresses
Now that we are using persistent network names we can switch
to using the interface names when specifying the fcoe configuration.
With that we can print the fcoe configuration only once.

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-12-18 21:48:07 +01:00
Hannes Reinecke fd13d5d4d5 95fcoe: add timeout initqueue entries
Occasionally the FCoE connection might be reset after fipvlan was
called, causing the FCoE connection to be dropped and boot to fail.
For these cases we should be adding a timeout entry for the
initqueue to have a failsave mechanism to re-run fipvlan in
these cases.

References: bsc#1052840

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-12-18 21:48:07 +01:00
Hannes Reinecke 36a8b2e305 95fcoe: Switch back to using fipvlan for bnx2fc
bnx2fc doesn't _actually_ need fcoemon, so fipvlan is sufficient
to start the FCoE connection.
And, in fact, fcoemon is started for every interface, causing
subsequent invocations to fail with

fcoemon[1157]: error 98 address already in use

and fcoemon tearing down the connection.

References: bsc#1052840

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-12-18 21:48:07 +01:00
Hannes Reinecke 4e3eb1e9d1 95fcoe: fixup fcoe-genrules.sh for VN2VN mode
The 'mode' argument was never referenced in the printf format, causing
invalid rules to be written.

References: bsc#1036323

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-12-18 21:48:07 +01:00
Hannes Reinecke a3f91db476 95fcoe: Add shutdown script
We should be disabling the FCoE connection (which triggers sending
a LOGO internally) to logout from the target; this resets the target
and will avoid hitting a busy condition during reboots.

References: bsc#994860

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-12-18 21:48:07 +01:00
Hannes Reinecke 2aac319410 95fcoe: always set AUTO_VLAN for fcoemon
fcoemon is well capable of figuring out whether a vlan should
be used, so there's no need to disable the AUTO_VLAN feature.

References: bsc#995019

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-12-18 21:48:05 +01:00
Harald Hoyer 43634c2469
Merge pull request #335 from lnykryn/BOOT_IMAGE-to-HMAC
01fips: Fix creating path to .hmac of kernel based on BOOT_IMAGE
2017-12-18 15:26:31 +01:00
Lukas Nykryn 8f5c564cb3 01fips: Fix creating path to .hmac of kernel based on BOOT_IMAGE
Old code did not work for two most common use-cases.
On most machines BOOT_IMAGE is set to something like
/vmlinuz-4.11.3-202.fc25.x86_64. So if we just add prefix "/boot/."
it won't work. Also on machines without /boot on separate partition
BOOT_IMAGE already has the /boot/ prefix (/boot/vmlinuz-3.10.0-799.el7.x86_64).
So let's strip it in such case.

https://bugzilla.redhat.com/show_bug.cgi?id=1415032
2017-12-18 14:48:59 +01:00
Florian Gamböck 63755f4db8 Use pattern matching function
The needle argument in this specific case is a pattern, which cannot be
matched by the "literal" string matcher strstr.

This can result in fsck calls like:

    e2fsck -a -y /dev/sda1

Which will then exit with an error like:

    e2fsck: Only one of the options -p/-a, -n or -y may be specified.

Hence, it is necessary to use the strglobin function to correctly match
the pattern.
2017-12-18 11:04:05 +01:00
Harald Hoyer 2d3273f96f
Merge pull request #325 from danimo/dasd_cio_free
95dasd_mod: do not set module parameters if dasd_cio_free is not present
2017-12-18 10:01:33 +01:00
Harald Hoyer 12930f30a1
Merge pull request #324 from danimo/mdraid-no-delete-part
90dmraid: do not delete partitions
2017-12-18 09:43:57 +01:00
Harald Hoyer 1619e731f7
Merge pull request #330 from danimo/task_max_emergency
Set TaskMax=inifinite for the emergency shell
2017-12-18 09:14:21 +01:00
Harald Hoyer 84912dde41
Merge pull request #327 from danimo/nfs_host_robustness
Rebustness fixes for NFS hostnames
2017-12-18 09:13:29 +01:00
Harald Hoyer dfbbb0baf5
Merge pull request #326 from danimo/no_efi_fcoe_default
fcoe-uefi: Add check for usage
2017-12-18 09:11:54 +01:00
Harald Hoyer c0f2b6bebc
Merge pull request #323 from danimo/dm-fixes
Two SUSE fixes for 90dm
2017-12-18 09:06:54 +01:00
Harald Hoyer 8f4f40cb3c
Merge pull request #322 from danimo/font_maps
10i18n: Add correct fontmaps
2017-12-18 09:05:49 +01:00
Harald Hoyer fa54381b4e
Merge pull request #320 from danimo/ifname-bond
Do not pass ifname for bonding devices (bsc#995812)
2017-12-18 09:02:39 +01:00
Harald Hoyer ffbe0373e2
Merge pull request #319 from danimo/modules-load.d-hostonly
Fix loading of modules in modules-load.d
2017-12-18 09:01:21 +01:00
Daniel Molkentin 649619f6a5 Set TaskMax=inifinite for the emergency shell
Certain rescue/recovery operations, e.g. xfs_repair need
that liberty (bsc#1019938).
2017-12-15 22:00:41 +01:00
Fabian Vogt 8602e59867 NFS: Support host being a DNS ALIAS
The "host" command may also print something else than
"asdf.local.lan has address 1.2.3.4", like:
"rootserver.local.net is an alias for rainbow.local.net.".
So "head -n1" is not enough.

Fixes boo#955592
2017-12-15 21:52:59 +01:00
Thomas Renninger f5c10673de 95nfs: Fix mount if IPv4 address is used in /etc/fstab
Signed-off-by: Thomas Renninger <trenn@suse.com>
2017-12-15 21:52:28 +01:00
Fabian Vogt 22836a0921 fcoe-uefi: Add check for usage
References: boo#965477

fcoe-uefi gets included by default on EFI systems,
as it does not do the same check that fcoe does,
therefore needlessly pulling in network modules.
This patch copies the check from fcoe to fcoe-uefi.
2017-12-15 21:19:30 +01:00
Hannes Reinecke 6f1b5c0dab 95dasd_mod: do not set module parameters if dasd_cio_free is not present
We're now parsing the 'rd.dasd' parameter from 95dasd_rules, so
setting the 'dasd_mod' module parameter should be dropped here.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-12-15 21:14:51 +01:00
Hannes Reinecke 871378aad4 90dmraid: do not delete partitions
There is no point trying to delete partitions; dmraid works
happily even with them. On the contrary trying to delete partitions
can even be harmful when eg dmraid should _not_ be started.

References: bsc#998860

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-12-15 20:58:41 +01:00
Hannes Reinecke 870591acec 90dm: fixup dependency cycle between MD and DM shutdown
DM devices might be located on top of MD devices, so we need to
call the DM shutdown script before MD shutdown. The exception
here are multipath devices, which are below MD devices.
So skip removing multipath devices here to avoid spurious errors.

References: bsc#994860

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-12-15 20:55:37 +01:00
Hannes Reinecke 07e6357483 90dm: Fixup shutdown script
When calling the shutdown script we need to take care of traversing
the device-mapper tables, otherwise we might end up trying to remove
a device-mapper device which still has another one stacked on top
and the removal will fail.

References: bsc#994860

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-12-15 20:55:23 +01:00
Fabian Vogt 251afd36b2 10i18n: Add correct fontmaps
References: bsc#943312, bsc#932981

Signed-off-by: Fabian Vogt <fvogt@suse.com>
2017-12-15 20:50:10 +01:00
Martin Wilck 8008d47faf 90multipath: start before local-fs-pre.target
local-fs-pre.target serves as a separator between the code for
detecting block devices and systemd's fsck/mount logic. This
patch ensures that multipathd is started before local-fs-pre.target
in the initrd. By adding a "Wants=" line for local-fs-pre.target,
it makes sure that this target is started at all.

References: bsc#1006118
Signed-off-by: Martin Wilck <mwilck@suse.de>

===================================================================
2017-12-15 20:42:53 +01:00
Hannes Reinecke af99264a36 90multipath: parse kernel commandline option 'multipath=off'
SLES11 provided a kernel commandline option 'multipath=off',
so dracut should be parsing the option, too.

References: bsc#1001691

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-12-15 20:42:24 +01:00
Hannes Reinecke 239e8ba2ac 90multipath: add shutdown script
As the device-mapper module is removing all device-mapper tables
during shutdown we need to make sure to disable queuing on the
multipath devices; otherwise there might still be I/O pending
and the removal will fail.

References: bsc#994860

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-12-15 20:42:15 +01:00
Hannes Reinecke 8d20322f11 90multipath: Start daemon after udev settle
We need to wait until udev has processed all events, otherwise we'll
risk of misdetecting devices. This might cause a temporary interruption
during which multipath removes a device-mapper device, which then
causes a booting failure.

References: bsc#986734

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-12-15 20:41:59 +01:00
Hannes Reinecke d12ce1da85 90multipath: do not fail startup on missing configuration
References: bsc#930019

If rootfs is on multipath, but platform does not have an /etc/multipath.conf
file which is not urgently needed, they system will not boot, due to:

multipathd is not started and rootfs and swap are not found:
systemctl status multipathd.service
* multipathd.service - Device-Mapper Multipath Device Controller
   Loaded: loaded (/usr/lib/systemd/system/multipathd.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
Condition: start condition failed at Thu 2015-05-07 11:49:11 CEST; 7min ago
           ConditionPathExists=/etc/multipath.conf was not met

and exit to dracut shell.
2017-12-15 20:41:36 +01:00
Daniel Molkentin 51f4ab300d Do not pass ifname for bonding devices (bsc#995812)
Patch-By: Thomas Renninger <trenn@suse.de>
2017-12-15 20:35:29 +01:00
Fabian Vogt 9fd3e045d5 Fix loading of modules in modules-load.d
With hostonly enabled, only modules that are currently
loaded are included in the initrd. Modules which are
explicitly listed in modules-load.d do not need to
be filtered that way. Fix for boo#962224.
2017-12-15 20:19:52 +01:00
Hannes Reinecke c75196e11e 95fcoe: Allow to specify the FCoE mode via the fcoe= parameter
FCoE can run in Fabric (ie FCF) or VN2VN mode, so we should allowing
to set this parameter from the commandline, too.

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-12-15 18:51:49 +01:00
Daniel Molkentin d71c9ee286 95fcoe: silence lldpad warnings
When lldpad is not running, any calls to 'dcbtool' will be printing
out a warning. As it perfectly legit to have FCoE running without
DCB we should not be printing out the error.

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-12-15 18:51:49 +01:00
Hannes Reinecke d066fcc3fb 95fcoe: Do not overwrite FCoE configuration
If the installation already has a FCoE configuration we should
not attempt to overwrite it but rather use the pre-defined
configuration.

References: bsc#993861

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-12-15 18:51:49 +01:00
Johannes Thumshirn 6b96b50d2c 95fcoe: Reorder initialisation for bnx2x
Check first if we're running off an bnx2x device and start FCoE on it
via fipvlan, then go the normal/Intel way of starting DCB.

Also the SUSE version of fcoemon needs the yes parameter for the
--syslog option

References: bsc#982588

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.com>
2017-12-15 18:51:42 +01:00
Harald Hoyer 611b8ae0d7
Merge pull request #316 from danimo/btrfs-crc32-accel
Include crc32c-intel module when using btrfs
2017-12-14 15:38:12 +01:00
Daniel Molkentin 9f2916cce1 Include crc32c-intel module when using btrfs
Reference: bsc#1011554
2017-12-14 13:41:37 +01:00
Lidong Zhong df96cccc8f Fix task limit in emergency.service (the same change as in dracut-emergency.service) (bsc#1019938) 2017-12-14 13:37:44 +01:00
Carlo Caione 94d09135a7 drm: Look for DRM drivers in the staging directory
The recently upstreamed virtualbox video driver (vboxvideo) is shipped
in the staging directory. We need to probe it before Xorg is loaded to
avoid a corrupted X.

In general it is a good practice to look also in the staging directory
for DRM drivers.

Signed-off-by: Carlo Caione <carlo@endlessm.com>
2017-12-12 16:04:24 +01:00
johannes 69acd20d4e 40network: install grep
since version 046 40network/net-lib.sh uses grep but the module does not install grep
2017-12-11 17:52:03 +01:00
Harald Hoyer 825730780a
Merge pull request #310 from danimo/remove-systemd-bootchart
Remove 00systemd-bootchart
2017-12-06 14:58:36 +01:00
Daniel Molkentin b36d322bd2 Remove 00systemd-bootchart
This was removed from systemd almost two years ago in
c550f7a9b89d017215af084288bc44f736f774fe, so dracut should drop support
as well.

Reference: bsc#1067279
2017-12-04 16:01:46 +01:00
Fabian Vogt ee6b44342b Fix warning about multipath if not needed
Although no device uses multipath, the module checks
for presence of the multipath binary first, printing a
warning if not present. This patch fixes the wrong ordering.
2017-11-30 16:51:15 +01:00
Harald Hoyer 1ec2e34adc
Merge pull request #300 from danimo/pick_all_matching_keymaps
10i18n: Load all keymaps for a given locale
2017-11-06 09:56:13 +01:00
Frederick Grose b1e1b6cba3 dmsquash-live-root: Replace incompatible shell syntax.
Fix issue #279  supercede PR #299
Fix bug https://issues.openmandriva.org/show_bug.cgi?id=2219
Replace Bashisms in the boot message for a missing overlay.
Verify presence of plymouth before calling it.
(Rework of commit f1b65e92af5e3f9df79f99e55d5aa936c9bca940.)
2017-11-05 02:19:10 -05:00
Zbigniew Jędrzejewski-Szmek 38ff9dfbe5 dmsquash-generator.sh: properly escape backslash in path
We need an actual bashslash in the filename on disk.

https://bugzilla.redhat.com/show_bug.cgi?id=1508794
2017-11-02 17:07:09 +01:00
Daniel Molkentin 28aea41829 10i18n: Load all keymaps for a given locale
Previously, dracut would only copy the first one found. However,
with legacy maps for some locales around, there is a chance we
pick the wrong one. Pick all matching keymaps instead

Reference: boo#1065058
2017-11-01 11:33:24 +01:00
Derek Higgins 9408a2ac33 Skip iscsi attachment if no info
If no iscsi session information can be retrieved from the firmware
then skip the iscsi attachment and allow the boot process to continue.
Ensure the timeout scripts don't hit their timeout waiting for
/tmp/iscsistarted-firmware to be created.
This will allow a common image to be used for servers with both a
local and iscsi root with rd.iscsi.firmware set.
2017-10-26 16:27:45 +01:00
Harald Hoyer 21789cbb0a make qemu and qemu-net a default module in non-hostonly mode 2017-10-25 13:00:39 +02:00
Harald Hoyer 1751bacda1 Merge pull request #296 from dracut-mailing-devs/20170303132146.4968-1-crrodriguez@opensuse.org
systemd 233 requires sha256, hmac and algif_hash modules
2017-10-23 10:23:42 +02:00
Peter Robinson 82651e9ef3 Add rpmsg, hwspinlock and usb/misc for ARM
Some of the more complex devices now need rpmsg and hwspinlock in the early boot
process to start, and these to the initrd, and pull in usb/misc because
apparently non standard usb hubs are a thing.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2017-10-12 12:17:41 +01:00
Harald Hoyer 6bc8fbda61 Merge pull request #223 from bmr-cymru/bmr-ignore-activation-skip
lvm_scan.sh: use -K when calling lvchange
2017-10-12 11:23:38 +02:00
Martin Wilck 4c2d98c75b emergency.service: use Type=idle
Type=oneshot, as currently set in dracut's emergency service file,
causes an awkward situation if emergency mode is entered e.g. because
of a root device timeout, and the root device appears later because it
just has taken longer than the timeout. In that situation, my
expectation (backed by past positive experience) is that the user should
be able to simply exit the emergency shell and resume normal boot.

:/# systemctl status sysroot.mount
● sysroot.mount - /sysroot
   Loaded: loaded (/proc/cmdline; bad; vendor preset: enabled)
   Active: active (mounted) since Mon 2017-10-09 14:32:15 CEST; 16s ago
    Where: /sysroot
     What: /dev/mapper/3600601600a30200024fbbaf3f500e411-part5
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)
  Process: 1873 ExecMount=/usr/bin/mount /dev/disk/by-uuid/63751805-6abc-46a3-a66f-427920dece4d /sysroot -o ro (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 512)

:/# systemctl list-jobs
JOB UNIT              TYPE  STATE
 56 emergency.target  start waiting
 57 emergency.service start running

2 jobs listed.
:/# exit
logout
Failed to start default.target: Transaction is destructive.

(system keeps idling from this point on, user has no chance to
do anything).

This results from the combination of two effects:
1) initrd-root-fs.target sets "OnFailureJobMode=replace-irreversibly",
2) emergency.service's Type=oneshot causes the start jobs for both
emergency.service and emergency.target to persist while the user is in
the emergency shell.

When the shell is exited, systemd tries to isolate "initrd.target"
again, but this fails with "the transaction is destructive" error
because of the still pending jobs.

This patch fixes this by changing the Type of "emergency.service" from
"oneshot" to "idle".
2017-10-09 14:51:45 +02:00
Harald Hoyer 4e3833f6a2 Merge pull request #285 from rldleblanc/fix-typos
Fix a couple of typos.
2017-10-09 12:59:29 +02:00
Harald Hoyer bf5c53a33f Merge pull request #290 from privb0x23/luks-detached
Add basic LUKS detached header support
2017-10-09 12:51:29 +02:00
Harald Hoyer bada26263c Merge pull request #287 from xlpang/master
fcoe: handle CNAs with DCB firmware support
2017-10-09 11:47:08 +02:00
Harald Hoyer 7c9e64272e Merge pull request #280 from tpgxyz/zstd
add support for Zstandard
2017-10-09 11:39:10 +02:00
Harald Hoyer 32618b456e Merge pull request #277 from imran1008/bond-master-mtu
Set MTU on bond master as opposed to a bond slave
2017-10-09 09:38:37 +02:00
Michal Sekletar 28401778c4 systemd: fix setting of timeouts for device units
JobRunningTimeoutSec now affects how long can start jobs for device
units stay in the "running" state. Disabling default job timeout via
JobTimeoutSec=0 doesn't disable running state timeout. We need to set
running state timeout as well.

Note that doing this the other way around has effect on generic timeout,
i.e. disabling running state timeout disables generic timeout. But doing
it this way we would create implicit dependency on fairly new
systemd-234. However, by setting both options we don't create dependency
on specific systemd version.
2017-10-06 10:05:25 +02:00
privb0x23 b7058d0ce5 Add basic LUKS detached header support
A LUKS root volume with a detached header on a device without partitioning will not have a UUID and will not have an attribute ENV{ID_FS_TYPE}=="crypto_LUKS".
Therefore, several areas need to be addressed: identification of the LUKS device, inclusion of entries within crypttab, and provision of the detached header file.
- Added support for an option (4th column: "force") in /etc/crypttab to force the inclusion of the entry in the initramfs version (avoiding the fs type test).
- Added support for an option (4th column: "header=/path/to/file") in /etc/crypttab to provide a path to a detached header file embedded within the initramfs.
- Added ID and PARTUUID support to the device (2nd column) in /etc/crypttab (complementing the existing UUID functionality).
- Added cmdline support to indicate LUKS device ("rd.luks.serial=") that refers to the attribute ENV{ID_SERIAL_SHORT}.
Tested successfully on Void Linux (x86_64 musl) (no systemd) with a LUKS root volume accessed with a keyfile and using a detached header.
Not tested on systemd, or on a LUKS root volume with a passphrase rather than a keyfile.
2017-10-03 23:37:55 +01:00
Xunlei Pang 795256bbb1 fcoe: handle CNAs with DCB firmware support
Some Combined Network Adapters(CNAs) implement DCB protocol
in firmware, it is recommended that do not run software-based
DCB or LLDP on CNAs that implement DCB, but we have to start
the lldpad service anyway(there might be other software DCB).

If the network interface provides hardware DCB/DCBX capabilities,
the field DCB_REQUIRED in "/etc/fcoe/cfg-xxx" is expected to
be set to "no".

We met an issue on "QLogic BCM57810" with DCB firmware support,
and found dracut still generated "fcoe=<mac>:dcb" which caused
kdump boot failure when using that fcoe dump target.

This patch parses /etc/fcoe/cfg-xxx to detect DCB_REQUIRED="no",
and force "nodcb" if it is the case.

Also improved some coding style in passing.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
2017-09-27 10:36:44 +08:00
Robert LeBlanc 4d60324757 Fix a couple of typos.
Signed-Off-By: Robert LeBlanc <robert@leblancnet.us>
2017-09-21 13:39:52 -06:00
tpgxyz 7dbadcc749 add support for Zstandard 2017-09-05 01:23:38 +02:00
Imran Haider 79926486a0 Set MTU on bond master as opposed to a bond slave
Prior to this commit, the MTU setting was applied to a bond slave
interface.  In older versions of the Linux kernel, this setting
propagated to the bond master and the other bond slaves associated with
the master.  In recent versions of the kernel (observed in Linux 4.12),
increasing the MTU of a slave does not automatically increase the MTU of
the master.  This allows for more flexibility but requires the MTU of
the master to be changed manually.

Ideally, the MTU setting should be applied to the bond master and the
setting will propagate to the bond slaves, since the slaves are required
to have a MTU that is greater than or equal to the bond master.
2017-09-03 00:15:37 -04:00
Harald Hoyer 424c065cd9 Merge pull request #276 from danimo/copy_multipath_confd
95multipath: Pickup files in /etc/multipath/conf.d
2017-08-30 11:51:12 +02:00
Harald Hoyer 1499719d25 Merge pull request #274 from danimo/system_allow_coredump
Enable core dumps with systemd from initrd
2017-08-30 11:39:06 +02:00
Daniel Molkentin d000b9a2c7 95multipath: Pickup files in /etc/multipath/conf.d
Reference: boo#1048551
2017-08-30 09:05:19 +02:00
Daniel Molkentin afe4e2844f Enable core dumps with systemd from initrd
systemd sets /proc/sys/kernel/core_pattern to use systemd-coredump.
However, systemd-coredump is missing from initrd, making dumping
the core in initrd impossible by default.

Reference: bsc#1054809
2017-08-29 08:53:35 +02:00
Xunlei Pang 5634a31156 rootfs-block/module-setup.sh: check root_devs in cmdline_rootfs()
In case of "--no-hostonly-default-device", we do not need
the root device, thus add this check.

Also fixed the stale "root_dev" export.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
2017-08-18 14:44:19 +08:00
Michal Koutný 348935e3b6 ssh-client: Include nss_ libraries
SSH uses passwd database and thus need various NSS plugin libraries,
depending upon setting in nsswitch.conf.

SSH binary fails within the dracut environment without the libraries:

    #:/ ssh
    No user exist for uid 0
2017-08-15 16:10:50 +02:00
Harald Hoyer 3bd3ef5819 kernel-modules: don't call instmods with empty arguments
otherwise it will try to read from stdin and stall
2017-08-14 14:58:47 +02:00
Harald Hoyer 00f3525a30 lvmmerge: depend on systemd
Fixes https://github.com/dracutdevs/dracut/issues/267
2017-08-14 09:47:22 +02:00
Harald Hoyer 65f78f3d74 crypt: handle rd.luks.name
systemd supports renaming of dm devices with rd.luks.name.

Honor the kernel command line parameter.
2017-08-11 13:23:10 +02:00
Javier Martinez Canillas 1792759721 network: Only bring up wired network interfaces
The dracut network module is only supposed to be used for wired interfaces
but if driver modules for wireless devices are wrongly copied, these will
be loaded and the available interfaces brought up.

If the rd.neednet=1 command line parameter is used, dhclient will attempt
to request an IP address for the interfaces and these requests will fail.

But other dracut modules that depend on the network to be settled, will
have to wait for the DHCP requests to timeout. Which can be a lot of time
since the dhclient default timeout value is 60 seconds.

Instead of trying to blacklist all possible kernel modules for wireless
devices, only bring up network interfaces if these are for wired devices.

Suggested-by: Harald Hoyer <harald@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2017-08-09 19:10:42 +02:00
Harald Hoyer 5abd692fe4 network/ifup: don't arping for point-to-point connections
https://bugzilla.redhat.com/show_bug.cgi?id=1477339
2017-08-07 15:09:36 +02:00
Harald Hoyer 1279a9e1a0 fcoe: install hba.conf and libhbalinux only if hba.conf exists 2017-08-07 14:45:55 +02:00
Harald Hoyer 0baf5a3e99 Merge pull request #265 from nullr0ute/arm-fixes
A few ARM fixes for a number of newer devices which have some wider deps
2017-08-07 13:10:55 +02:00
Peter Robinson 39018c93c2 arm: add soc/extcon/mfd as they're often needed for USB and core memory/soc drivers
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2017-08-04 19:51:25 +01:00
Peter Robinson f496af50b7 add options to pickup dw_mmc submodules to blockfuncs
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2017-08-04 18:43:26 +01:00
Steven Brudenell c427603cd1 Include both and in luks key name. 2017-08-03 21:47:06 -04:00
Steven Brudenell e2b877a18b Change mntp->keydev in loopback key luks name. 2017-08-03 21:47:06 -04:00
Steven Brudenell 690b24f02f Support crypto loop keys in initrd. 2017-08-03 21:47:05 -04:00
Harald Hoyer 8523ec50c2 Merge pull request #260 from haraldh/crypto-cleanup
crypt-loop: cleanup cleanup procedures
2017-08-02 11:28:47 +02:00
Harald Hoyer 9fd0461b7d nbd: use systemd-run to start nbd-client 2017-07-28 15:15:02 +02:00
Harald Hoyer b1ae591945 dracut-systemd: add back missing dependencies
otherwise TEST-20-NFS fails
2017-07-28 11:57:07 +02:00
Harald Hoyer 017978f868 network: redirect stderr for arping test 2017-07-28 11:54:27 +02:00
Harald Hoyer 2187b3d097 crypt-loop: cleanup cleanup procedures
Using initqueue --finished to cleanup stuff is not what the
initqueue/finished hook was meant for.

Move stuff to the real cleanup hook.
2017-07-28 10:43:39 +02:00
Harald Hoyer f24d205537 dracut-systemd: fixed dependencies
try to break an ordering cycle.

https://github.com/dracutdevs/dracut/issues/259
2017-07-28 10:19:26 +02:00
Harald Hoyer 85ed04e0cf dracut-systemd/*.service: fix copyright message and comment 2017-07-28 10:17:06 +02:00
Harald Hoyer c0371761fb add systemd-analyze to debug and TEST-02-SYSTEMD 2017-07-28 10:17:06 +02:00
Harald Hoyer ef025dcbbe Update README.md 2017-07-24 15:59:12 +02:00
Harald Hoyer d23b0efc1a 80lvmmerge: remove unused file 2017-07-24 15:54:16 +02:00
Harald Hoyer 1bfa75b015 80lvmmerge: README.md update 2017-07-24 15:53:50 +02:00
Harald Hoyer dd75a946db Update README.md 2017-07-24 15:51:54 +02:00
Harald Hoyer e95a3c36ed add lvmmerge dracut module 2017-07-24 15:48:54 +02:00
Harald Hoyer 400a85ffaf install arping V2 as arping2 2017-07-24 10:03:42 +02:00
Harald Hoyer a430c3f7a6 Merge pull request #252 from landgraf/dhcp_option_21
dhclient: send client-identifier matching hardware address
2017-07-19 14:32:41 +02:00
Pavel Zhukov 4011b48c42 dhclient: send client-identifier matching hardware address
Forcing dhclient to use hardware address instead of DUID to make it
predictable and allows system installation in whitelist based networks.
2017-07-17 17:58:28 +02:00
Lukas Nykryn 62b7920ed1 40network/dhclient.conf: rename classless-routes to classless-static-routes
We tell dhclient to name 121 option "classless-routes",
but in dhclient-script we parse classless_static_routes.
So either have to change the configuration or the script.

And since dhclient uses by default classless_static_routes,
let's change the configuration
2017-07-13 16:46:19 +02:00
Harald Hoyer 5ce7cc7337 add 90multipath-hostonly module
hardcoding the wwid of the drives in the initramfs causes problems
when the drives are cloned to a system with the same hardware, but
different disk wwid's

https://bugzilla.redhat.com/show_bug.cgi?id=1457311
2017-07-10 13:28:40 +02:00
Robert Scheck 37437cac8a Add NTFS support to 90dmsquash-live module (#191)
Support booting from USB media with NTFS filesystem (optionally),
which removes the FAT32 related 4 GB file size limit for LiveOS/
squashfs.img (and any other file on the same USB media).
2017-06-30 00:15:57 +02:00
Harald Hoyer c1699b59c6 kernel-modules: add serial line drivers 2017-06-29 12:18:26 +02:00
Harald Hoyer add1ea88d2 mark these as needing bash 2017-06-29 12:18:26 +02:00
Harald Hoyer 3d875f77f3 Try BOOT_IMAGE and fallback to vmlinuz-${KERNEL}
On s390 BOOT_IMAGE only denotes the number of the boot record that
was selected in the bootloader and not the path to the kernel image.

Also only bail out, if the kernel hmac checking relies on that path.
2017-06-29 10:40:29 +02:00
Harald Hoyer 38e9d6249a Merge pull request #246 from lnykryn/authenc
01fips: add authenec module
2017-06-28 18:09:54 +02:00
Lukas Nykryn 0a50111ab3 01fips: add authenec module
Resolves: #1465946
2017-06-28 17:46:04 +02:00
Harald Hoyer 937cc53ecb Merge pull request #241 from danimo/zfcp_rules_dasd_rules_updates
s390 changes that never went upstream
2017-06-28 11:57:33 +02:00
Harald Hoyer 343c74311b Merge pull request #244 from danimo/crypt_with_uuid
90crypt: Fixed crypttab_contains() to also work with device path in /etc/crypttab
2017-06-28 09:26:03 +02:00
Julian Wolf c3b6970394 90crypt: Fixed crypttab_contains() to also work with device path in /etc/crypttab
blkid is not available when this function is called, so block_uuid.map is put into
the initrd, mapping block devices from /etc/crypttab to UUIDs.

This fixes a bug where udev rules were created by mistake as crypttab_contains()
returned false for devices specified by path in /etc/crypttab which resulted in
error messages during boot.

Signed-off-by: Julian Wolf <juwolf@suse.de>
2017-06-27 16:43:47 +02:00
Lukas Nykryn 337a55eb2d network/dhclient-script: also parse dot separated $new_classless_static_routes
Previously our dhclient-script expected that $new_classless_static_routes
will have all values separated by a whitespace. But at least on F25
dhclient will put there the destination descriptor in the same format
as it is used by ISC dhcp-server.
For example:
new_classless_static_routes=32.10.198.122.47 192.168.78.4
while our current code expects
new_classless_static_routes=32 10 198 122 47 192 168 78 4

So let's just accept both of these formats by adding "." to IFS.

For details plesse see https://tools.ietf.org/html/rfc3442
"Classless Route Option Format"
2017-06-26 10:12:46 +02:00
Hannes Reinecke c8aa1d949a 95zfcp_rules: simplified rd.zfcp commandline for NPIV
When NPIV is enabled and the allow_lun_scan parameter is set to 'Y'
the HBA will initiate a LUN scan automatically, so there is no need
to specify the WWPN and LUN number manually.

References: bsc#964456

Signed-off-by: Hannes Reinecke <hare@suse.com>
2017-06-23 21:27:48 +02:00
Hannes Reinecke 5f923256e3 95zfcp_rules: fix typo in module_setup
module_setup.sh has a typo preventing it from saving the correct
dracut commandline.

References: bnc#887582

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:27:44 +02:00
Hannes Reinecke 5e7bbe43a3 95zfcp_rules: Enable the device before checking device type
For creating dynamic udev rules parse-dasd.sh look for the device
type in sysfs, which of course does not exist if cio_ignore is
active. So first enable the device before checking.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:27:41 +02:00
Hannes Reinecke 3a8ba44026 95zfcp_rules: Store all devices in commandline
'for_each_host_dev_and_slaves' would stop at the first found
device, so the cmdline() call would never list all required
devices. Use 'for_each_host_dev_and_slaves_all' instead and
filter out duplicates.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:27:38 +02:00
Hannes Reinecke e0c3b0793f Fix DASD with SSID greater than 0
bsc#989313

Signed-off-by: Thomas Renninger <trenn@suse.com>
2017-06-23 21:27:07 +02:00
Hannes Reinecke 8b0791fa01 Reset IFS variable
Setting and unsetting the IFS variable is tricky. To be on the
safe side we should always reset the IFS variable to its original
value after parsing.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:27:02 +02:00
Thomas Renninger e5bf1cecd6 95dasd_rules: Install 'collect' udev helper binary
Install the 'collect' udev helper binary for s390-specific rules.

References: bsc#938867

Signed-off-by: Thomas Renninger <trenn@suse.com>
2017-06-23 21:26:57 +02:00
Hannes Reinecke cf9c8c5fe3 95dasd_rules: Enable the device before checking device type
For creating dynamic udev rules parse-dasd.sh look for the device
type in sysfs, which of course does not exist if cio_ignore is
active. So first enable the device before checking.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:26:53 +02:00
Hannes Reinecke 05bf320972 95dasd_rules: Store all devices in commandline
'for_each_host_dev_and_slaves' would stop at the first found
device, so the cmdline() call would never list all required
devices. Use 'for_each_host_dev_and_slaves_all' instead and
filter out duplicates.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:26:49 +02:00
Hannes Reinecke 2600b54c18 Fixup typo 'firmare' instead of 'firmware'
Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:26:46 +02:00
Hannes Reinecke bd355f8643 95dasd_rules: Auto-generate udev rule for ipl device
We should be generating a udev rule for the ipl device; it'll
be enabled anyway.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:26:42 +02:00
Hannes Reinecke 1362641310 95dasd_rules: print out 'rd.dasd' commandline
When a DASD is found to be required for the rootfs we should
be printing out a 'rd.dasd' commandline parameter. This not
only enables us to correctly enable the device with cio_ignore,
we can also inspect the resulting initrd to figure out which
devices are required to mount the rootfs.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:26:39 +02:00
Hannes Reinecke e5d21b80c0 95dasd_rules: fixup rd.dasd parsing
There were some errors when rd.dasd parsing, resulting in the
device never to be activated. And we should check for
cio_ignore even if a udev rules has been found.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:26:36 +02:00
Hannes Reinecke 5d1ea2d726 Correctly set cio_ignore for dynamic s390 rules
When converting 'rd.zfcp' and 'rd.dasd' into udev rules we
need to make sure the enable those device ids via cio_ignore,
otherwise the rules might never be called.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:26:33 +02:00
Hannes Reinecke 856d039ba4 95dasd_rules: enable parsing of rd.dasd= commandline parameter
Dracut documents the 'rd.dasd=' parameter, so we should be
enabling the usage of this parameter, too.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:26:30 +02:00
Hannes Reinecke 55c763b1ff Add new s390x-specific rule files
With the new s390x configuration tool the naming of the udev
rules files have changed. So add these to the existing ones
to be compatible with existing and new installations.

References: bnc#856585

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:26:27 +02:00
Hannes Reinecke c8e531239b 95zfcp_rules: Auto-generate udev rule for ipl device
We should auto-generate an udev rule for the ipl device; it'll be
enabled anyway.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:06:05 +02:00
Hannes Reinecke 624f173cbd 95zfcp_rules: print out rd.zfcp commandline parameter
When called with '--hostonly-cmdline' the module should print
out the configuration.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:06:02 +02:00
Hannes Reinecke 9be4be7aa7 95zfcp_rules: Fixup rd.zfcp parsing
There were some errors when parsing rd.zfcp, causing the device
never to be activated.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:05:59 +02:00
Hannes Reinecke bbca3891ed Correctly set cio_ignore for dynamic s390 rules
When converting 'rd.zfcp' and 'rd.dasd' into udev rules we
need to make sure the enable those device ids via cio_ignore,
otherwise the rules might never be called.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2017-06-23 21:05:55 +02:00
Lukas Nykryn 0c4c9792c8 dracut-lib: put together CMDLINE even if /proc/cmdline does not exist 2017-06-21 14:14:06 +02:00
Daniel Molkentin e3189ab123 98dracut-systemd: Fix module force loading with systemd
This used to work only when specified via the command line
or if systemd was not being used. However, the exisistence of
20_force_driver.conf also requires dracut-pre-udev.service
to be run.

Reference: bsc#986216
2017-06-16 16:58:12 +02:00
Harald Hoyer cf9a4e0c73 network: fix dhcp classless_static_routes
removed copy&paste artifact "modify_routes add"

there is no modify_routes() function, and we simply want the output
of the parse function.

(cherry picked from commit 33710dfbfc)
2017-06-14 15:22:18 +02:00
Lukas Nykryn 63c7b358f5 fips: add cmac kernel module
cmac is now marked as fips_allowed

Resolves: rhbz#1460865
2017-06-13 10:29:54 +02:00
Lukas Nykryn a0e3794b2a systemd: include systemd-tmpfiles-setup.service
... because otherwise nothing will actually
apply configuration from tmpfiles snippets
2017-06-08 15:06:34 +02:00
Prarit Bhargava fd24c90c36 module-setup.sh: Add ARM specific driver to initramfs image
If a hisi_sas storage device is used as / during system install, the
resulting installation will not boot because the hisi_sas driver is not
included in the initramfs.

The Hisilicon storage driver needs to be added to the initramfs image for
aarch64 kernels.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: dzickus@redhat.com
Cc: dmarlin@redhat.com
Cc: wefu@redhat.com
Cc: harald@redhat.com
2017-06-06 13:39:43 +02:00
Harald Hoyer 1856ae95c8 handle rpcbind /run/rpcbind directory 2017-06-06 13:38:29 +02:00
Harald Hoyer 3cea065819 mdraid: wait for rd.md.uuid specified devices to be assembled
This patch uses wait_for_dev "/dev/disk/by-id/md-uuid-${uuid}" for the
specified uuids.

On timeout only md devices are force started which are specified by
uuid, or all, if rd.auto was specified.

Fixes https://github.com/dracutdevs/dracut/issues/227
2017-05-16 11:37:27 +02:00