Commit Graph

2409 Commits (0a66b74b51f7d58916504e0e8bb01b6e981b489b)

Author SHA1 Message Date
Harald Hoyer 28eae10b70 Split the systemd dracut module up
Basic systemd functionality is in 00systemd now.
Switching root and the initrd.target is in 00systemd-initrd.
Dracut additions to the systemd initrd are in 98dracut-systemd.
2015-03-19 10:07:37 +01:00
Harald Hoyer 363469d757 base/module-setup.sh: merge systemd conditional 2015-03-19 10:00:48 +01:00
Harald Hoyer dea0634544 lvm: add files needed for LVM system id support
The LVM system id support is recent addition to LVM. See
https://git.fedorahosted.org/cgit/lvm2.git/tree/man/lvmsystemid.7.in for
more information (since lvm v2.02.117, currently the configuration is
ignored, but we will enable it soon in next release).

https://bugzilla.redhat.com/show_bug.cgi?id=1199918
2015-03-16 11:55:13 +01:00
Harald Hoyer 1bcb63f97c systemd: add "adm" and "wheel" to passwd and group 2015-02-26 09:39:32 +01:00
Fabian Deutsch b0472eac11 dmsquash: Add squashfs support to rd.live.fsimg
Previously rd.live.fsimg only supported filesystems residing in
(compressed) archives.
Now rd.live.fsimg can also be used when a squashfs image is used.
This is achieved by extracting the rootfs image from the squashfs and
then continue with the default routines for rd.live.fsimg.
In addition some code duplication got removed and some documentation
got added.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
2015-02-19 10:59:54 +01:00
Fabian Deutsch d6e34d362a dmsquash: Add rd.live.overlay.thin
This option changes the underlying mechanism for the overlay in the
dmsquash module.
Instead of a plain dm snapshot a dm thin snapshot is used. The advantage
of the thin snapshot is, that the TRIM command is recognized, which
means that at runtime, only the occupied blocks will be claimed from
memory, and freed blocks will really be freed in ram.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
2015-02-19 10:59:54 +01:00
Jonas Jonsson 7075a402d7 99base: Properly remove files with rd.hostonly=0
Dracut will generate systemd units for additional devices that should be
brought up during boot, e.g. swap devices. These unit files are broken
symlinks with \ in the filename, e.g.
/etc/systemd/system/initrd.target.wants/dev-disk-by\x2duuid-e6a54f99\x2da4fd\x2d4931\x2da956\x2d1c642bcfee5e.device.

Both the backslash and the broken symlink causes problems for shell
scripts, [ -e "$file" ] isn't enough and read requires the additional -r
argument to not react on the \.
2015-02-19 10:58:18 +01:00
Lukas Wunner 5729ae8029 90dm/dm-shutdown.sh: dmsetup remove_all -> dmsetup remove
The function 99shutdown/shutdown.sh:_check_shutdown() assumes that
shutdown scripts report success or failure via their return value.
However, "dmsetup remove_all" always reports success, even if some
of the device mappings could not be removed.

I submitted a patch for dmsetup but the lvm2 folks rejected it,
asserting that its behaviour is correct, that "remove_all" should
only be used by developers and that the proper solution would be
to invoke "dmsetup remove" on each device. This does report success
or failure via the return value.

Apart from fixing that issue, this commit also adds the dmsetup
option "--noudevsync". Without it, dmsetup would hang after removal
of a device while trying to communicate with systemd-udevd, which
is no longer running at this shutdown stage.

[harald: replaces backticks with $() ]
2015-02-19 10:57:08 +01:00
Harald Hoyer 7e9341434f fips: add drbg kernel module 2015-02-19 10:45:35 +01:00
Harald Hoyer 70598ac292 lvm: add cache tools for dm-cache usage 2015-01-28 13:33:09 +00:00
Harald Hoyer 2a12e97475 network: do not destroy the team interface on teamd shutdown
when doing switch-root teamd gets killed, which tears down the team
interface, if teamd is not started with "-N".
2015-01-26 15:12:08 +00:00
Harald Hoyer 9dc0c244b8 dmraid: don't include MD rules in DM 2015-01-22 15:57:53 +01:00
Radek Vykydal 18423f7951 Add rd.live.overlay.size option 2015-01-21 14:10:27 +01:00
Daniel Drake 6dcc5e1158 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.
2015-01-21 14:10:26 +01:00
Harald Hoyer 7cddd7b838 network/net-lib.sh:parse_iscsi_root(): fix c&p bug
fix iscsi_target_name for eui.* and naa.* target names
2015-01-15 10:33:50 +01:00
Harald Hoyer 93342718cd network: add support for comma separated autoconf options
ip=eth0:auto6,dhcp

might work now
2015-01-14 11:41:48 +01:00
Harald Hoyer 4ba44e899c ssh-client: s/key/$key
GlobalKnownHostsFile was not installed, because key was not $key

Thanks Jan Stodola!
2015-01-12 14:21:33 +01:00
Harald Hoyer 36e8ce4fb0 net-lib.sh:parse_iscsi_root() fix target parsing
For targets with colons in the iSCSI target name:
  "iqn.2000-09.com.foo:storage-system.e2000:00000001cm1p1"

