Commit Graph

3920 Commits (ca46c751d1becbbff68c561bfbc9ee36182fcc38)

Author SHA1 Message Date
Harald Hoyer ca46c751d1 add rd.device.timeout=<seconds> parameter 2016-07-01 12:29:15 +02:00
Harald Hoyer ca64eeec79 virtfs: use systemd generator
use a systemd generator, instead of a dracut hook to mount
2016-07-01 12:29:15 +02:00
Alexander Kurtz 9aa224cc19 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

(cherry picked from commit 016613c774)
2016-07-01 12:29:15 +02:00
Harald Hoyer 13264563a9 network:wait_for_ipv6_auto() wait for all tentative addresses 2016-07-01 12:29:15 +02:00
Harald Hoyer cc3f588071 network: flush only IPv4 addresses on configuration
also flush on dhcp
2016-07-01 12:29:15 +02:00
Harald Hoyer 42dd8928a8 network: differ between ipv6 local and global tentative
For dhcpv6, only a non-tentative scope local address is needed.
2016-06-30 11:10:35 +02:00
Harald Hoyer 6d22a6860e network/net-lib.sh: auto6 wait for route ra
Wait for a router advertised route
2016-06-30 08:52:09 +02:00
Hannes Reinecke bac74f05e3 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>
(cherry picked from commit c98d1756f7)
2016-06-29 18:26:58 +02:00
Xunlei Pang a320422588 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>
(cherry picked from commit 4fa5c235a7)
2016-06-29 17:27:36 +02:00
Harald Hoyer 5bc318633f 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>

cherry-pick of commit cf376023e6
2016-06-29 17:26:17 +02:00
Michael Chapman 53310e44c9 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.

(cherry picked from commit 5dea430e08)
2016-06-29 17:21:56 +02:00
Harald Hoyer a7805d1297 network/net-lib.sh(wait_for_ipv6_dad): simplify ip call
taken from initscripts
2016-06-29 17:19:06 +02:00
Harald Hoyer 435af39a00 network/net-lib.sh(parse_ifname_opts): support 21 byte MAC addrs
infiniband MAC addrs are 20 bytes long not 6

https://bugzilla.redhat.com/show_bug.cgi?id=1319270
2016-06-29 16:37:40 +02:00
Harald Hoyer 323093b621 test: add TEST-60-MTUMAC
test MTU and MACADDR setting
2016-06-29 15:51:42 +02:00
Harald Hoyer 61b5ee6d1d network: set MTU and MACADDR for dhcp and auto6 2016-06-29 15:13:35 +02:00
Harald Hoyer 55712f46c0 test: don't call ldconfig with -- path separator 2016-06-29 15:11:39 +02:00
Harald Hoyer 53e4ab7174 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]
2016-06-29 12:44:49 +02:00
Harald Hoyer b7f5e42c57 network/net-lib.sh: correctly set mac address for ip=...:<mtu>:<mac>
if ip=...:<mtu>:<mac> was specified, macadress was not set

(cherry picked from commit efbc47b8e4)
2016-06-29 12:15:12 +02:00
Harald Hoyer 603a0fe0a3 fcoe-up: remove initlog logic
(cherry picked from commit f60b7d8655)
2016-06-29 12:06:20 +02:00
Hannes Reinecke f105eaebb8 95fcoe: update fcoe interface check 2016-06-29 11:57:56 +02:00
Hannes Reinecke f501c955e8 95fcoe: Store current configuration in dracut cmdline
When running with --hostonly-cmdline we should be storing
the current configuration in /etc/cmdline.d so that dracut
will be configure the system automatically.

References: bnc#877288

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
(cherry picked from commit 8b257fcc86)
2016-06-29 11:54:19 +02:00
Hannes Reinecke b9668f8f00 95fcoe: skip VLAN devices in fcoe-up
DCB & fipvlan can only be called on real devices, not VLAN
ones. So skip any VLAN devices which might been added to the
list of network interfaces.

References: bnc#878583

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
(cherry picked from commit 0a68a26cff)
2016-06-29 11:51:05 +02:00
Hannes Reinecke a4cbfd719b 95fcoe: start lldpad separately
lldpad is a system-wide process, which must be started only once.
So we should be separate it from fcoe-up, as it might be called
several times.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
(cherry picked from commit 22e837b645)
2016-06-29 11:50:56 +02:00
Harald Hoyer 7335bd1e23 Defer modprobe of HW modules, until udev is running
Also honor blacklisting

(cherry picked from commit 437dad70e9)
2016-06-29 11:50:13 +02:00
Hannes Reinecke 26eeb4af8d 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>
(cherry picked from commit b8efaa0017)
2016-06-29 11:41:21 +02:00
Mike Gilbert d6b9aac6d0 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.

(cherry picked from commit 5899f2f516)
2016-06-29 11:40:14 +02:00
Thomas Renninger 3186a0aa15 dracut: nbd: Only complain of missing binary in hostonly mode if
rootfs is on nbd

