Commit Graph

2910 Commits (049)

Author SHA1 Message Date
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
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