the parser was confused with the optional iscsi_iface_name and
iscsi_netdev_name.

This patch reintroduces the old IQN, EUI and NAA parsing and enhances
the fallback parser by checking the LUN for a numerical value.
2015-01-12 14:06:10 +01:00
Harald Hoyer 4089949033 fips: remove c&p "and" 2015-01-09 14:53:42 +01:00
Thomas Backlund eb8f202ed0 90kernel-modules: update for xhci module split in kernel 3.18
As reported in https://bugs.mageia.org/show_bug.cgi?id=14799

the xhci module got splitted up in upstream linux merged during
3.18 release cycle:

>From 29e409f0f7613f9fd2235e41f0fa33e48e94544e Mon Sep 17 00:00:00 2001
From: Andrew Bresticker <abrestic@chromium.org>
Date: Fri, 3 Oct 2014 11:35:29 +0300
Subject: xhci: Allow xHCI drivers to be built as separate modules

so we need to adjust 90kernel-modules accordingly.

Signed-off-by: Thomas Backlund <tmb@mageia.org>
2015-01-08 15:34:03 +01:00
Harald Hoyer ebc82d38b7 qemu: add virtio_rng kernel module 2015-01-08 13:19:43 +01:00
Harald Hoyer 3e7a05f2a5 systemd: add systemd-journald-audit.socket 2014-12-19 13:17:02 +01:00
Harald Hoyer 733c71ce9e resume: make use of systemd-hibernate-resume, if existant
In systemd mode, and if systemd-hibernate-resume exists, use it
exclusively.
2014-12-17 12:08:37 +01:00
Harald Hoyer a17d5cf494 Revert "95rootfs-block: Correctly terminate commandline parameter"
This reverts commit 4b6b46bb2a.

$ ./dracut.sh -l --print-cmdline
root=UUID=d5e53483-30bc-4119-8c0c-841d47a2f76brootflags=rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,inode_cacherootfstype=btrfs

instead of:

$ ./dracut.sh -l --print-cmdline
 root=UUID=d5e53483-30bc-4119-8c0c-841d47a2f76b
rootflags=rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,inode_cache
rootfstype=btrfs

and also

$ make testimage
…
 *** Store current command line parameters ***
Stored kernel commandline:
root=UUID=d5e53483-30bc-4119-8c0c-841d47a2f76brootflags=rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,inode_cacherootfstype=btrfs
…
2014-12-17 11:44:18 +01:00
Thomas Renninger e683985d10 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>
2014-12-16 13:29:37 +01:00
Hannes Reinecke 4b6b46bb2a 95rootfs-block: Correctly terminate commandline parameter
95rootfs-block would not terminate the commandline parameter with
a space or newline, instead it'll rely on the main routine from
dracut.sh to do this.
Which will cause unexpected problems for any modules called
after this.

So terminate the commandline parameters correctly here and remove
the newline from dracut.sh.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:37 +01:00
Thorsten Behrens fe116c1670 Don't create lots of empty cmdline files for hostonly-cmdline case
This aligns other places piping cmdline() output to cmdline.d files
with the earlier fix for 95rootfs-block.

Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:37 +01:00
Thorsten Behrens 7700b3df4c Also export root= boot param for hostonly-cmdline case.
If there's a root fallback, at least attempt to have it falling
back to the last root filesystem this system ran off of.

Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:37 +01:00
Thorsten Behrens 486030575d Fix non-export of journal dev boot options.
cmdline_journal does not contain linefeeds anymore, so read
silently skipped it altogether.

Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:37 +01:00
Hannes Reinecke ce8f354dbd 90kernel-modules: install scsi_dh_alua
Install the missing scsi_dh_alua module, too.

References: bnc#871617

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:37 +01:00
Hannes Reinecke a262ad91e8 99base: Add chown binary
nvidia driver needs this via modprobe script.
Needs to do change the group after a device node got created.
Add chown instead of chgrp which can also change the owner of a file.

Ask Stefand Dirsch <sndirsch@suse.de> for details.

Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:37 +01:00
Hannes Reinecke 681462eca8 40network: add missing _arch variable declaration
The module_setup.sh script was missing an '_arch' declaration,
causing network not to be installed on s390.

Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:37 +01:00
Thomas Renninger 9492008435 Enhance suse.conf and debug module example with SUSE-specific settings
SUSE is using specific settings for dracut, so add them
to the suse.conf.example file.

Add vi and find to the debug module add some help text to the suse.conf
file when and how to use it.

Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:37 +01:00
Hannes Reinecke 22e837b645 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>
2014-12-16 13:29:36 +01:00
Hannes Reinecke 0a68a26cff 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>
2014-12-16 13:29:36 +01:00
Hannes Reinecke 8b257fcc86 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>
2014-12-16 13:29:36 +01:00
Hannes Reinecke c64a94caa9 95fcoe: update fcoe interface check
The 'create' sysfs entry has been removed for newer fcoe modules,
so just check if the module directory exists.

References: bnc#877288

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:36 +01:00
Hannes Reinecke cd72830807 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>
2014-12-16 13:29:36 +01:00
Thomas Renninger 206345ce9b nfs: Add ip=... and root=nfs... parameters to internal dracut
cmdline