In not hostonly mode, require_binaries will still complain.
If in hostonly mode and the module is explicitly added via -a nbd, then
install() section will still complain later:
dracut-install: ERROR: installing 'nbd-client'

Signed-off-by: Thomas Renninger <trenn@suse.de>
(cherry picked from commit e683985d10)
2016-06-29 11:34:26 +02:00
Harald Hoyer cc7d2eeb36 add "--install-optional" and install_optional_items
(cherry picked from commit 54b68829b6)
2016-06-29 11:28:23 +02:00
Harald Hoyer b4ad021d34 dracut: only use one tmpdir
also remove any partial written initramfs images
2016-06-29 11:25:12 +02:00
Harald Hoyer f45726652f fcoe: check if needed for hostonly 2016-06-29 10:50:58 +02:00
Harald Hoyer ced0638e2c Disable early microcode for non-x86 architecures 2016-06-29 10:45:58 +02:00
Harald Hoyer 8175f5eb82 test/TEST-02-systemd: use marker disk for successfull boot marker 2016-06-27 10:28:09 +02:00
Harald Hoyer 017c16b97a systemd: add -.slice and make reboot work
-.slice and conflicting with emergency.target and shutdown.target
makes reboot work
2016-06-27 10:27:05 +02:00
Harald Hoyer 320b8d5c0c network/dhclient.conf: add missing commata
options need to be seperated by ,

(cherry picked from commit 7e51abc81f)
2016-06-24 11:10:19 +02:00
Harald Hoyer 0b7c2400c3 TEST-50-MULTINIC: add multiple bond tests 2016-06-22 14:03:12 +02:00
Harald Hoyer fefb96f43f network/parse-bond.sh: handle multiple bond interfaces 2016-06-22 13:32:11 +02:00
Harald Hoyer 1472b5486b ifup: setup bridge, bonding and teaming only once
if those assembled interfaces use dhcp "$iface.up" is created too late
2016-06-10 16:24:24 +02:00
Harald Hoyer e6ae0c6128 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
2016-06-10 16:24:24 +02:00
Harald Hoyer ac422d577c base/dracut-lib.sh: add trim()
trim() to remove leading and trailing whitespace
2016-06-10 16:24:24 +02:00
Harald Hoyer 484aba4298 network: add 73-idrac.rules udev rules
idrac USB devices want a special network name
2016-06-08 16:19:12 +02:00
Harald Hoyer b14e0fb826 more dash removal 2016-05-27 11:22:38 +02:00
Harald Hoyer 863105bce1 dracut.spec: add a tag with the current version 2016-05-27 11:22:38 +02:00
Harald Hoyer 15ec719501 test/NBD: add checks for needed binaries 2016-05-27 11:22:38 +02:00
Harald Hoyer 249a94ab04 test: remove dash module, as it is not available in RHEL 2016-05-27 11:22:38 +02:00
Harald Hoyer 6656e1547f dracut-functions.sh: add str_starts() and str_ends() 2016-05-25 14:49:34 +02:00
Daniel Drake 688afe0fc3 kernel-modules: increase SDHCI driver inclusion
The sdhci-pci module is currently not being included in the initramfs,
even though other sdhci modules are. This breaks boot on systems that
rely on this driver to access the root filesystem.

Instead of looking for modules that use sdhci_pltfm_init, look for
sdhci_add_host. I checked 3.18 kernel sources, and this change
does not remove any of the previously-matched SDHCI drivers.
It should result in the addition of sdhci-pci, sdhci-s3c, sdhci-spear
and sdhci-acpi.

(cherry picked from commit 6dcc5e1158)
2016-05-25 14:40:40 +02:00
Harald Hoyer 8fb06a0562 shutdown: guard against read-only /run
remount the switch rooted /run writeable again.

(cherry picked from commit 54e09dfb72)
2016-05-23 12:49:32 +02:00
Hannes Reinecke 68021e85c9 95iscsi: parse output from iscsiadm correctly
Due to some obsure reason the IFS parameter is not set correctly
when evaluating get_ibft_mod(). So change the parsing to not rely
on IFS altogether.

References: bnc#886199

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2016-05-18 14:44:16 +02:00
Hannes Reinecke 12aa314819 95iscsi: More empty cmdline fixes
This fixes up some 95iscsi/module-setup.sh which might print out empty
commandline files.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2016-05-18 14:44:16 +02:00
Hannes Reinecke bff5416520 95iscsi: Fixup bnx2i offload booting
bnx2i is using a separate iSCSI offload engine with a separate
MAC address. As a result, the iBFT information is displaying
a MAC address which does not relate to any MAC address from
the network interfaces.
In addition, the iSCSI offload engine works independently on
the NIC, so we do not need to enable the NIC for iSCSI offload
to work.
This patch modifies the automatic iBFT detection to not set
the 'ip=ibft' flag when bnx2i offload is detected.

References: bnc#855747

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2016-05-18 14:44:16 +02:00