Commit Graph

2910 Commits (049)

Author SHA1 Message Date
Harald Hoyer 1e00295a15 Merge pull request #229 from jwrdegoede/master
drm: Install pwm modules on all architectures
2017-05-15 11:37:45 +02:00
Hans de Goede feaaee4278 drm: Install pwm modules on all architectures
At least on x86 on Bay and Cherry Trail devices the pmw-lpss modules must
be in the initrd too, otherwise the i915 driver will still load, but
it will report the following error:

[drm:pwm_setup_backlight [i915]] *ERROR* Failed to own the pwm chip

And not register /sys/class/backlight/intel_backlight and users will
not be able to control their backlight.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2017-05-14 23:24:46 +02:00
Adam Williamson 892b1fe6b7 Handle curl using libnssckbi for TLS (RHBZ #1447777)
curl in Fedora recently changed its default CA trust store. The
Fedora package no longer specifies an OpenSSL-format bundle file
during build, and curl itself has been patched to use an NSS
plugin called libnssckbi.so when no bundle file or directory is
specified. There are (at present) two possible providers of the
libnssckbi.so module: the original NSS implementation, which
uses a trust bundle built in at build time, and a compatible
implementation from the p11-kit project, which reads a trust
bundle at run time. So if we find a string in libcurl.so that
suggests libnssckbi might be in use, we must both install it and
make an effort to install any trust bundle files it may use.

The p11-kit libnssckbi implementation does include a string that
lists the top-level trust directories it will use, so we try to
find that string, though the best effort I can come up with will
also find many false positives too. To weed out the false
positives, we check whether the matches actually exist as dirs,
and if so, whether they contain some specific subdirectories we
know p11-kit trust dirs must have (thanks, @kaie). For the NSS
libnssckbi implementation, we will likely wind up not finding any
dirs that match the requirements, so we will simply install the
libnssckbi.so file itself, which is the correct action.

This fixes TLS transactions in the initramfs environment when
using a curl that's built this new way; it's significant for
use of kickstarts and update images with the Fedora / RHEL
installer, as these are retrieved in the initramfs environment,
and are frequently retrieved via HTTPS.
2017-05-11 10:13:22 -07:00
Jason Dana ab66ef2d4a Check the proper variable for a custom IMA keys directory 2017-04-27 07:55:58 -04:00
Bryn M. Reeves cc4e507322 lvm_scan.sh: use -K when calling lvchange
The --ignoreactivationskip/-K switch was added to LVM2 in 2.02.99
(July 2013) and is used to control the activation of volumes with
the activation skip flag set: without -K these volumes will be
ignored when 'lvchange -ay $LV' is issued.

This prevents an LVM2 thin-privisioned snapshot from being used
as the root device when booting with rd.lvm.lv=vg/lv since the
activation skip flag is set for these snapshots by default (the
legacy non-thinp snapshots do not set this flag and can already
be activated and used as a root device by specifying appropriate
values for rd.lvm.lv).

This is only used in the rd.lvm.lv case since in that situation
we are activating one or more named LVs specified by the user:
the flag is not given when calling 'vgchange' since this may
cause many unwanted volumes to be activated during early user
space. Users wishing to use a specific snapshot volume should
specify it with 'rd.lvm.lv'.
2017-04-26 14:15:15 +01:00
Harald Hoyer fafb4c0182 Merge pull request #210 from Calrama/gpg-smartcard
crypt-gpg: For GnuPG >= 2.1 support gpg keyfile decryption via a OpenPGP smartcard in a CCID reader
2017-04-19 09:09:14 +02:00
Harald Hoyer 0096157e14 Merge pull request #214 from pallotron/master
Look for IPv6 RA in wait_for_ipv6_dad, wait_for_ipv6_dad_link and wait_for_ipv6_auto
2017-04-11 13:40:27 +02:00
Harald Hoyer 9998940493 Merge pull request #217 from FGrose/overlayfs
dmsquash-live-root: Avoid mount source conflict on $BASE_LOOPDEV.
2017-04-11 13:39:27 +02:00
Frederick Grose ea765c0ee1 dmsquash-live-root: Avoid mount source conflict on $BASE_LOOPDEV.
The newer mount utilities are more strict about directly shared
devices. For OverlayFS boots, which mount $BASE_LOOPDEV directly,
avoid a mount error by indirectly sharing the read-only base
filesystem through a second, over-attached $BASE_LOOPDEV for
the DM live-base target.
2017-04-09 11:23:12 -04:00
pallotron 031e2f7bb8 more ipv6 improvements 2017-04-05 00:23:36 -07:00
pallotron a0545765e8 remove prints 2017-04-05 00:16:16 -07:00
pallotron 96b708e178 more ipv6 improvements 2017-04-05 00:15:16 -07:00
pallotron 4c3d99f966 enabling some ipv6 config before running wait_for_ipv6_dad 2017-04-04 12:59:45 -07:00
pallotron c603419030 wait for IPv6 RA if using none/static IPv6 assignment 2017-04-04 08:31:21 -07:00
Harald Hoyer a63cc421a5 Merge pull request #211 from Calrama/embedded-keyfile
crypt: Support keyfiles embedded in the initramfs
2017-03-31 11:41:19 +02:00
Moritz Maxeiner b4cf58f038 crypt: Fix indentation for embedded keyfile 2017-03-30 15:06:01 +02:00
Moritz Maxeiner 0e1b686b83 crypt-gpg: Include module if CCID smartcard support requested 2017-03-30 14:54:26 +02:00
Moritz Maxeiner 0982fcb2e5 crypt-gpg: Rework setup for CCID smartcard support 2017-03-30 14:17:05 +02:00
Harald Hoyer 041e49ee2a network: enhance team support
Install ifcfg-* files with team configuration in the initramfs.

Improve the slave configuration of the team interface, by looking up
ifcfg files in the initramfs.

Create a default loadbalance team config, if none present in the
initramfs.

forward port of
4c88c2859e
2017-03-30 11:50:35 +02:00
Harald Hoyer 811a070d6c network: differ between ipv6 local and global tentative
For dhcpv6, only a non-tentative scope local address is needed.

(cherry picked from commit 42dd8928a8)
2017-03-30 11:34:51 +02:00
Harald Hoyer 5401d1f86f network:wait_for_ipv6_auto() wait for all tentative addresses
(cherry picked from commit 13264563a9)
2017-03-30 11:34:51 +02:00
Harald Hoyer e8dc8c4d89 network/net-lib.sh: auto6 wait for route ra
Wait for a router advertised route

(cherry picked from commit 6d22a6860e)
2017-03-30 11:34:51 +02:00
Harald Hoyer 25895a7769 Merge pull request #129 from imran1008/bond-mtu
add 'mtu' parameter for bond options
2017-03-30 11:03:04 +02:00
Harald Hoyer 144a3d85d0 Merge pull request #162 from dracut-mailing-devs/20160607094008.21012-1-colin@mageia.org
systemd: add more groups to deal with tmpfiles handling.
2017-03-30 11:01:55 +02:00
Harald Hoyer e6390b5a70 Merge pull request #163 from dracut-mailing-devs/1711921.0d4JtWs6XN@linux-lm3i.site
Fix wrong keymap inclusion
2017-03-30 11:01:22 +02:00
Harald Hoyer 8078a9c8ea Merge pull request #165 from dracut-mailing-devs/1476286367-30606-1-git-send-email-chad.dupuis@cavium.com
fcoe: Allow more time for the bnx2x link negotiation before brining u…
2017-03-30 11:00:00 +02:00
Harald Hoyer 2931eaa800 Merge pull request #176 from danimo/pinctrl-cherryview
Always try to add pinctrl-cherryview
2017-03-30 10:59:18 +02:00
Harald Hoyer 1f1aa43573 Merge branch 'FGrose-overlayfs' 2017-03-30 10:55:17 +02:00
Harald Hoyer 1dd68c2f23 Merge branch 'overlayfs' of https://github.com/FGrose/dracut into FGrose-overlayfs 2017-03-30 10:53:22 +02:00
Harald Hoyer ca6be905f0 Merge pull request #178 from danimo/cifs_ntlm_auth
Add md4 and arc4 modules for ntlm
2017-03-30 10:50:16 +02:00
Harald Hoyer b2f751db04 Merge pull request #198 from danimo/degraded_md_raid
Allow booting from degraded MD RAID arrays
2017-03-30 10:30:19 +02:00
Harald Hoyer 6eb80b3278 Merge branch 'master' of github.com:dracutdevs/dracut 2017-03-30 10:15:22 +02:00
Harald Hoyer 0042f2568d Merge branch 'remove-test-dependencies' of https://github.com/danimo/dracut into danimo-remove-test-dependencies 2017-03-30 09:21:50 +02:00
Moritz Maxeiner 98047e08d0 crypt-gpg: Add README describing the procedure of moving from
password-only gpg keyfile to password/smartcard gpg keyfile
2017-03-30 02:18:39 +02:00
Moritz Maxeiner 2a1723ed83 crypt-gpg: For GnuPG >= 2.1 support OpenPGP smartcards 2017-03-30 02:18:39 +02:00
Moritz Maxeiner 1fc68b989d crypt: Support keyfiles embedded in the initrd
For rd.luks.key=keypath:keydev:luksdev, keydev being '/' will
assume the initrd contains the keyfile.
2017-03-30 02:14:31 +02:00
Peter Robinson 917e1b6b5b Add check for aarch64 to the arm kernel module list
This adds the same list of drivers we use for arm platforms for
aarch64 too, also add the DMA drivers there too as they can add
sigficant performance for some storage/usb and often need to be
present when the storage drivers load.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2017-03-23 14:59:15 +00:00
Peter Robinson eec49634d4 Add aarch64 to drm modules along side ARM
Add aarch64 to modules, also update the drivers checked for latest
kernel changes.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2017-03-23 14:51:48 +00:00
Harald Hoyer bd4aa25741 Merge pull request #199 from lnykryn/bz1416958
ifup: don't ifup team master indefinitely
2017-03-21 13:33:41 +01:00
Harald Hoyer 7a44fea98c Merge pull request #201 from lnykryn/bz1415004
network/ifup: write override file before dhcp_do
2017-03-21 13:33:20 +01:00
Frederick Grose 3c6337f68e dmsquash-live-root: Extend rd.live.overlay.readonly support
Support the rd.live.overlay.readonly option for writable images,
such as rd.live.overlay=none and rd.writable.fsimg.
2017-03-11 19:14:26 -05:00
Frederick Grose f1b65e92af dmsquash-live-root: Provide enhanced feedback on missing overlay.
Provide a more prominent alert to the user if an overlay is
missing or the overlay module is not available and a temporary
overlay will be provided.  This, to avoid losing data intended to
persist.
2017-03-11 00:43:05 -05:00
Frederick Grose ea28824027 Enable the use of the OverlayFS for the LiveOS root filesystem.
Integrate the option to use an OverlayFS as the root filesystem
into the 90dmsquash-live module for testing purposes.

The rd.live.overlay.overlayfs option allows one to request an
OverlayFS overlay.  If a persistent overlay is detected at the
standard LiveOS path, the overlay & type detected will be used.

Tested primarily with transient, in-RAM overlay boots on vfat-
formatted Live USB devices, with persistent overlay directories
on ext4-formatted Live USB devices, and with embedded, persistent
overlay directories on vfat-formatted devices. (Persistent overlay
directories on a vfat-formatted device must be in an embedded
filesystem that supports the creation of trusted.* extended
attributes, and must provide valid d_type in readdir responses.)

The rd.live.overlay.readonly option, which allows a persistent
overlayfs to be mounted read only through a higher level transient
overlay directory, has been implemented through the multiple lower
layers feature of OverlayFS.

The default transient DM overlay size has been adjusted up to 32 GiB.
This change supports comparison of transient Device-mapper vs.
transient OverlayFS overlay performance.  A transient DM overlay
is a sparse file in memory, so this setting does not consume more
RAM for legacy applications.  It does permit a user to use all of
the available root filesystem storage, and fails gently when it is
consumed, as the available free root filesystem storage on a typical
LiveOS build is only a few GiB.  Thus, when booted on other-
than-small RAM systems, the transient DM overlay should not overflow.

OverlayFS offers the potential to use all of the available free RAM
or all of the available free disc storage (on non-vfat-devices)
in its overlay, even beyond the root filesystem available space,
because the OverlayFS root filesystem is a union of directories on
two different partitions.

This patch also cleans up some message spew at shutdown, shortens
the execution path in a couple of places, and uses persistent
DM targets where required.

Documentation is updated for these changes.
2017-03-11 00:42:19 -05:00
Cristian Rodriguez ccf948f2ab systemd 233 requires sha256, hmac and algif_hash modules 2017-03-03 15:01:56 +01:00
Lukas Nykryn 196bb03477 write-ifcfg: do't write MTU twice for regular eth devices
If MTU is specified, we write it for every type of device in the
beginning. There is not point writing it again for Type=ethernet
devices.
2017-03-01 14:46:12 +01:00
Daniel Molkentin 285495814b Drop dependency on bridge-utils 2017-02-14 14:10:24 +01:00
Lukas Nykryn 73fb5e769b network/ifup: write override file before dhcp_do
Commit cf376023e6 moved writing .resolv.conf and .override
after dhcp_do, because dhcp_do was overwriting .resolv.conf. But .override does not have
such problem and on the contrary dhcp_do reads .override file if it is present. So let\'s
move it back.

https://bugzilla.redhat.com/show_bug.cgi?id=1415004
2017-02-07 17:09:41 +01:00
Peter Robinson 0c5e5f271b modules: kernel: add more usb controller modules
There's a number of usb controllers that are common yet aren't
contained in the host directory. Include these for generic host.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2017-02-07 10:06:53 +00:00
Peter Robinson e752d42de9 modules: kernel: add phy and power modules to generic initrd
The phy and power modules are needed by some of the recent ARM
devices that have appeared like CHIP and some exynos devices.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2017-02-03 10:24:30 +00:00
Lukas Nykryn 6ed73e37f2 ifup: don't ifup team master indefinitely
https://bugzilla.redhat.com/show_bug.cgi?id=1416958
Thanks to martin.moore@hpe.com for the patch
2017-02-02 13:02:10 +01:00
Daniel Molkentin f1c790495b Allow booting from degraded MD RAID arrays
bnc#1017695
2017-01-30 11:29:08 +01:00
Harald Hoyer 4693daa5fa fips: honor $BOOT_IMAGE variable for HMAC check of the kernel
https://bugzilla.redhat.com/show_bug.cgi?id=1415032
2017-01-30 09:25:41 +01:00
Harald Hoyer 7c29d205f4 fips: use /lib/modules/$(uname -r)/modules.fips
if /lib/modules/$(uname -r)/modules.fips exists, use that list instead
of the hardcoded dracut module list.
2017-01-25 16:39:09 +01:00
Harald Hoyer 043d8f401b ifcfg/write-ifcfg.sh: write DEVICE=$netif for VLAN
VLAN interface configuration is not bound by HWADDR but by DEVICE
2017-01-18 16:23:45 +01:00
Harald Hoyer 05c2080e51 base/dracut-lib.sh: fixup trim()
no "--"
2017-01-18 16:22:26 +01:00
Harald Hoyer e7838a8312 network: fixup VLAN handling 2017-01-18 15:16:01 +01:00
Harald Hoyer dec4b2cdd4 base/dracut-lib.sh:trim() replace 'echo -n' 2017-01-18 15:15:23 +01:00
Harald Hoyer 2bd8b227de nfs: add chmod 2017-01-18 15:15:06 +01:00
Harald Hoyer 2949dcba29 base/dracut-lib.sh: add trim()
trim() to remove leading and trailing whitespace

(cherry picked from commit ac422d577c)
2017-01-18 13:29:32 +01:00
Harald Hoyer 0cf826a11a network: fix vlan handling 2017-01-18 13:28:47 +01:00
Harald Hoyer a1595cf5f9 network: parse multiple vlan parameters 2017-01-18 13:15:18 +01:00
Harald Hoyer 6aec6a7e2f network/net-genrules.sh: generate rules for all interfaces
previously, if "rd.neednet" and bond was specified, only the bond
interface was configured.

https://bugzilla.redhat.com/show_bug.cgi?id=1282680
(cherry picked from commit e6ae0c6128)
2017-01-18 13:15:18 +01:00
Harald Hoyer 1d832b4bf4 fips: precreate /dev/random /dev/urandom
otherwise libgcrypt might be unhappy, if used before devtmpfs is mounted

https://bugzilla.redhat.com/show_bug.cgi?id=1401444
2017-01-18 10:34:00 +01:00
Harald Hoyer 5ebf48d2ba nfs: dynamically chown /var/lib/rpcbind 2017-01-18 10:33:09 +01:00
Harald Hoyer 7e51a94f5b Do not "cp" the selinux context
replace "cp -a" with $DRACUT_CP, so in case the selinux policy disallows
root to set the selinux context in /var/tmp, dracut does not fail.
2017-01-16 14:27:39 +01:00
Harald Hoyer 73b9eaab1d crypt: with systemd cryptsetup is not needed 2017-01-16 14:27:39 +01:00
Denis Silakov 727e2a1d9d Make gateway processing POSIX-compliant 2017-01-13 18:44:40 +03:00
Denis Silakov b2f6409a22 Support multiple default gateways from DHCP server (rhbz#1408249) 2017-01-09 12:55:10 +03:00
Harald Hoyer a35fab2cf1 Merge pull request #186 from xlpang/workspace
Introduce "rd.memdebug=4" to test kernel module memory consumption
2016-12-05 09:29:57 +01:00
Tong Li 32f5af2f5e 95ssh-client: attempt to copy UserKnownHostsFile to kdump's initramfs
Bug related to this issue: https://bugzilla.redhat.com/show_bug.cgi?id=1360131
Now dracut only attempts to copy GlobalKnownHostsFile while generating kdump's
initramfs. This method will cause kdump's failure if users set customized
UserKnownHostsFile in /etc/ssh/ssh_config. This patch simply attempts to copy
those files too while going through /etc/ssh/ssh_config. Note that we need to
make sure ~/foo will be copied as /root/foo in kdump's initramfs.
2016-11-30 17:05:57 +08:00
Xunlei Pang 52c295c161 99base: apply kernel module memory debug support
Extend "rd.memdebug" to "4", and "make_trace_mem" to "4+:komem".
Add new "cleanup_trace_mem" to cleanup the trace if active.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
2016-11-27 12:09:10 +08:00
Xunlei Pang 34986d538a 99base: add memtrace-ko.sh to debug kernel module large memory consumption
The current method for memory debug is to use "rd.memdebug=[0-3]",
it is not enough for debugging kernel modules. For example, when we
want to find out which kernel module consumes a large amount of memory,
"rd.memdebug=[0-3]" won't help too much.

A better way is needed to achieve this requirement, this is useful for
kdump OOM debugging.

The principle of this patch is to use kernel trace to track slab and
buddy allocation calls during kernel module loading(module_init), thus
we can analyze all the trace data and get the total memory consumption.
As for large slab allocation, it will probably fall into buddy allocation,
thus tracing "mm_page_alloc" alone should be enough for the purpose(this
saves quite some trace buffer memory, also large free is quite unlikey
during module loading, we neglect those memory free events).

The trace events include memory calls under "tracing/events/":
  kmem/mm_page_alloc

We also inpect the following events to detect the module loading:
  module/module_load
  module/module_put

Since we use filters to trace events, the final trace data size won't
be too big. Users can adjust the trace buffer size via "trace_buf_size"
kernel boot command line as needed.

We can get the module name and task pid from "module_load" event which
also mark the beginning of the loading, and module_put called by the
same task pid implies the end of the loading. So the memory events
recorded in between by the same task pid are consumed by this module
during loading(i.e. modprobe or module_init()).

With these information, we can record the rough total memory(the larger,
the more precise the result will be) consumption involved by each kernel
module loading.

Thus we introduce this shell script to find out which kernel module
consumes a large amount of memory during loading. Use "rd.memdebug=4"
as the tigger.

After applying this patch and specifying "rd.memdebug=4", during booting
it will print out something extra like below:
0 pages consumed by "pata_acpi"
0 pages consumed by "ata_generic"
1 pages consumed by "drm"
0 pages consumed by "ttm"
0 pages consumed by "drm_kms_helper"
835 pages consumed by "qxl"
0 pages consumed by "mii"
6 pages consumed by "8139cp"
0 pages consumed by "virtio"
0 pages consumed by "virtio_ring"
9 pages consumed by "virtio_pci"
1 pages consumed by "8139too"
0 pages consumed by "serio_raw"
0 pages consumed by "crc32c_intel"
199 pages consumed by "virtio_console"
0 pages consumed by "libcrc32c"
9 pages consumed by "xfs"

From the print, we see clearly that "qxl" consumed the most memory.

This file will be installed as a separate executable named "tracekomem"
in the following patch.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
2016-11-27 12:09:10 +08:00
Daniel Molkentin e69da98de1 Add md4 and arc4 modules for ntlm
Some crashkernel targets still use legacy NTLM auth, which
require those (bsc#869496). This patch enumerates all dependent
hash algorithems, because even though most of them are probably
compiled in, older ones (e.g. md4 and arc4) usually aren't.
2016-11-17 16:56:53 +01:00
Daniel Molkentin 9ffab3f3a5 Always try to add pinctrl-cherryview
Contrary to previous intel pinctrl drivers, the cherryview driver can be
and usually is built as a module. However, it sets up the SDIO pinout
so sdhci can make use of the SD card reader, which may subsequently
hold a root file system on a card  (bsc#998440).
2016-11-15 11:59:05 +01:00
Thomas Renninger b1a39dbcc2 network: Try to load xennet
This makes dracut boot from NFS in a xen instance.

bnc#896464, bnc#896259

Signed-off-by: Thomas Renninger <trenn@suse.de>
2016-11-10 16:05:58 +01:00
Harald Hoyer fc44fdb5ac integrity/ima-policy-load.sh: s/echo -n/printf 2016-10-20 13:58:25 +02:00
Stefan Berger 479b5cd94f 98integrity: support validating the IMA policy file signature
IMA validates file signatures based on the security.ima xattr. As of
Linux-4.7, instead of cat'ing the IMA policy into the securityfs policy,
the IMA policy pathname can be written, allowing the IMA policy file
signature to be validated.

This patch first attempts to write the pathname, but on failure falls
back to cat'ing the IMA policy contents .

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
2016-10-13 23:02:40 +02:00
Harald Hoyer de7ab164dd dmsquash-live/dmsquash-live-root: det_img_fs() redirect udevadm output to stderr
Otherwise the output is taken as input for modprobe.
2016-10-13 09:20:33 +02:00
Chad Dupuis 3966a1e1ee fcoe: Allow more time for the bnx2x link negotiation before brining up fcoe interfaces.
bnx2x can take no longer than 3 seconds to initialize the link in some setups
which can cause fipvlan to fail and thus the fcoe interface(s) won't be
created.

Add another 10 seconds to give the link enough time to initialize.

Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com>
2016-10-12 19:02:39 +02:00
Brendan Germain a1ea214a87 add imjournal.so to read systemd journal 2016-10-11 08:51:13 -04:00
Brendan Germain 1d9d43713d subshell and set -f to prevent expansion 2016-10-11 08:50:37 -04:00
Brendan Germain b37b141ecc fixup No such file or directory errors when module is not configured 2016-10-11 08:43:20 -04:00
Brendan Germain 223547feab move start from udev to initqueue/online 2016-10-11 08:43:20 -04:00
Brendan Germain 3568d947db source dracut-lib for warn() 2016-10-11 08:43:20 -04:00
Brendan Germain ff6077789e correctly install rsyslog.conf template 2016-10-11 08:43:20 -04:00
Harald Hoyer 8205c25ef9 Merge pull request #150 from dm0-/master
qemu: include the qemu_fw_cfg kernel module
2016-10-10 11:28:09 +02:00
Harald Hoyer fea9be7ac1 Merge pull request #154 from honza801/patch-1
Update nfs-lib.sh
2016-09-02 10:07:21 +02:00
Harald Hoyer c85034c91f caps: make it a non default module 2016-09-02 07:51:55 +02:00
Harald Hoyer 00ca15abbf network: arping2 use 0.0.0.0 as source address 2016-09-02 07:51:55 +02:00
Harald Hoyer a84c391b87 kernel-modules: add nvme kernel module 2016-09-02 07:51:55 +02:00
Harald Hoyer 86eb0b1b83 dracut-systemd/dracut-mount.service: add DefaultDependencies=no 2016-09-02 07:51:55 +02:00
honza801 69c6435acd Update nfs-lib.sh
anaconda_nfsv6_to_var(): fix options parsing. $1 contains  : at the end, this is done by previous functions.
2016-09-01 15:37:58 +02:00
Dan Fuhry 1090a8826a livenet: support nfs:// urls in livenet-generator
This is a further improvement on PR #105 which re-adds support for nfs:// urls to root=live:nfs://... Symptoms prior to applying this patch are that sysroot.mount times out when following the nfs:// syntax for the path to the live image. An additional case is added to livenet-generator to support the nfs protocol.
2016-08-25 17:13:52 -04:00
Harald Hoyer 1a7b71bb14 network:ibft put IPv6 IP in brackets
ip=2620:0052:0000:2220:0226:b9ff:fe81:cde4::[2620:0052:0000:2220:0000:0000:0000:03fe]:64::ibft0:none

should be

ip=[2620:0052:0000:2220:0226:b9ff:fe81:cde4]::[2620:0052:0000:2220:0000:0000:0000:03fe]:64::ibft0:none

https://bugzilla.redhat.com/show_bug.cgi?id=1322592#c19
(cherry picked from commit b8e6c051c6)
2016-08-19 15:49:33 +02:00
Harald Hoyer f47090f918 url-lib: ca-bundle.crt changed to a symlink
use inst() instead of inst_simple()

/etc/pki/tls/certs/ca-bundle.crt is a symlink to
../../ca-trust/extracted/pem/tls-ca-bundle.pem

with inst() we install the original file also.

https://bugzilla.redhat.com/show_bug.cgi?id=1341280
(cherry picked from commit 1b23c6c65c)
2016-08-19 15:49:33 +02:00
Harald Hoyer e168eeef67 systemd/dracut-cmdline.sh: unset "UNSET" $root
https://bugzilla.redhat.com/show_bug.cgi?id=1365667
caused by commit 9aa224cc

(cherry picked from commit fc77aca7dd)
2016-08-19 15:49:33 +02:00
Xunlei Pang 242c03d6fb network: use require_any_binary instead of require_any_binaries 2016-08-19 13:39:37 +02:00
Harald Hoyer 88f9d6140d nfs: install all nfs modules non-hostonly
If nfs is used, we should include all nfs modules, in the case, where
$host_fs_types contains nfs.

(cherry picked from commit b077d18963)
2016-08-18 12:00:43 +02:00
Harald Hoyer 740c46c022 network: support macaddr in brackets []
ip=ens3:dhcp:1000
ip=ens3:dhcp::54:52:00:ab💿ef
ip=ens3:dhcp::[54:52:00🆎cd:ef]
ip=ens3:dhcp:1000:54:52:00:ab💿ef
ip=ens3:dhcp:1000:[54:52:00🆎cd:ef]

ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000
ip=192.168.122.20::192.168.122.1:24:test:ens3:none::54:52:00:ab💿ef
ip=192.168.122.20::192.168.122.1:24:test:ens3:none::[54:52:00🆎cd:ef]
ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000:54:52:00🆎cd:ef
ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000:[54:52:00🆎cd:ef]

ip=::::test:ens3:dhcp:1000
ip=::::test:ens3:dhcp::54:52:00:ab💿ef
ip=::::test:ens3:dhcp::[54:52:00🆎cd:ef]
ip=::::test:ens3:dhcp:1000:54:52:00:ab💿ef
ip=::::test:ens3:dhcp:1000:[54:52:00🆎cd:ef]

(cherry picked from commit 53e4ab7174)
2016-08-18 11:29:29 +02:00
David Michael 73db316ef2 qemu: include the qemu_fw_cfg kernel module
This adds support for /sys/firmware/qemu_fw_cfg on QEMU guests
started with the -fw_cfg option.
2016-08-16 13:43:18 -07:00
Lukas Nykryn 1c132d39a6 fips-module: add missing space 2016-07-28 12:33:03 +02:00
Harald Hoyer c45e856a65 add rd.emergency=[reboot|poweroff|halt]
specifies what action to execute in case of a critical failure
2016-07-22 14:51:03 +02:00
Harald Hoyer 9853791d37 network: use arping2, if available
fixes https://github.com/dracutdevs/dracut/issues/135
2016-07-14 14:36:04 +02:00
Harald Hoyer 5a3773dbe6 fcoe: check if needed for hostonly
(cherry picked from commit f45726652f)
2016-07-14 13:57:21 +02:00
Harald Hoyer 34a42f9f49 fs-lib: f2fs needs crc32 not crc32c
*sigh*
2016-07-08 10:01:52 +02:00
Harald Hoyer f8ff380bd5 fs-lib: add crc32c kernel module for f2fs 2016-07-07 09:43:48 +02:00
Florian Albrechtskirchinger 5d013e5e3c systemd: install missing drop-in configs
In host-only mode, install missing drop-in configuration files for
/etc/systemd/{journal.conf,system.conf}.
2016-07-06 07:27:37 +02:00
tpg 9f521f76a0 add support to F2FS filesystem (fsck) 2016-06-30 21:26:42 +02:00
Hannes Reinecke c98d1756f7 40network: Update iBFT scanning code to handle IPv6
IPv6 addresses should be specified in brackets so that the
ip= scanning code doesn't get confused.

References: bnc#887542

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.com>
2016-06-29 17:31:46 +02:00
Harald Hoyer f8242a6a60 fcoe/cleanup-fcoe.sh: don't copy shm files to state
with systemd version 230, this is not necessary anymore
systemd commit cacf980ed44a28e276a6cc7f8fc41f991e2ab354
because /dev/shm is selinux relabled.
2016-06-27 12:03:55 +02:00
Harald Hoyer 7e51abc81f network/dhclient.conf: add missing commata
options need to be seperated by ,
2016-06-23 16:38:17 +02:00
Harald Hoyer c000a21c25 dracut-systemd/*.service: conflict with shutdown target
make reboot/poweroff/halt work

also conflict with emergency.target
2016-06-23 16:37:53 +02:00
Harald Hoyer 8261d2367e systemd: add missing -.slice unit 2016-06-22 18:11:28 +02:00
Fabian Vogt 18729719a7 Fix wrong keymap inclusion
For MAP=lt, dracut would choose lt.std.map instead of lt.map.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
2016-06-17 15:03:28 +02:00
Harald Hoyer 3847bd450d systemd: add udev.hwdb and udev.conf 2016-06-08 16:47:41 +02:00
Harald Hoyer 8fce2c4d5e dracut-systemd/dracut-emergency.sh: call shutdown-emergency hooks
if no rd.shell is given
2016-06-07 14:47:27 +02:00
Harald Hoyer 9e19c0512d Revert "network: remove awk call and replace it with a shell function"
This reverts commit 71867b665c.

network needs posix shell
2016-06-07 14:27:35 +02:00
Harald Hoyer 4e882b8090 use shutdown-emergency hook in testsuite to poweroff the machine 2016-06-07 14:27:03 +02:00
Colin Guthrie 99b70a787c systemd: add more groups to deal with tmpfiles handling.
Both 'utmp' and 'root' groups are mentioned in tmpfiles.d/systemd.conf
and as such should be included.

It's probably better to have something equiv to inst_rule_group_owner()
for udev rules which parses out users and groups and adds them to the
passwd/group db respectively.

Could also rely on sysusers but as the initramfs is static in this
sense, it's more efficient to pre-define the users IMO.
2016-06-07 12:04:13 +02:00
Harald Hoyer 71867b665c network: remove awk call and replace it with a shell function
changes commit 4fa5c235a7
2016-06-07 11:15:07 +02:00
Harald Hoyer f3355208f9 Merge pull request #137 from dracut-mailing-devs/1461665111-7385-2-git-send-email-xlpang@redhat.com
1461665111 7385 2 git send email xlpang@redhat.com
2016-06-07 11:08:12 +02:00
Nicolas Chauvet 2602a74edf dracut: Add drivers/clk by default on arm
This will bundle clock drivers into the initramfs on arm

Tested on ti dm8148-t410 where adpll is needed on 4.6+ kernel
This will avoid to rely on (maybe broken) bootloader clocks.

Theses modules are also usually loaded early. Having them bundled into
the initramfs will avoid lot of deferred probes and others delay.

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
2016-06-07 10:48:49 +02:00
Harald Hoyer d4efc0aeee systemd-initrd: add initrd-root-device.target 2016-05-25 15:07:08 +02:00
Imran Haider 292548be6e add 'mtu' parameter for bond options
Signed-off-by: Imran Haider <imran1008@gmail.com>
2016-05-16 00:16:47 -04:00
Alexander Kurtz 016613c774 dracut-systemd/dracut-cmdline.sh: Don't error out if there is no root= argument.
Thanks to systemd's gpt-auto-generator [0] (which implements the Discoverable
Partitions Specification [1]), it is no longer necessary to always specify the
root= argument.

However, dracut would still refuse to boot if there was no root= argument (or
if it was set to the special value "gpt-auto" [2]). This commit stops dracut
from aborting the boot process in these cases and simply lets systemd do its
magic.

[0] https://github.com/systemd/systemd/blob/v229/src/gpt-auto-generator
[1] https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/
[2] https://github.com/systemd/systemd/blob/v229/src/gpt-auto-generator/gpt-auto-generator.c#L928
2016-05-06 17:53:36 +02:00
Harald Hoyer ab4cccf2a7 Merge pull request #126 from AnchorCat/volatile-journal
systemd: ensure journal is volatile
2016-05-04 09:25:37 +02:00
Michael Chapman 5dea430e08 systemd: ensure journal is volatile
If journald.conf already contains Storage=persistent, journald will
write to /var/log/journal/, which ends up at /run/initramfs/log/journal/
after switching root. We want to make sure early boot logs are written
to /run/log/journal/ so they can be flushed to /var/log/journal/ after
switching root.
2016-05-04 10:49:56 +10:00
Elan Ruusamäe bb44294b62 ensure parent dir for /usr/lib/initrd-release exists 2016-04-27 13:08:42 +03:00
Xunlei Pang 4fa5c235a7 network/net-lib.sh: delete duplicated DNS items from "/etc/resolv.conf"
Users can pass the DNS information throught "nameserver=" cmdline,
there maybe duplicated inputs.

"/etc/resolv.conf" have some restrictions on the number of DNS items
effective, so make sure that this file contains no duplicated items.

We achieve this by simply making the file have no duplicated lines.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
2016-04-26 13:03:30 +02:00
Xunlei Pang cf376023e6 network: dhcp before parsing specified dns through cmdline
I met a problem when passing kdump dns to dracut via "nameserver=x.x.x.x",
the dns I provided didn't appear in the "/etc/resolv.conf".

After some debugging, found that when setup dhcp DNS, in setup_interface()
and setup_interface6(), it has:
    echo "search $search $domain" > /tmp/net.$netif.resolv.conf

So if "$search $domain" isn't NULL(this is ture in my kdump environment),
the dns contents(that is, dns1, dns2, nameserver) in "ifup" before dhcp
will be discarded.

This patch addresses it by handling dhcp first. In fact this is also the
way the NetworkManager in 1st kernel works.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
2016-04-26 13:03:30 +02:00
Guido Trentalancia 5f91ed0b53 dracut: 10i18n: support default loadkeys/setfont data paths using symbolic links
Avoid keymap/font not found error when loadkeys/setfont
are compiled with the default data directory path.

Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
2016-04-21 14:14:31 +02:00
Harald Hoyer bf75218e45 watchdog: start traversing the device tree from the right directory
start with the device subtree, not with the parent of it
2016-04-18 15:50:42 +02:00
Harald Hoyer fe83231e30 watchdog: clean return of installkernel()
return 0, otherwise if _alldrivers is empty, the return code is fail
2016-04-18 15:50:33 +02:00
Harald Hoyer 3f60444ec1 removed obsolete kernel module functions and host_modules variable
module_is_host_only()
find_kernel_modules_by_path()
find_kernel_modules()
2016-04-15 16:48:13 +02:00
Harald Hoyer fa295f0bcd dracut_install: honor --silent flag 2016-04-15 15:25:27 +02:00
Harald Hoyer 9d74747f92 drop to shell on die() if rd.shell=1 is set explicitly 2016-04-15 12:03:03 +02:00
Harald Hoyer 74e2d1e69f watchdog/module-setup.sh: rewrite
- use local variables with _
- use associative array for the kernel modules
- install emergency hook even in the systemd case
- follow device path until /sys is reached
- set kernel version for modprobe checking
2016-04-15 11:47:59 +02:00
Harald Hoyer ad438af207 Merge pull request #121 from dracut-mailing-devs/2751555c29f26f69a63888745513edeceb39d416.1458099200.git.panand@redhat.com
Install kernel module for active watchdog
2016-04-15 10:56:31 +02:00
Guido Trentalancia f3f019d947 95resume: avoid possible symbolic link creation error on bootup
Avoid symbolic link creation error.
2016-04-15 10:38:04 +02:00
Harald Hoyer db7d61cff7 base/init.sh: don't mount /run with noexec, if the initramfs lives there
If the initramfs was built with prefix=/run/... /run can't be mounted
with noexec, otherwise no binary can be run.

Guard against it by looking where /bin/sh is really located.
2016-04-14 14:58:34 +02:00
Harald Hoyer b99e72427b Revert "fcoe: no need to copy lldpad state"
This reverts commit e93ff1cf9a.

seems like the file has to be copied back in the real root.

https://bugzilla.redhat.com/show_bug.cgi?id=1246217
2016-04-14 13:38:24 +02:00
Harald Hoyer 7ef36aef28 plymouth/plymouth-pretrigger.sh: also trigger acpi subsystem
Trigger the acpi subsystem. This will ensure hv_vmbus gets loaded before
plymouth is started, which will make the graphics device become
available before plymouth is started too (and the keyboard ! which might
also be important for plymouth in some setups).

https://bugzilla.redhat.com/show_bug.cgi?id=1218130
(cherry picked from commit d2846fdcce9b8de0edecdf0e06a4b86fc8de542c)
2016-04-13 14:11:17 +02:00
Harald Hoyer 8d9ab2755d Fix regressions with dracut-install with kernel modules
Make sure, the same modules are installed as before.
2016-04-13 11:47:20 +02:00
Harald Hoyer 794b2d2c75 Use dracut-install to install kernel modules
dracut-install can now install kernel modules and their corresponding
firmware files.
2016-04-11 16:32:10 +02:00
Ville Skyttä bcabe0fe25 Clean up some bashisms from /bin/sh scripts 2016-03-28 11:52:14 +03:00
Ville Skyttä dec3dfa4b3 nfs/module-setup.sh: Use colon instead of dot for chown user/group separator 2016-03-28 11:39:36 +03:00
Ville Skyttä 9430ae301e Do not use deprecated egrep/fgrep 2016-03-28 11:38:34 +03:00
Pratyush Anand e343c85763 watchdog: ensure that module is loaded as early as possible
It is expected that a watchdog module will disable an active watchdog when
its probe is called ie, when it is loaded. So an early load of the module
will help to disable it earlier.
This can be helpful in some corner cases where kdump and watchdog daemon
both are active.

Testing:
    -- When watchdog kernel modules were added
	# dracut --no-hostonly initramfs-test.img -a watchdog
	# lsinitrd initramfs-test.img -f etc/cmdline.d/00-watchdog.conf
 	rd.driver.pre=iTCO_wdt,lpc_ich,

Signed-off-by: Pratyush Anand <panand@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Harald Hoyer <harald@redhat.com>
2016-03-16 05:05:51 +01:00
Pratyush Anand 3aac682744 watchdog: install module for active watchdog
Recently following patches have been added in upstream Linux kernel, which
(1) fixes parent of watchdog_device so that
/sys/class/watchdog/watchdogn/device is populated. (2) adds some sysfs
device attributes so that different watchdog status can be read.

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6551881c86c791237a3bebf11eb3bd70b60ea782
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=906d7a5cfeda508e7361f021605579a00cd82815
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=33b711269ade3f6bc9d9d15e4343e6fa922d999b

With the above support, now we can find out whether a watchdog is active or
not. We can also find out the driver/module responsible for that watchdog
device.

Proposed patch uses above support and then adds module of active watchdog
in initramfs generated by dracut for hostonly mode. Kernel module for
inactive watchdog will be added as well for none hostonly mode.

When an user does not want to add kernel module, then one should exclude
complete dracut watchdog module with --omit.

Testing:
-- When watchdog is active watchdog modules were added
	# cat /sys/class/watchdog/watchdog0/identity
	iTCO_wdt
	# cat /sys/class/watchdog/watchdog0/state
	active
	# dracut --hostonly initramfs-test.img -a watchdog
	# lsinitrd initramfs-test.img | grep iTCO
	-rw-r--r--   1 root     root         9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko
	-rw-r--r--   1 root     root        19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko

-- When watchdog is inactive then watchdog modules were not added
	# cat /sys/class/watchdog/watchdog0/state
	inactive
	# dracut --hostonly initramfs-test.img -a watchdog
	# lsinitrd initramfs-test.img | grep iTCO

-- When watchdog is inactive, but no hostonly mode, watchdog modules were added
	# cat /sys/class/watchdog/watchdog0/state
	inactive
	# dracut --no-hostonly initramfs-test.img -a watchdog
	# lsinitrd initramfs-test.img | grep iTCO
	-rw-r--r--   1 root     root         9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko
	-rw-r--r--   1 root     root        19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko

Signed-off-by: Pratyush Anand <panand@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Harald Hoyer <harald@redhat.com>
2016-03-16 05:05:51 +01:00
Pratyush Anand 89da227de9 watchdog: Do not add hooks if systemd module is included
When systemd is present, let it manage watchdog feed.

Signed-off-by: Pratyush Anand <panand@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Harald Hoyer <harald@redhat.com>
2016-03-16 05:05:51 +01:00
Harald Hoyer 556ff7c76a dracut-systemd/dracut-pre-pivot.sh: Break at switch_root only for bare rd.break
similar to commit ddfea6b54c

Previously, any rd.break=breakpoint would cause a break at the
given breakpoint and also at switch_root.
2016-03-07 12:38:23 +01:00
Harald Hoyer cb6d49bc9d Merge branch 'master' of github.com:haraldh/dracut 2016-02-29 15:07:41 +01:00
Harald Hoyer caf12d6717 network/dhclient-script.sh: add classless-static-routes support
https://bugzilla.redhat.com/show_bug.cgi?id=1260955
(cherry picked from commit a48ea27deb)
2016-02-29 15:01:50 +01:00
Evgeny Vereshchagin 4ab6447c2a base/init.sh: don't remove 99-cmdline-ask on 'hostonly' cleanup
How to reproduce:
host# ./dracut.sh -o 'dracut-systemd systemd systemd-initrd' --local -f ./initramfs.img

host# qemu-system-x86_64 -initrd ./initramfs.img \
    -append 'root=/dev/sda1 rd.cmdline=ask rd.hostonly=0' \
    ...

Enter additional kernel command line parameter (end with ctrl-d or .)
> rd.break
> .
...
There is no "Break before switch_root"
...

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2016-02-15 13:57:27 +00:00
Evgeny Vereshchagin eddca3c9c2 dracut-systemd/dracut-cmdline-ask: fix dracut --kernel-cmdline=rd.cmdline=ask
How to reproduce:

host# dracut --kernel-cmdline='rd.cmdline=ask' initramfs.img
host# qemu-system-x86_64 -initrd initramfs.img ... -append root=/dev/sda1 ...
...

qemu-host# journalctl -b | grep dracut-cmdline-ask
...
Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: Installed new job dracut-cmdline-ask.service/start as 42
Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: ConditionKernelCommandLine=rd.cmdline=ask failed.
Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: Starting requested but condition failed. Not starting unit.
Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: Job dracut-cmdline-ask.service/start finished, result=done
...

Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
2016-02-15 08:47:47 +00:00
Harald Hoyer 6bc2096cf5 kernel-modules: join instmods and install all usb/storage 2016-01-26 14:59:28 +01:00
Harald Hoyer b4dd861a0b kernel-modules: add usb-storage
To save the rdsosreport.txt to a USB stick, the usb-storage module is
needed
2016-01-26 14:56:05 +01:00
Harald Hoyer f4f8fb5c10 network: if rd.neednet=0 we don't need a bootdev
otherwise dracut would wait for the bootdev interface to appear and be
setup
2016-01-26 12:26:03 +01:00
Harald Hoyer 9542f2fee4 network: add mtu to list of variables to store in override 2016-01-19 15:12:39 +01:00
Harald Hoyer 24a78b2697 Fixed vlan, bonding, bridging, team logic
Call ifup for the slaves and assemble afterwards.
2016-01-19 11:35:23 +01:00
Pekka Wallendahl 28058a2e37 multipath: fix majmin_to_mpath_dev()
* Multipath device names only start with the mpath-prefix if the option
  use_userfriendly_names is set true in /etc/multipath.conf and if user
  has not set any aliases in the said file. Thus the for-loop should go
  through all files in /dev/mapper/, not just ones starting with 'mpath'

* Bash is perfectly capable to extend `/dev/mapper/*` notation without a
  need to pass it to an external ls

* Changed the function to use a local variable $_dev instead of the
  global $dev, which seemed to be the original intention as the local
  _dev was defined but not used
2016-01-18 20:28:22 +02:00
Harald Hoyer efbc47b8e4 network/net-lib.sh: correctly set mac address for ip=...:<mtu>:<mac>
if ip=...:<mtu>:<mac> was specified, macadress was not set
2016-01-13 13:43:38 +01:00
Harald Hoyer e93ff1cf9a fcoe: no need to copy lldpad state
/dev/shm should be available later on by the normal switch root bind mount.
2016-01-07 10:44:31 +01:00
Harald Hoyer 3f5e60bfc9 Merge pull request #109 from puleglot/fix_dev_unit_name
base/dracut-lib.sh:dev_unit_name() guard against $dev beginning with "-"
2016-01-07 10:13:45 +01:00
Harald Hoyer 07149fe6be nbd: add missing generator 2016-01-07 09:56:36 +01:00
Alexander Tsoy c41df7e1db base/dracut-lib.sh:dev_unit_name() guard against $dev beginning with "-"
crypt/parse-crypt.sh generate initqueue job which always call
dev_unit_name() with an argument beginning with "-". This results
in the following error:

dracut-initqueue[307]: + systemd-escape -p -cfb4aa43-2f02-4c6b-a313-60ea99288087
dracut-initqueue[307]: systemd-escape: invalid option -- 'c'
2016-01-05 22:59:52 +03:00
Harald Hoyer b070c1d360 nbd: add systemd generator and use nbd export names instead of port numbers
Add a systemd generator for root=nbd:.. so that systemd has a correct
sysroot.mount unit.

Use export names instead of port numbers, because port number based
exports are deprecated and were removed.
2015-12-14 15:19:53 +01:00
Harald Hoyer df95b1003c network: fix carrier detection
rename iface_has_link() to iface_has_carrier() to clarify usage

Only assign static "wildcard interface" settings, if the interface has a
carrier.

If the interface name was specified with a name, do not do carrier
checking for static configurations.
2015-12-14 15:19:53 +01:00
Harald Hoyer efd3a6db74 livenet/module-setup.sh: only include systemd generator if systemd included 2015-12-14 15:19:53 +01:00
Harald Hoyer 4bcd41389c systemd: include machine-info 2015-12-14 15:19:53 +01:00
Harald Hoyer 8d26b5661e kernel-modules: include all HID driver in hostonly mode
If a kernel is updated in the undocked state and later on docked, some
keyboard modules can be missing.

Thus include all HID drivers.
2015-12-09 14:14:46 +01:00
Harald Hoyer ce9a398771 dmsquash-live/dmsquash-live-root.sh: SQUASHED can be set earlier
8b5ee88ff6 removed the check for SQUASHED,
assuming, that the if clause above was the only place, where SQUASHED is
set.

This patch reverts to the old logic, because SQUASHED can be set
earlier.
2015-12-01 08:52:00 +01:00
Harald Hoyer 54e09dfb72 shutdown: guard against read-only /run
remount the switch rooted /run writeable again.
2015-11-30 11:27:03 +01:00
Harald Hoyer 88ba9372be livenet/livenet-generator.sh: mode 0755 2015-11-27 09:44:24 +01:00
Harald Hoyer 5d8d0ac814 dmraid/61-dmraid-imsm.rules: add nowatch option for udev
udev rereads partitions, if watch is set for disks
2015-11-26 17:46:03 +01:00
Harald Hoyer 6ed1d9fd07 dmsquash-live/dmsquash-live-root.sh: fixed typo 2015-11-26 15:50:39 +01:00
Harald Hoyer eb242ada05 dmraid/61-dmraid-imsm.rules: remove double "," 2015-11-25 14:21:33 +01:00
Harald Hoyer 4916bf1a58 lvm: silence errors from "lvm dumpconfig"
if the config option does not exist, we ignore the error anyway
2015-11-25 14:21:33 +01:00
Harald Hoyer 87e90d7f4a For rd.hostonly=0 remove all initqueue/finished files also
This helps booting systems with changed configuration
2015-11-25 14:21:33 +01:00
Harald Hoyer 1a2290ea79 Revert "systemd: if kdbus is available, include the kernel module"
This reverts commit 90ff5ad67e.

There will be no kdbus anymore :-/
2015-11-23 11:08:06 +01:00
Harald Hoyer 03de49609c Merge pull request #97 from FGrose/dmsquash-live-root
dmsquash-live-root:  Persistence without overlay for uncompressed live installations
2015-11-23 11:07:43 +01:00
Frederick Grose 8b5ee88ff6 dmsquash-live-root: Avoid an overlay for persistent, uncompressed, read-write live installations.
Persistent, uncompressed live installations can avoid overlays with a new rd.live.overlay=none flag.
Non-persistent rd.live.ram boots can also take advantage of persistent home.img filesystems.
2015-11-20 23:38:12 -05:00
Antony Messerli a455ad1c27 livenet: add livenet-generator
Resolves issues where systemd attempts to boot a live URL as an NFS mount.

This patch uses systemd's generator arg[2] to generate an early sysroot.mount
that preempts systemd-fstab-generator.

See https://bugzilla.redhat.com/show_bug.cgi?id=1280103
2015-11-19 08:10:03 -06:00
Harald Hoyer 2da041d672 Check for systemd before installing systemd specific files
https://bugzilla.redhat.com/show_bug.cgi?id=1282010
2015-11-16 09:41:26 +01:00
Harald Hoyer 602dce9ff2 iscsi/parse-iscsiroot.sh: reload udev rules
in the DHCP case udev is already running, so reload the rules before
continuing.
2015-11-13 16:37:48 +01:00
Zhiguo Deng 7527b90c88 Check rd.zfcp= format in dracut hook:cmdline process stage
When using rd.zfcp= parameter in generic.prm file, wrong format
parameters will prevent the zfcp driver to add the correct SCSI
disk. dracut should die when a wrong rd.zfcp= parameter supplied.

Signed-off-by: Zhiguo Deng <bjzgdeng@linux.vnet.ibm.com>
2015-11-13 14:02:19 +01:00
dyoung@redhat.com 6870007674 Revert "Let user specify the action after fail"
This reverts commit 9d787df196

action_on_fail is useless thus remove the commits for it one by one.

Signed-off-by: Dave Young <dyoung@redhat.com>
2015-11-13 13:22:34 +01:00
dyoung@redhat.com d6dfde7830 Revert "99fs-lib/fs-lib.sh: Let user specify the action after fail for fsck"
This reverts commit 679fa7ed3c.

action_on_fail is useless thus remove the commits for it one by one.

Signed-off-by: Dave Young <dyoung@redhat.com>
2015-11-13 13:22:34 +01:00
dyoung@redhat.com 946722e465 Revert "dracut-emergency.service: do not start for "action_on_fail=continue""
This reverts commit b78e6ac2c3.

action_on_fail is useless thus remove the commits for it one by one.

Signed-off-by: Dave Young <dyoung@redhat.com>
2015-11-13 13:22:34 +01:00
dyoung@redhat.com a95a727fdc Revert "systemd/emergency.service: do not run for action_on_fail=continue"
This reverts commit dcae873414.

action_on_fail is useless thus remove the commits for it one by one.

Signed-off-by: Dave Young <dyoung@redhat.com>
2015-11-13 13:22:34 +01:00
dyoung@redhat.com 927d1e28c9 Revert "rename kernel command line param action_on_fail to rd.action_on_fail"
This reverts commit 391d605790.

action_on_fail is useless thus remove the commits for it one by one.

Signed-off-by: Dave Young <dyoung@redhat.com>
2015-11-13 13:22:34 +01:00
dyoung@redhat.com 74c9fb947b Revert "Change the implementation of action_on_fail"
This reverts commit d2765b5175.

action_on_fail is useless thus remove the commits for it one by one.

Signed-off-by: Dave Young <dyoung@redhat.com>
2015-11-13 13:22:34 +01:00
Mei Liu dcc2a4344b Add awk and getopt as dependencies of znetconf
znetconf command is part of s390utils-base package. It depends on
awk and getopt.

This patch is used to fix the following error:

dracut:/#
znetconf -c

/usr/sbin/znetconf: line 70: awk: command not found
/usr/sbin/znetconf: line 1138: getopt: command not found

Signed-off-by: Mei Liu <liumbj@linux.vnet.ibm.com>
2015-11-13 13:18:11 +01:00
Harald Hoyer ed92ecaa3c iscsi: only systemctl try-restart iscsid, if systemd is used 2015-11-13 13:16:10 +01:00
Harald Hoyer 98e9db2755 iscsi/iscsiroot.sh: put variables in quotes
best practice
2015-11-13 13:15:05 +01:00
Harald Hoyer 35a666d02a dracut-systemd/rootfs-generator.sh: s/RequiresOverridable/Requires
RequiresOverridable will be deprecated
2015-11-13 10:13:08 +01:00
Harald Hoyer 5b43377d74 network/ifup.sh: skip empty nameserver values
(cherry picked from commit e658251173)
2015-11-11 16:49:47 +01:00
Harald Hoyer ecdee70c48 base/dracut-lib.sh:getargs() don't return 1 for empty values
getargs() is only used with real values and not booleans.

So, return the values only.

(cherry picked from commit d1f7f2ac04)
2015-11-11 16:49:09 +01:00
Harald Hoyer a49c1f049b network:wait_for_ifup() handle "NO-CARRIER" output
if "NO-CARRIER" is one of the flags, we surely have no link yet.

(cherry picked from commit f059985b14)
2015-11-11 16:47:09 +01:00
Harald Hoyer 79cb273dc0 iscsi/parse-iscsiroot.sh: correct handling if netroot isn't set
corrects bfe65f913a

(cherry picked from commit 7fd112f20e)
2015-11-11 16:46:54 +01:00
Harald Hoyer b5363e834a iscsi/iscsiroot.sh: handle iscsi_firmware in online and timeout queue
The return code of iscsi_firmware is broken, so set the marker
unconditionally.

(cherry picked from commit fd3eddf069)
2015-11-11 16:44:36 +01:00
Harald Hoyer 19b0065cac network/netroot.sh: better handling of $netroot and dhcp
if $netroot is emtpy, get it from cmdline

check cmdline directly for root=dhcp(6) and netroot=dhcp(6)

(cherry picked from commit 17cee31b11)
2015-11-11 16:44:29 +01:00
Harald Hoyer df087c45d8 iscsi/iscsiroot.sh: use all_ifaces_setup()
we want the route and gateway setup

(cherry picked from commit 7cddfbbadb)
2015-11-11 16:44:20 +01:00
Harald Hoyer 5d90ba4fca network: add all_ifaces_setup()
all_ifaces_up() is true, if all interfaces are up.

all_ifaces_setup() is true, if all interfaces are up and the gateways
and nameserver are setup.

(cherry picked from commit 63e75dc4cd)
2015-11-11 16:44:13 +01:00
Harald Hoyer e847a78bb6 network/dhclient-script.sh: fix RENEW
Remove check, if interface is already up. It is for RENEW.

new_prefix is apparently new_subnet_mask

(cherry picked from commit 52845b168d)
2015-11-11 16:44:01 +01:00
Harald Hoyer 73833796b4 network: move "ip=ibft" handling to network module
(cherry picked from commit b334c83e4a)
2015-11-11 16:38:49 +01:00
Harald Hoyer e803d076f8 iscsi/parse-iscsiroot.sh: only set initiator-name, if not empty
(cherry picked from commit eb87dc91d0)
2015-11-11 16:36:25 +01:00
Harald Hoyer 7d47178e0d livenet/livenetroot.sh: fixed error condition
copy&paste error

(cherry picked from commit b813b1b306)
2015-11-11 16:19:56 +01:00
Harald Hoyer 6cfdb5aa1f network/ifup: do DHCP for BOOTDEV
(cherry picked from commit 7316d68353)
2015-11-11 16:19:43 +01:00
Harald Hoyer 29b885b46e network/net-lib.sh: fix IPv6 route parsing
(cherry picked from commit a4c47ce0dd)
2015-11-11 16:19:36 +01:00
Harald Hoyer 42b4fc90f2 network/net-lib.sh: fix wait_for_if_up()
wait for <*UP*> and not "state UP"

state can be UNKNOWN

(cherry picked from commit d8572e0bf4)
2015-11-11 16:19:25 +01:00
Harald Hoyer b519ae7008 network/ifup: fix warning about not bringing interface up
(cherry picked from commit 70f3c07846)
2015-11-11 16:19:18 +01:00
Harald Hoyer 195b5d0725 cms/cmsifup.sh: do not use ifup -m
we don't want to bring the interface up several times

(cherry picked from commit 0852c38b7a)
2015-11-11 16:19:09 +01:00
Harald Hoyer 686f9675df network/ifup.sh: only use dhcp on unknown interfaces for ip=dhcp
(cherry picked from commit 7c24815034)
2015-11-11 16:18:04 +01:00
Harald Hoyer 26fbe97bbe network: also mark interfaces up with their MAC
(cherry picked from commit 53537f4d23)
2015-11-11 16:17:57 +01:00
Harald Hoyer 744c65939b network/ifup.sh: save return value of ifup
(cherry picked from commit b4006781e8)
2015-11-11 16:17:49 +01:00
Harald Hoyer 3632be079b iscsi/parse-iscsiroot.sh: restart iscsid with try-restart
(cherry picked from commit a6befb52eb)
2015-11-11 16:17:42 +01:00
Harald Hoyer 782e909eef iscsi/parse-iscsiroot.sh: handle firmware in online queue
(cherry picked from commit 7f59cbd318)
2015-11-11 16:17:33 +01:00
Harald Hoyer 27a5aecf56 network/ifup.sh:do_static(): error out, if IP is already assigned
(cherry picked from commit 32770ca79a)
2015-11-11 16:16:09 +01:00
Harald Hoyer 5193198dc9 network/ifup.sh:do_static(): error out, if interface could not be brought up
(cherry picked from commit 77f46adf5e)
2015-11-11 16:15:57 +01:00
Harald Hoyer a283636b83 dmraid: only scan once because of one device
(cherry picked from commit 80153acc0f)
2015-11-11 16:15:22 +01:00
Harald Hoyer 4483fff87c network/dhclient: exit arping immediatly, if we get an answer
(cherry picked from commit d6bfa7052a)
2015-11-11 16:15:07 +01:00
Harald Hoyer c04a321b92 network/net-lib.sh:ibft unset gateway or dns, if set to 0.0.0.0
(cherry picked from commit 942d60d8af)
2015-11-11 16:15:00 +01:00
Harald Hoyer 4a88aaff10 fcoe: cleanup lldpad
Resolves: rhbz#1246217
(cherry picked from commit 69c437dd1c)
2015-11-11 16:14:51 +01:00
Harald Hoyer dd8d161afe udev-rules: install 40-redhat.rules
(cherry picked from commit 0c0abf97cc)
2015-11-11 16:08:17 +01:00
Harald Hoyer 0c004c8e64 network/parse-ip-opts.sh: bind enx* interface to the MAC
do it automatically for the persistent naming scheme

(cherry picked from commit 2eb3b00133)
2015-11-11 15:58:12 +01:00
Harald Hoyer 9ab5ddf16a network/ifup.sh: arping for static IPv4 addresses
(cherry picked from commit 38180271c5)
2015-11-11 15:58:04 +01:00
Harald Hoyer 93b9885a65 network/ifup.sh: let dhcp client run in the background
we need to renew the lease

(cherry picked from commit fb2d643a38)
2015-11-11 15:57:53 +01:00
Harald Hoyer db7d739818 systemd/dracut-cmdline.sh: print out cmdline in one line
(cherry picked from commit 93a5a3d3ca)
2015-11-11 15:57:36 +01:00
Harald Hoyer bcbcacb5d6 iscsi: handle timeout case better
(cherry picked from commit bfe65f913a)
2015-11-11 15:56:27 +01:00
Harald Hoyer f5753e1861 iscsi/module-setup.sh: iscsid need /var/lib/iscsi
(cherry picked from commit f74b0a9f38)
2015-11-11 15:52:44 +01:00
Harald Hoyer 9af753c468 crypt: install drbg unconditionally in hostonly mode
older kernels had the drbg kernel module and didn't need it

(cherry picked from commit 89948e58fd)
2015-11-11 15:51:46 +01:00
Harald Hoyer 848edf22f0 multipath: install all multipath path selector kernel modules
By default, dracut only builds in dm-service-time into the initramfs as
that is the default multipath.conf path selector. If the user changes
the path selector to "round robin" on the fly and runs dracut, multipath
does not find any paths on boot and the user will be dropped into a
shell.

Apparently, in RHEL7 dracut defaults to "hostonly" mode, i.e. modules
not currently in use at the time dracut runs do not get built into
initramfs. This is definitely one case where this doesn't work. A change
to reconfigure multipath probably should not render the system
unbootable.

https://bugzilla.redhat.com/show_bug.cgi?id=1195392
(cherry picked from commit f11d7a81e2)
2015-11-11 15:46:39 +01:00
Harald Hoyer 3913d061c4 livenet: don't attempt to download the image for every interface
https://bugzilla.redhat.com/show_bug.cgi?id=1152485
(cherry picked from commit e5f4bbd804)
2015-11-11 15:45:41 +01:00
Harald Hoyer cca313fa75 fcoe/fcoe-edd.sh: cleanup the script
- check if modprobe was successful
- add a timeout for /sys/firmware/edd
- only remove the module, if it was loaded by the script

(cherry picked from commit 34203d03c0)
2015-11-11 15:45:14 +01:00
Chris Leech 9a5bd6804a fcoe: EDD parsing patch for i40e
(cherry picked from commit 4031a2fa64)
2015-11-11 15:45:10 +01:00
Chris Leech 4891d9a2ce fcoe: start with fcoemon instead of fipvlan
(cherry picked from commit d02f522089)
2015-11-11 15:33:13 +01:00
Harald Hoyer 2448fbf17b network: add options to tweak timeouts
rd.net.dhcp.retry=<cnt>
     If this option is set, dracut will try to connect via dhcp
     <cnt> times before failing. Default is 1.

 rd.net.timeout.dhcp=<arg>
     If this option is set, dhclient is called with "-timeout <arg>".

 rd.net.timeout.iflink=<seconds>
     Wait <seconds> until link shows up. Default is 60 seconds.

 rd.net.timeout.ifup=<seconds>
     Wait <seconds> until link has state "UP". Default is 20 seconds.

 rd.net.timeout.route=<seconds>
     Wait <seconds> until route shows up. Default is 20 seconds.

 rd.net.timeout.ipv6dad=<seconds>
     Wait <seconds> until IPv6 DAD is finished. Default is 50 seconds.

 rd.net.timeout.ipv6auto=<seconds>
     Wait <seconds> until IPv6 automatic addresses are assigned.
     Default is 40 seconds.

 rd.net.timeout.carrier=<seconds>
     Wait <seconds> until carrier is recognized. Default is 5 seconds.

(cherry picked from commit d8ad687e1a)
2015-11-11 15:26:29 +01:00
Harald Hoyer 6138a45dd2 iscsi/parse-iscsiroot.sh: do not modify netroot
(cherry picked from commit 197e4c90b9)
2015-11-11 15:21:27 +01:00
Harald Hoyer 7391fef29a iscsi/iscsiroot.sh: handle firmware in online queue
otherwise it does not get called, if no netroot is set

(cherry picked from commit 3bd3bbec31)
2015-11-11 15:21:19 +01:00
Harald Hoyer ab57132aa5 initqueue: add online queue
(cherry picked from commit d3f61fb5cd)
2015-11-11 15:20:36 +01:00
Harald Hoyer 64c34f3459 dracut-systemd/module-setup.sh: remove duplicate vconsole wants
Adding the dependency on vconsole is already done in the 00systemd
module and the rescue.service has this already in the unit file.
2015-11-11 12:16:13 +01:00
Harald Hoyer 53a7384653 lvm: remove all quirk arguments
https://bugzilla.redhat.com/show_bug.cgi?id=742564

Once lvm2 starts using /run (bug 742554), it should be no longer
necessary to disable file-based locking in the vgchange call in
fedora-storage-init.
Removing '--sysinit' will make it safe to call LVM operations
concurrently from other units.

The --sysinit is a compound option consisting of:

  -> --ignorelockingfailure - not needed anymore, the /run/lock/lvm is
available rw soon in boot process

  -> --ignoremonitoring - not needed since /run is available, this would
require the dm-event.service to be run before
fedora-storage-init.service (and new lvm2-activation.service when
deployed). But that's a one line change - I'll have a look whether it
plays well with other services and if yes, I'll commit the change. N.B.:
This has a consequence that all volumes activated on vgchange -ay will
be monitored at the same time they're activated (which is a plus I
think). The lvm2-monitor will just grab all the other volumes not
activated at the time of the boot's vgchange -ay call. But that's not an
issue (for already monitored volumes, calling vgchange --monitor y will
just be a NOOP).

 -> --poll n - not needed, we can run the polldaemon as the /run is
available and rw (in case there's unfinished merge or mirror sync from
previous system run, the poll-daemon will be triggered at boot now).
Actually, the polldaemon should be triggered as a service like dmeventd
is, not forked off from the LVM command itself, like from vgchange in
this case - we still need to change this - there's a bug open for this
request already (bug #814857). However, we don't have this feature ready
yet so I need to check whether this is OK with the early boot process
with the current state.
2015-11-11 11:48:32 +01:00
Harald Hoyer c97209fe69 fips: add authenc and authencesn kernel modules
https://bugzilla.redhat.com/show_bug.cgi?id=1115112#c5
2015-11-11 11:48:32 +01:00
Harald Hoyer fc146519f9 Merge pull request #103 from FGrose/metadata
dmsquash-live-root: Use non-persistent metadata snapshots.
2015-11-11 11:36:47 +01:00
Frederick Grose 49c9d8174f dmsquash-live-root: Use non-persistent metadata snapshots.
Transient snapshots can take advantage of smaller,
   non-persistent metadata structures.
Make the --readonly option explicit rather than inferred
   for the readonly_overlay target.
Assure that the live-base target is on the BASE_LOOPDEV.
2015-11-09 10:46:27 -08:00
Frederick Grose 97be933592 dmsquash-live-root: Request overflow support for persistent snapshot. 2015-11-09 09:45:07 -08:00
Frederick Grose 0ea86cb727 dmsquash-live-root: Use non-persistent metadata snapshots for transient overlays.
Temporary snapshots can take advantage of smaller, non-persistent metadata structures.
Make the --readonly option explicit rather than inferred for the readonly_overlay target.
Assure that the live-base target is on the BASE_LOOPDEV.
2015-10-09 16:23:58 -04:00
yuwata 0888cf51ab systemd-networkd: fix typo in error message 2015-09-07 17:58:40 +09:00
yuwata 5cb1e0efea systemd-initrd: fix typo in error message. 2015-09-07 17:58:00 +09:00
Stijn Hoop 110858025a The default gateway might need a static route
Some hosting providers need a static route set in order to be
able to reach the default gateway. Be sure to retry adding
the default gateway after setting the static routes.
2015-08-23 14:45:53 +02:00
Harald Hoyer 6802cf2349 iscsi/iscsiroot.sh: handle timeout with all interfaces up
restart iscsid, because it may disbehaved
2015-08-13 11:53:21 +02:00
Harald Hoyer feb8dc685d iscsi/parse-iscsiroot.sh: use iBFT initiator name 2015-08-12 15:17:33 +02:00
Harald Hoyer d94050ddae iscsi: integrate with systemd and improve robustness
parse-cmdline sets up an initial initiator-name to let iscsid start.

iscsid is started before doing any iscsistart business.

iscsistart is done with systemd-run asynchrone to do things in
paralllel. Also restarted for every new interface which shows up.

If rd.iscsi.waitnet (default) is set, iscsistart is done only
after all interfaces are up.

If not all interfaces are up and rd.iscsi.testroute (default) is set,
the route to a iscsi target IP is checked and skipped, if there is none.

If all things fail, we issue a "dummy" interface iscsiroot to retry
everything in the initqueue/timeout.
2015-08-12 14:33:49 +02:00
Harald Hoyer f41720c311 base/dracut-lib.sh: forget about the idea of output redirection
It's just not working :-/
2015-08-12 14:28:45 +02:00
Harald Hoyer 8ba684be1c dracut-systemd/dracut-initqueue.sh: be verbose about timeout
Issue a warning, if timeout scripts are executed
2015-08-12 14:27:39 +02:00
Harald Hoyer 50e86bf02b nfs/parse-nfsroot.sh: silence useless warning if netroot is not nfs 2015-08-12 14:27:01 +02:00
Harald Hoyer 4e9ba952bf network/parse-ip-opts.sh: assume rd.neednet for multiple ip options
set rd.neednet on the kernel cmdline to disable this behaviour
2015-08-12 14:25:23 +02:00
Harald Hoyer b1b704bd67 systemd: add systemd-run and systemd-escape 2015-08-12 14:24:45 +02:00
Harald Hoyer 01b23b6900 network/net-lib.sh: add is_ip()
add function to test if string is a valid IP
2015-08-12 14:24:05 +02:00
Harald Hoyer e6a2555c7d base/dracut-lib.sh: Dup stdout and stderr
Dup stdout and stderr, so that subshell redirection does not affect
logging.

Also gets rid of systemd printing info() to the console on "quiet".
2015-08-10 13:40:43 +02:00
Mimi Zohar 4f50a9bfb1 Revert securitfs change
Commit 5e60145 use findmnt with "--source" or "--target" broke
mounting securityfs.  This patch reverts only the securityfs
portion of the patch.
2015-08-03 12:36:05 +02:00
Mimi Zohar 41ac16b26f Define new script to load keys on the IMA keyring (update)
This patch supports loading keys either on the _ima keyring or, as of
Linux 3.17, on the trusted .ima keyring.  Only certificates signed by
a key on the system keyring can be loaded onto the trusted .ima keyring.

Changelog:
- Update 98integrity/README
2015-08-03 12:36:05 +02:00
Mimi Zohar 396d3cc7ff Extend evm-enable.sh to load the EVM public key
Create the _evm keyring and load the EVM public key on it.
2015-08-03 12:36:05 +02:00
Mimi Zohar b05ad85b0c Remove 98integrity's dependency on selinux
Loading the EVM key(s) is not dependent on selinux.  Remove
the dependency.
2015-08-03 12:36:05 +02:00
Harald Hoyer 4135eea634 90qemu: fixed systemd-detect-virt output parsing
redirecting systemd-detect-virt to /dev/null doesn't help with parsing
the output :-/

Also, add "Red Hat" as a vendor.
2015-07-31 09:05:51 +02:00
Harald Hoyer cce34acace qemu: add spapr-vscsi kernel module 2015-07-28 11:55:04 +02:00
Harald Hoyer 607ff8204b Merge pull request #85 from Quarky9/master
40network/net-lib.sh: get_ip() Add missing echo to output the result
2015-07-27 13:40:53 +02:00
Harald Hoyer 2082cdf230 crypt: s/allow-discards/discard for crypttab
actually the option in crypttab is named "discard" and not
"allow-discards"

https://bugzilla.suse.com/show_bug.cgi?id=932972
2015-07-27 13:30:22 +02:00
Stefan Reimer c1c96f2c47 Add missing echo to output the result.
Only place this function is currently called seems from line 28 in modules.d/95nfs/nfs-lib.sh. Bug fix.
2015-07-25 01:17:04 +00:00
Harald Hoyer f4d64d55ea dmsquash-generator.sh: increase timeout for checkisomd5
if the checkisomd5 takes longer than 3 minutes, the device timeout for
/dev/mapper/live-rw cancels the boot process.
2015-07-18 13:02:25 +02:00
Harald Hoyer ff55a8939c Merge pull request #81 from floppym/printf2
Replace echo -n with printf in code with a /bin/sh shebang
2015-07-16 12:02:48 +02:00
Mike Gilbert 5899f2f516 Replace echo -n with printf in code with a /bin/sh shebang
POSIX does not mandate that echo support the -n parameter.
printf has more well-defined behavior.
2015-07-14 22:22:14 -04:00
Harald Hoyer e47907cc6b dracut-systemd/dracut-initqueue: only start service if really needed
Only start the dracut-initqueue.service, if the dracut_need_initqueue
command was issued on creation or later on set.
2015-07-13 10:51:47 +02:00
Harald Hoyer 968280e370 crypt: skip crypttab entries with the same device
It was only checked, if the name of the crypttab entry matched.
This patch adds checking, if the device matches.
2015-07-13 10:44:27 +02:00
Harald Hoyer df0bdd5ae9 network: add rd.peerdns=0 parameter
Add rd.peerdns=0 parameter to disable DHCP nameserver setting
2015-07-13 10:14:15 +02:00
Harald Hoyer 3721635b2c guard ${arrays[@]} with "" 2015-07-09 15:36:25 +02:00
Harald Hoyer 1cadc26fd4 Add all btrfs devices
We have to find them with "btrfs usage", which is cumbersome.
2015-07-09 15:36:25 +02:00
Harald Hoyer 78362bc5fe network/dhclient-script.sh: remove bashism 2015-07-08 08:49:02 +02:00
Harald Hoyer e860ef0e30 dracut-pre-mount.service should run before systemd-fsck-root.service 2015-07-07 13:45:19 +02:00
Andrei Borzenkov 6c9484f614 ensure pre-mount (and resume) run before root fsck
References:
https://bugzilla.suse.com/show_bug.cgi?id=906592
Signed-off-by: Thomas Renninger <trenn@suse.de>
2015-07-07 13:44:24 +02:00
Hannes Reinecke b8efaa0017 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>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2015-07-07 13:44:24 +02:00
Harald Hoyer 3d579309cd dmsquash-live/dmsquash-live-root.sh: fixup checkisomd5 for systemd
systemd does not like a leading "-" for unit template filenames anymore.
2015-07-07 13:44:13 +02:00
Harald Hoyer f621aeba65 Merge pull request #78 from dracut-mailing-devs/20150706073126.GC22559@dhcp-128-51.nay.redhat.com
90multipath: add hostonly multipath.conf in case hostonly mode
2015-07-07 13:16:27 +02:00
Harald Hoyer 59815841e9 Merge pull request #77 from dracut-mailing-devs/1435792513-2222-1-git-send-email-crrodriguez@opensuse.org
systemd: if kdbus is available, include the kernel module
2015-07-07 13:15:34 +02:00
Dave Young 77403e0032 90multipath: add hostonly multipath.conf in case hostonly mode
For large machine, suppose there's a lot of multipath devices, multipath layer
will use a lot of memory. For kdump kernel memory is very limited thus it causes
oom. To avoid oom, we only add necessary multipath devices in kdump kernel
multipath.conf.

This is done by use mpathconf --allow, a new option which is like whitelist.

Signed-off-by: Dave Young <dyoung@redhat.com>
2015-07-06 10:06:04 +02:00
Harald Hoyer 8d09f493a6 network/dhclient-script.sh: fixup lease time 2015-07-02 19:48:25 +02:00
Harald Hoyer ba665de454 nfs/nfs-lib.sh: add anaconda_nfsv6_to_var()
add "nfs:[[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]]/path" style parsing

https://bugzilla.redhat.com/show_bug.cgi?id=1190098
2015-07-02 15:24:03 +02:00
Harald Hoyer 57fb6e67de dracut-lib.sh:info() output info to stderr
otherwise it might collide with stdout redirection
2015-07-02 15:02:31 +02:00
Harald Hoyer 7cca5efdce network: don't use "ifup -m"
"ifup -m" was thought to be used by humans in the emergency shell.
Using it programatically shows some other flaw in the execution logic.

Also, "ifup -m" was configuring the interface multiple times on "add"
and "change" uevent, because the "$netif.did-setup" test was not
executed.
2015-07-02 11:36:33 +02:00
Harald Hoyer 0f89ec314b network/dhclient-script.sh: make IPv4 DHCP lease time optionally
If bootp is used, no lease time is provided in the packet from the bootp
server.
2015-07-02 11:36:33 +02:00
Harald Hoyer cf627b20d0 network/dhclient-script.sh: add RENEW/REBIND 2015-07-02 11:36:33 +02:00
Cristian Rodríguez 90ff5ad67e systemd: if kdbus is available, include the kernel module 2015-07-02 02:02:51 +02:00
Fabian Deutsch d4b93a092d Revert "lvm: Don't activate LVs with activationskip set"
This reverts commit cfa365a32d.

The logic in commit cfa365a was added to prevent (odl) lvms from
activating snapshots which should not be activated.
Newer lvms however do this automatically (not enabling an LV if the
the 'k' attribute set), thus we can revert the previous commit.
2015-06-25 12:11:15 +02:00
Harald Hoyer aca93e3364 uefi-lib: remove bogus comment 2015-06-23 15:29:43 +02:00
Harald Hoyer 231b3dd432 rootfs-generator: check for rootok, before doing any action 2015-06-23 15:29:43 +02:00
Harald Hoyer a97787c7b5 Merge pull request #73 from dracut-mailing-devs/1434358579-11674-1-git-send-email-lzhong@suse.com
dracut-lib.sh: typo fix
2015-06-15 11:31:53 +02:00
Harald Hoyer 2c66c3bccf dmsquash-live: add dmsquash-generator 2015-06-15 11:31:10 +02:00
Lidong Zhong e51e7978a8 dracut-lib.sh: typo fix
Signed-off-by: Lidong Zhong <lzhong@suse.com>
2015-06-15 11:05:18 +02:00
Harald Hoyer 8ff624df9f dmsquash-live: install a sysroot.mount generator for systemd
otherwise systemd uses its own sysroot.mount line
2015-06-11 17:39:31 +02:00