If the rootfs is an nfs mount, also know as nfsroot, add the correct
parameter to the dracut cmdline.

Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:36 +01:00
Thomas Renninger 5c84d51b3f 90lvm: Install dm-snapshot module
bnc#888530

Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:36 +01:00
Thomas Renninger 517d27a75f 99base: Increase initqueue timeout in non systemd case
In case of systemd is used the timeout already is set to 180s, compare
with file: modules.d/98systemd/dracut-initqueue.sh

Do the same if systemd is not used, e.g. in kdump case.

Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:36 +01:00
Hannes Reinecke 7c2311660f 99base: warn on invalid command for initqueue
When 'initqueue' is called with an invalid command it'll generate
invalid job scripts. This will lead to confusing error messages
later on.
So abort in these cases and print out a warning.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:36 +01:00
Thorsten Behrens bd44831b82 Generate fallback mount unit for root filesystem
If kernel cmdline has no root= provided, *and* the initrd carries
a default value, create a systemd mount unit to have it available
in /sysroot

References: bnc#855258

Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:36 +01:00
Thorsten Behrens e3eec4b8a2 Align dev_unit_name() with systemd's function.
Add more corner cases from systemd's
unit_name_from_path_instance() C function.

Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:36 +01:00
Hannes Reinecke 56663e7e32 Implement 'rd.timeout' to modify the device timeout
When generating units for devices the administrator might
want to use a different timeout than the default.
So implement a new parameter 'rd.timeout' for this.

References: bnc#878770

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:36 +01:00
Thomas Renninger f34a2ef14d iscsi: iscsi.initiator and others can and must only show up once
Make sure duplicates of iscsi.initiator vanish.
Only get one rd.iscsi.* paramter value. If getargs is used and several
parameters are parsed, one gets two values separated by whitespace in a
variable which breaks later code and is not suppported.

Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:36 +01:00
Hannes Reinecke c4d8793c67 95iscsi: generate commandline for software iscsi
When installing on an software iscsi root we need to generate
the correct commandline, otherwise the system cannot boot.

References: bnc#880108
Patch: 0093

When using software iscsi we should be using the existing
configuration from the system for the time being.

References: bnc#884768
Patch: 0095

Avoid bad ip route call on empty address
Patch: 0143

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:36 +01:00
Hannes Reinecke 54e28d79b9 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>
2014-12-16 13:29:36 +01:00
Hannes Reinecke 2e34f38095 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>
2014-12-16 13:29:36 +01:00
Hannes Reinecke 9ebf4a5d3c 95iscsi: strip one set of quotes when calling initqueue
The bad initqueue parameter passing is already addressed by git commit:
commit bb8c16d121
and
commit 486a8f33e2

However this appraoch is slightly different:
"$netroot" instead of "'$netroot'", etc.

initqueue will process the arguments, assuming the first non-option
argument to be the program to be executed. Putting the entire
commandline into this argument confuses both, initqueue and the
program in question.

References: bnc#879038

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:36 +01:00
Hannes Reinecke a3a2266046 95iscsi: Set correct iscsi_started value for iSCSI firmware
When iSCSI firmware booting is selected we should not rely on
'netroot' or 'iscsiroot' variables to be set.

References: bnc#873448

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:35 +01:00
Hannes Reinecke 4aad3438f7 95iscsi: Install libgcc_s library
iscsiuio is using pthread, which requires libgcc_s for
pthread_cancel to work.
Without this library iscsiuio will crash with SIGABRT.

References: bnc#881692

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:35 +01:00
Hannes Reinecke 442abd16d2 95iscsi: Autodetect iSCSI firmware
Some iSCSI initiator present firmware information in
/sys/firmware/ibft or /sys/firmware/iscsi_bootX

Whenever we detect one of those directories we should assume
that the iSCSI devices should be activated.

Also incorporates SUSE patches:
0049:
95iscsi: Use 'ip=ibft' for ibft autoconfiguration

For iBFT autoconfiguration we should be setting 'ip=ibft'
instead of rd.neednet. This should instruct dracut to only
enable the iBFT interfaces and leave the rest alone.

References: bnc#879038

0054:
95iscsi: update commandline printing

dracut has a separate callout 'cmdline' which should be used
for printing out the generated commandline.

Signed-off-by: Pavel Wieczorkiewicz <pwieczorkiewicz@suse.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:35 +01:00
Hannes Reinecke 8f4ee8c71b 90multipath: install correct multipath rules
The multipath and kpartx rules have different numbers in SUSE.

The 11-dm-mpath.rules file had been missing, causing
blacklisting to not work properly.

References: bnc#873151, bnc#872662, bnc#883149

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:35 +01:00
Hannes Reinecke 15eed1e4f1 95udev-rules: Include correct sg3_utils rules
sg3_utils now provides two rules 55-scsi-sg3_id.rules and
58-scsi-sg3_symlink.rules, which need to be included instead
of the older 59-scsi-sg3_utils.rules.

References: bnc#873151

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:35 +01:00
NeilBrown 36894743e3 Fixup mdraid setup
This sed script to edit 64-md-raid-assemble.rules needs to
be adjusted for latest mdadm

References: bnc#866660

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:35 +01:00
Thomas Renninger ae8e6ed5af systemd always tries to load autofs4
During boot systemd tries to load autofs4, but dracut will only
add it if it's loaded by the time dracut is run.
Modify dracut to always load autofs4.

References: bnc#869411

Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-12-16 13:29:35 +01:00
Harald Hoyer 1f8abe81a9 dmsquash-live: setup the images in /run/initramfs
We want to cleanup / after switch_root. Placing the loop files in /
works, but it is more sane to put them in /run/initramfs
2014-12-16 12:53:18 +01:00
Harald Hoyer 25b987fed6 Fixed the dracut-shutdown.service
Make the service a oneshot service, which remains after exit. This
ensures, that the ExecStop is executed later on, if a shutdown occurs.
2014-12-08 11:32:26 +01:00
Tom Gundersen ca4108b78e initrd-release: move from /etc to /usr/lib
This mimicks the similar move of os-release which was done in systemd. These
files are not configuration, but part of the OS.

Still symlinks are in place for compatibility, but those should probably be
dropped eventually.
2014-12-01 17:02:16 +01:00
Minfei Huang c440d302f1 40network: Fix the syntax to correct the judgment sentence
In the judgment sentence, it will print the following warning message,
becasuse of lacking the blank on the left of ']'.

/lib/net-lib.sh: line 110: [: missing `]'

Signed-off-by: Minfei Huang <mhuang@redhat.com>
2014-12-01 17:02:15 +01:00
Harald Hoyer 3ae03005b8 cms/cms-write-ifcfg.sh: turn SUBCHANNELS into lowercase 2014-12-01 15:04:53 +01:00
Harald Hoyer 99d4fd6bb7 do not symlink /var/log to /run/log
some programs e.g. systemd-journald expect a directory in /var/log as
the marker to do some actions. Here journald tries to flush
/run/log/journal to /var/log/journal, if the directory is seen.

/var/log is now a symlink to /run/initramfs/log.
2014-12-01 12:36:20 +01:00
Harald Hoyer fa45d0d9c9 base/init.sh: ignore exclamation mark for kmod static-nodes
newer versions add an exclamation mark for the type, to mark it to be
created on boot only.
2014-12-01 11:50:00 +01:00
Harald Hoyer 3659d64df3 fips: add libfreeblpriv3.so and libfreeblpriv3.chk 2014-11-28 15:32:17 +01:00
Harald Hoyer 370035d561 dmsquash-live: do not abort, if user pressed ESC on checkisomd5
If the user pressed ESC while checkisomd5 runs the media check, it will
exit with "2". Previously that would mean, that the media check was not
successful.
2014-11-25 13:44:54 +01:00
Harald Hoyer 2b2033e561 multipath/multipathd.service: add more Conditions
Do not start multipathd on rd.multipath=0 rd_NO_MULTIPATH and if there
is no multipath.conf.
2014-11-25 13:23:21 +01:00
Hannes Reinecke 78a78e4239 90multipath: install dracut-specific service file
The multipathd package might install a service and a socket
file. Using the original service file from the installed
system without the socket file triggers a bug in systemd,
causing systemd to crash.

As we don't actually need to socket file in the initrd we
should be installing our own service file which does not
reference the socket file at all.

References: bnc#871610

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-11-25 13:21:03 +01:00
Hannes Reinecke 856f8265aa 90multipath: Load device_handler modules early during boot
The device handler modules need to be loaded early during boot
to avoid I/O errors being printed to the system log.

References: bnc#871617

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-11-25 13:21:03 +01:00
Hannes Reinecke cf864c1b80 90multipath: Install libgcc_s library
multipathd is using pthreads, which require libgcc_s for
pthread_cancel to work. Without it multipathd might crash
with SIGABRT.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2014-11-25 13:21:02 +01:00
Harald Hoyer 778b354360 multipath: add "rd.multipath=0" option 2014-11-20 11:27:40 +01:00
Colin Guthrie af67d62151 base: Set udevd log level via environment var to cover early startup.
udevd will these days default to 'info' logging and thus will
often print out the 'starting version nnn' message (which is
logged at level 'info'), thus spamming the console, even on
'quiet' boots.

We generally expect a udev log level of err (the old default
from pre-October 2013) so we should set that explicilty before
launching udevd in order to suppress the spurious 'info' message.

As we are using the environment variable approach anyway, we
may as well use this method rather than setting the log level
later via udevadm control commands when rd.udev.info/debug are
given on the kernel command line.

The enviroment variable has been around since udev 6b493a20e1
around 2005 so should be safe to use in all cases without version
checks.
2014-11-12 13:25:27 +01:00
Harald Hoyer 027565d023 systemd: add 90-vconsole.rules
run systemd-vconsole-setup if fbcon device shows up
2014-11-06 10:44:33 +01:00
Minfei Huang 56d2aed1c8 40network: Copy the customize dhcp config
It is not available to valid the customize dhcp config
/etc/dhclient.conf in the initram environment.

Dracut uses the default follow config to construct the initramfs.

request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, domain-search, host-name,
        root-path, interface-mtu;

Copy the customize config to make the config availably in the
initram environment.

Signed-off-by: Minfei Huang <mhuang@redhat.com>
2014-10-29 14:13:50 +01:00
Peter Robinson 27dcc3a583 kernel-modules: Drop explicit modules that are found with block_module_filter
The usb_storage, nvme and sdhci_acpi modules are discovered with the
block_module_filter so there's no need to explicitly list them here.

Signed-off-by: <pbrobinson@gmail.com>
2014-10-29 14:13:49 +01:00
Harald Hoyer 5cac9e14ec shutdown.sh: correct return code of _check_shutdown()
fix commit b09faad877, which reversed the return code
2014-10-29 13:56:55 +01:00
Harald Hoyer 84125ddae1 Merge pull request #28 from l1k/master
shutdown/shutdown.sh: loop over shutdown hooks until all succeed
2014-10-29 13:42:25 +01:00
Harald Hoyer 3947f07d93 ifcfg/write-ifcfg: only write DEVICE for non-kernel names
Rename an interface to the kernel namespace is not allowed, so don't add
DEVICE="<iface>", if HWADDR is given.
2014-10-28 15:13:35 +01:00
Harald Hoyer d829e7fce2 dmsquash-live: addresss the device via it's symlink
Otherwise multipath parts might be passed, before it's assembled.

https://bugzilla.redhat.com/show_bug.cgi?id=1152948
2014-10-24 11:16:26 +02:00
Vaughan Cao 7a3e1a0e4a Add hyperv-keyboard kernel module for Hyper-V Gen2 VM
The synthetic keyboard of a Gen2 Linux VM doesn't work before the
hyperv_keyboard module is loaded. Without it, we can't cancel the media check
phase if boot with rd.live.check option.
Gen1 Linux VM doesn't have the same issue because the host emulates the legacy
i8042 keyboard for Gen1 VM.

Signed-off-by: Vaughan Cao <vaughan.cao@oracle.com>
2014-10-24 09:10:14 +02:00
Harald Hoyer b4692d07ee mdraid: also accept ID_FS_UUID for rd.md.uuid
As blkid also reports MD_UUID as ID_FS_UUID, although in slightly
different format, accept it also.
2014-10-23 14:37:02 +02:00
Harald Hoyer 05065741f0 network/net-lib.sh:is_persistent_ethernet_name() eth* is not
eth* is _not_ a persistent ethernet name... tsk, tsk, tsk
2014-10-23 14:34:33 +02:00
Lukas Wunner b09faad877 shutdown/shutdown.sh: loop over shutdown hooks until all succeed
Up until now, _check_shutdown() returns true if at least one of
the shutdown hooks succeeded. Change this to only return true if
*all* succeeded. To prevent an infinite loop, introduce an upper
bound of 40 iterations.
2014-10-06 13:43:58 +02:00
Will Woods 7e50abfdb8 do 'ip route replace default' instead of 'add'
When you define the gateway for an interface, dracut sets it up with:

  ip route add default via $gw dev $netif

If a default route is already set (e.g. if you have multiple NICs), this
will fail with the message "RTNETLINK answers: File exists".

So, if your first NIC isn't usable as a default route

Using "ip route replace default" instead allows ifup/dhclient-script to
correctly change the default route to the new interface.
2014-09-12 10:22:21 +02:00
Harald Hoyer 5058ae2d29 qemu: install virtio_console kernel module
https://bugzilla.redhat.com/show_bug.cgi?id=1097999
2014-09-12 10:03:59 +02:00
Harald Hoyer 2f954621cc cms/cmssetup.sh: understand DASD="none"
Treat DASD="none" as unset.

https://bugzilla.redhat.com/show_bug.cgi?id=1096979
2014-09-12 09:59:03 +02:00
Harald Hoyer d681635512 cms/cmssetup.sh: fixed indention 2014-09-12 09:58:14 +02:00
Harald Hoyer 80043e21c1 ifcfg/write-ifcfg.sh: bind bond and bridge interfaces to HW
either by s390 SUBCHANNELS or HWADDR, if the interface name is not
persistent.

Previously, this was bound unconditionally with HWADDR.
2014-09-12 09:49:58 +02:00
Brian C. Lane 7e692cfd43 Support spaces in mount_nfs (#1109933)
nfs paths may contain spaces, make sure they are preserved when passed
to nfs_to_var and mount.

Related: rhbz#1109933
2014-09-10 11:07:44 +02:00
Harald Hoyer 29763cb72d network/net-lib.sh: do not enforce iscsi target name policy
also untabified
2014-09-09 13:31:10 +02:00
Harald Hoyer 23ad117c49 kernel-modules: added hid-lcpower 2014-09-08 13:25:53 +02:00
Harald Hoyer 8a203398ef ssh-client: handle /etc/ssh/ssh_config
- disable ProxyCommand
- install the GlobalKnownHostsFile

https://bugzilla.redhat.com/show_bug.cgi?id=1086778
2014-08-29 15:27:22 +02:00
Harald Hoyer 967cc19ab1 remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
Harald Hoyer 4f03054e54 dracut-shutdown now executes the unpacking on ExecStop
To ensure that unpacking happens before any boot.automount is stopped,
let dracut-shutdown start as a sysinit.target service and unpack on
ExecStop.
2014-08-21 18:45:52 +02:00
Harald Hoyer 85752f0f5f dracut-lib.sh:dev_unit_name(): use systemd-escape, if available 2014-08-21 16:45:12 +02:00
Harald Hoyer 7c752ffaef dracut-lib.sh:cancel_wait_for_dev() fixed double escape 2014-08-21 16:38:35 +02:00
Harald Hoyer e84af01462 url-lib: check for ctorrent binary before adding the url handler 2014-08-15 17:35:11 +02:00
Antony Messerli 338bad6393 Adds bittorrent support for live images
This patch adds bittorrent support to 45url-lib for those that might want
to retrieve the same live image for multiple systems at once without
saturating the network.

This patch requires ctorrent to be installed into initramfs.

Torrent kernel command line format:
root=live:torrent://example.com/liveboot.img.torrent

Start a tracker:
bttrack --bind <tracker_ip> --port 6969 --dfile dstate --reannounce_interval 60

Create the torrent:
ctorrent -t live_image -u http://<tracker_ip>:6969/announce -s live_image.torrent

Seed the initial torrent:
ctorrent live_image.torrent

Boot the live image.
2014-08-15 17:29:33 +02:00
Major Hayden 504c0a8fec Adding support for read/write filesystem images
A user can provide a filesystem image (rootfs.img) inside a compressed
tarball and that filesystem image will be mounted read/write.  This provides
some benefits over a device mapper snapshot overlay, especially when the
live system becomes full.  The boot command line simple needs
"rd.writable.fsimg" added to utilize this feature.

Additional documentation for this option as well as other live boot
options is included.

Signed-off-by: Major Hayden <major@mhtx.net>
2014-08-15 16:05:19 +02:00
Nicolas Chauvet 49fe860b22 Introduce ARM specific modules needed by drm 2014-08-15 12:35:01 +02:00
Nicolas Chauvet b96ea1e196 Categorize needed modules on ARM 2014-08-15 12:35:01 +02:00
Nicolas Chauvet 4a3f3ba68c Test soc path for modalias needed by drm
On ARM, both pci and soc path can be tested for drm.

With this patchset, that was missing in recent kernel,
the tegra_drm case is not needed anymore:
http://patchwork.ozlabs.org/patch/361765/
http://www.spinics.net/lists/linux-tegra/msg17948.html
2014-08-15 12:35:01 +02:00
Harald Hoyer ae488efa5e i18n: check for $i18n_install_all == "yes" rather than being set
i18n_install_all="no" does not have the expected effect without this
patch
2014-08-14 12:56:53 +02:00
Alex Harpin 32125a976b bridging: update the ifcfg files generated for bridge slaves
Update the ifcfg files generated for bridge slaves so they reference
the bridge they are part of.  Related to early patch submitted as a
fix for Bug #1123552.

Bug #1123552 https://bugzilla.redhat.com/show_bug.cgi?id=1123552
2014-08-11 20:16:06 +02:00
Harald Hoyer 2db6d71118 fixed bridge setup
renamed "ethnames" in bridge.info to "bridgeslaves"

fixed ifcfg generation
2014-08-01 13:16:29 +02:00
Harald Hoyer 7b46244bb9 network: add rd.route parameter 2014-07-22 11:52:52 +02:00
Harald Hoyer ad8638e04e base/dracut-lib:pidof() turn off debugging 2014-07-22 11:51:40 +02:00
Peter Robinson 611c895772 ARM: update modules for ARM host only options 2014-07-22 09:03:33 +02:00
Praveen_Paladugu@Dell.com f4eb0d9804 Installing an OS with VLAN enabled to an ISCSI LUN (from ibft)
When installing OS to a VLAN enabled iscsi LUN (extracted from iBFT), "/tmp/net.{xyz}.has_ibft_config" is not being set properly.

Then anaconda installer requires 'BOOTPROTO="ibft"' populated in ifcfg of the vlan interface (ex: ibft0.20), for it to properly populate the kernel parameters post installation. The setting 'BOOTPROTO="ibft"' is populated by write-ifcfg.sh script only if the corresponding interface has a file /tmp/net.{xyz}.has_inft_config

To get around this issue, in ibft_to_cmdline() function in net-lib.sh file, I made the following changes to populate the has_ibft_config file for the vlan interface(ex: ibft0.20):
2014-07-17 16:36:39 +02:00
Harald Hoyer 4adeefc4ab plymouth: also find the pkglibdir on debian 2014-07-08 11:50:51 +02:00
Harald Hoyer fecc1d69e5 lvm:module-setup.sh: check for existance of 69-dm-lvm-metad.rules
fixup for 12819a5799
2014-07-03 15:04:17 +02:00
Alexander Tsoy 8ca5e8c319 modsign: do not hardcode path to keyctl
https://bugs.gentoo.org/show_bug.cgi?id=506094
2014-07-03 09:22:48 +02:00
Harald Hoyer f1a38e5294 ifcfg: depends on network 2014-06-30 12:03:12 +02:00
Harald Hoyer 6525182bfc base/init.sh: use loop counter with unique varname
$i can be polluted too easily
2014-06-30 12:03:12 +02:00
Harald Hoyer 1ea5879085 resume: only install hostonly files, if in hostonly mode 2014-06-30 12:03:12 +02:00
Harald Hoyer f232f6623d Add "rd.cmdline=ask" kernel command line parameter
prompts the user for additional kernel command line parameters
2014-06-30 12:03:12 +02:00
Harald Hoyer 54483dd773 kernel-modules: add tegra arm modules 2014-06-30 12:03:11 +02:00
Harald Hoyer fbc4620f05 print out, what kernel command line parameters are used 2014-06-30 12:03:11 +02:00
Harald Hoyer 7e59d55042 usable_root(): only check for ld-*.so
current systemd allows booting with only /usr on the root partition

see, if we can find an elf loader
2014-06-30 12:03:11 +02:00
Harald Hoyer 5a57582050 Add rd.hostonly kernel command line parameters
rd.hostonly=0 will remove all configuration compiled in the initramfs
from the host on which it was build
2014-06-27 13:59:44 +02:00
Daniel Schaal 7eb0bc7bc4 98systemd: also install systemd-journald-dev-log.socket
The /dev/log socket was moved to /run on systemd 214, install the
newly added socket unit.
2014-06-20 14:34:28 +02:00
Cristian Rodríguez f46c2fff71 systemd: Optionally, include efivarsfs module
It is, however not an error if this module can't be found.
2014-06-20 14:34:27 +02:00
Harald Hoyer 5580e4c176 deprecate "ip=ibft" kernel command line parameter
rd.iscsi.ibft[=1] should be used instead.

Thing is, 'ip=ibft' is not really an ip setting, but rather a marker
that iBFT should be evaluated.

Also removed the trigger of the warning:
"Warning: Please supply bootdev argument for multiple ip= lines"
2014-06-20 14:27:09 +02:00
Harald Hoyer bb8c16d121 iscsi: correctly install the settled iscsiroot dummy call
initqueue parses $1 as the executable command
2014-06-11 14:58:55 +02:00
Harald Hoyer 486a8f33e2 iscsi: correctly install the timeout iscsiroot dummy call
initqueue parses $1 as the executable command
2014-06-11 14:55:11 +02:00
Harald Hoyer ba9f3d3326 udev-rules: add uaccess rules
plymouth needs the seat rules, also without systemd
2014-06-05 12:30:58 +02:00
Harald Hoyer 78c982667a udev-rules: added seat rules
plymouth needs the seat rules, also without systemd
2014-06-04 13:26:08 +02:00
Vasiliy Tolstov 28f3f537c4 network/ifup.sh: Don't try to modprobe ipv6, if already available
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>

[Edited-by: Harald Hoyer]
Simplified logic.
2014-06-03 12:49:56 +02:00
Alex Harpin 83c9ff7dbb bonding: use hwaddr of the slave rather than the master
When a bonded interface is brought up, any slaves included in the bond
have their hardware address set to that of the bond master.  Although
this allows an interface to be brought up on start up, when the
configuration file is imported into the booted system it prevents
the bonded interface being successfully restarted.

The fix involves obtaining the hardware address of the slaves before
they are added to the bond and then using this value in the
configuration file.
2014-06-03 12:26:01 +02:00
Peter Robinson 827ec27a9c kernel-modules: Fix storage module selection for sdhci/mmc/ahci
Currently the block driver detection for generic initrd doesn't include
the SD/MMC drivers so we fail to boot generic images on any device using
those platforms as boot devices when using a generic initrd. Add logic
to detect those modules. This primarily fixes embedded ARM devices but
also likely intel tablets/dev boards and enterprise hypervisors that
have the ability to boot from SD.

Also the ahci_init_controller misses a number of drivers that use the
libahci_platform module for the init so this fixes some missing achi
moduless too.

Finally it cleans up the ARM storage module hacks that the above now
deals with in a more generic manner.

Signed-off-by: <pbrobinson@gmail.com>
2014-05-23 15:44:00 +02:00
WANG Chao ce7f408dfd dracut-pre-pivot pulls in remote-fs.target
It turns out that commit f30b74e (dracut-initqueue service runs before
remote-fs-pre.target) is partial fix for remote fs mounts. Because no
one pulls in remote-fs.target, we can never start remote fs mounts.
Now pull in remote-fs.target in dracut-pre-pivot.

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-05-20 11:40:44 +02:00
Alexander Tsoy c4b529f503 resume/module-setup.sh: filter out empty resume= options in cmdline()
cmdline() prints empty "resume=" options for non-persistent swap
devices, for example zram. Add a check for that.

This patch also fixes printf formatting and removes unused variables.
2014-05-20 11:40:43 +02:00
Julian Wolf c96f1b1e6b udev-rules: include 59-scsi-sg3_utils.rules
Without the 59-scsi-sg3_utils.rules udev-rule a couple of devices are missing
in /dev/disk/by-id.

If the luks device is specified by-id in /etc/crypttab and rd.luks.uuid not
passed as a commandline parameter during boot, systemd tries to start its
crypto services which depend on those missing devices until it times out and
exits to dracut rescue shell.

Signed-off-by: Julian Wolf <juwolf@suse.com>
2014-05-20 11:40:43 +02:00
Hannes Reinecke ed2005fa5b 98systemd: fixup rootfs-generator installation path
The rootfs-generator was installed in the wrong path
in the initrd, cause it never to be run.

References: bnc#878714

Signed-off-by: Hannes Reinecke <hare@suse.de>
2014-05-20 11:40:42 +02:00
Harald Hoyer 1427102692 fcoe-uefi/parse-uefifcoe.sh: fixed parameter generation from UEFI
"fcoe=" was missing for the parameter specifying the interface
2014-05-20 11:22:26 +02:00
Harald Hoyer 056a3f2427 nbd/nbdroot.sh: call nbd-client with "--systemd-mark"
otherwise nbd-client will get killed by systemd
2014-05-16 13:33:33 +02:00
Harald Hoyer 8fa1afb65c ifcfg/write-ifcfg.sh: include net-lib.sh
otherwise is_persistent_ethernet_name() is missing
2014-05-16 13:33:17 +02:00
Harald Hoyer 19bb14c346 mdraid/module-setup.sh: fixed print-cmdline for empty UUID
fixes

/usr/lib/dracut/modules.d/90mdraid/module-setup.sh: line 60:
_activated["${UUID}"]: bad array subscript

Thanks to Jan ONDREJ for spotting this!
2014-05-14 16:38:49 +02:00
Harald Hoyer 56d57a70ec cms/cmssetup.sh: convert SUBCHANNELS to lowercase
In udev rules, the channels need to be expressed in lower case.
2014-05-12 14:37:27 +02:00
Harald Hoyer 1230f3bcff ifcfg/write-ifcfg.sh: "IPV6INIT=yes" check also for non-dhcp 2014-05-12 13:53:38 +02:00
Harald Hoyer 636cc1ef63 resume/parse-resume.sh: correctly write timeout hook 2014-05-07 15:30:01 +02:00
Harald Hoyer 4e58a1ffc7 dracut-lib.sh: fixed return value of pidof()
pidof always returned with 0, so any "while pidof" loop would not
terminate.

Thanks "Consus" for the hint!
2014-05-07 13:34:31 +02:00
Harald Hoyer 48b7ab1b35 i18n/parse-i18n.sh: fixed typo s/$key/$_key
Thanks xtraeme!
2014-04-28 12:47:45 +02:00
Chapman Flack 2c19a5fa78 Specify strstr tightly, add strglob/strglobin.
By convention, strstr should be a literal string match. Previously, it
would match as a glob pattern. Some code used that, so add new
functions strglob and strglobin to do what that code expects, and
specify them tightly too. strglob tests whether the glob pattern
matches the entire string (the name strglob is also used in the yorick
language, and that's what it does there), while strglobin tests whether
the glob pattern matches anywhere in the string.

Also tightens str_starts, str_ends, and str_replace to deal with
literal strings only. In a quick grep I did not find code that depended
on these functions matching globs.

Changes the call sites where strstr was used with glob patterns to use
strglobin or strglob as the intention seemed to be (or, in one case,
strstr with the * removed as it did not affect the result anyway).
2014-04-07 10:49:07 +02:00
Harald Hoyer 2e094b20a6 ifcfg: only bind to HWADDR, if addr_assign_type == 0
/sys/class/net/$netif/addr_assign_type is != 0 for random MAC address
interfaces
2014-04-04 12:52:39 +02:00
Harald Hoyer fb0e5184a6 ifcfg: do not bind persistent interface names to HWADDR 2014-04-04 12:48:32 +02:00
Harald Hoyer 100d575ec9 fs-lib: always install fsck.$fs, if present 2014-04-04 11:34:10 +02:00
WANG Chao b31250e7e6 dracut-initqueue service runs before remote-fs-pre.target
With the following commit, dracut doesn't mount anything from /etc/fstab

commit e920bfb
Author: WANG Chao <chaowang@redhat.com>
Date:   Tue Apr 1 15:20:49 2014 +0800

    fstab: do not mount and fsck from fstab if using systemd

But systemd doesn't mount nfs at all, because no unit is pulling in
remote-fs.target.

dracut must pull in these remote fs mount and all these remote mounts
should start only after network is up (ie. after dracut-initqueue).

Signed-off-by: WANG Chao <chaowang@redhat.com>
2014-04-03 09:51:43 +02:00
Chapman Flack ddfea6b54c Break at switch_root only for bare rd.break
Previously, any rd.break=breakpoint would cause a break at the
given breakpoint and also at switch_root.
2014-04-03 08:56:52 +02:00
Harald Hoyer 12819a5799 lvm:module-setup.sh: check for existance of 69-dm-lvm-metad.rules
Before modifying 69-dm-lvm-metad.rules, we should check for the
existance first. Otherwise this results in error messages on
distributions (debian), which do not ship these rules.
2014-04-03 08:54:27 +02:00