]> git.ipfire.org Git - thirdparty/dracut.git/log
thirdparty/dracut.git
7 years agodracut.spec: Remove needless use of %defattr
Harald Hoyer [Thu, 26 Jul 2018 11:04:20 +0000 (13:04 +0200)] 
dracut.spec: Remove needless use of %defattr

7 years agodracut.spec: add 00warpclock dracut module
Harald Hoyer [Thu, 26 Jul 2018 11:00:24 +0000 (13:00 +0200)] 
dracut.spec: add 00warpclock dracut module

7 years agoBring back 51-dracut-rescue-postinst.sh
Harald Hoyer [Thu, 26 Jul 2018 10:49:45 +0000 (12:49 +0200)] 
Bring back 51-dracut-rescue-postinst.sh

can only be obsoleted after F30

7 years agolsinitrd: update help message and man page
Kairui Song [Wed, 25 Jul 2018 15:50:47 +0000 (23:50 +0800)] 
lsinitrd: update help message and man page

Signed-off-by: Kairui Song <kasong@redhat.com>
7 years agolsinitrd: optimize performance when handling multiple files
Kairui Song [Wed, 25 Jul 2018 08:47:37 +0000 (16:47 +0800)] 
lsinitrd: optimize performance when handling multiple files

Currently, when trying to unpack or print the content of multiple
files, lsinitrd will decompress the image and pipe the decompressed
content to cpio to retrive each file if the image is compressed.
Which mean if we want to extract 10 files the image will be decompressed
10 times, which is a waste of time.

This patch will let lsinitrd decompress the image file to a temp file
first if multiple file names are given, then cpio will read from the
decompressed temp file, which will speed up a lot.

Time consumption test for command:
`lsinitrd initramfs-4.16.15-300.fc28.x86_64.img \
    usr/lib/dracut/build-parameter.txt \
    usr/lib/dracut/modules.txt \
    etc/machine-id \
    etc/hostname \
    usr/lib/udev/rules.d/99-systemd.rules`

Before the patch:
2.37user 0.33system 0:02.12elapsed

After the patch:
0.50user 0.42system 0:00.72elapsed

There would be a more significant time difference if we try to
extract more files.

7 years agolsinitrd: allow to only unpack certain files
Kairui Song [Wed, 25 Jul 2018 08:34:08 +0000 (16:34 +0800)] 
lsinitrd: allow to only unpack certain files

Before this patch, "--unpack" will always unpack the whole image.
Make "--unpack" be able to unpack only certain files, it will be
easier to retrieve files from initramfs image.

Signed-off-by: Kairui Song <kasong@redhat.com>
7 years agoNEWS: forgot to update the latest version
Harald Hoyer [Thu, 26 Jul 2018 07:54:13 +0000 (09:54 +0200)] 
NEWS: forgot to update the latest version

7 years ago00warpclock: Set correct timezone
Hannes Reinecke [Thu, 5 Dec 2013 08:29:28 +0000 (09:29 +0100)] 
00warpclock: Set correct timezone

Add module for setting correct timezone.

References: bnc#830060

For now, this module will not be included automatically due to different
expectations (see e.g.  https://bugzilla.redhat.com/show_bug.cgi?id=981617)

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Daniel Molkentin <daniel.molkentin@suse.com>
7 years agodracut-install: skip modules with empty path
Harald Hoyer [Wed, 18 Jul 2018 10:41:01 +0000 (12:41 +0200)] 
dracut-install: skip modules with empty path

if kmod_module_get_path(module) returns NULL, skip the module

7 years agoRecord loaded kernel modules when hostonly mode is enabled
Kairui Song [Tue, 17 Jul 2018 09:16:07 +0000 (17:16 +0800)] 
Record loaded kernel modules when hostonly mode is enabled

A hostonly image will not include every possibly required kernel module,
so if any hardware or configuration changed, the image may fail to boot.

One way to know if there are any hardware change or configuration change
that will require an image rebuild or not is to check the loaded kernel
module list. If the loaded kernel module list differs from last build
time, then the image may require to be rebuilt.

This commit will let dracut record the loaded kernel module list when
the image is being built, so other tools or services can compare this
list with currently loaded kernel modules to decide if dracut should be
called to rebuild the image.

To retrieve the loaded kernel modules list when an image is built, use
lsinitrd command:

lsinitrd $image -f */lib/dracut/loaded-kernel-modules.txt

7 years agomodules.d/95fcoe/cleanup-fcoe.sh: chmod +x
Harald Hoyer [Thu, 12 Jul 2018 13:19:17 +0000 (15:19 +0200)] 
modules.d/95fcoe/cleanup-fcoe.sh: chmod +x

7 years agoTEST-40-NBD: disable for now
Harald Hoyer [Thu, 12 Jul 2018 13:18:48 +0000 (15:18 +0200)] 
TEST-40-NBD: disable for now

nbd is always broken

7 years agoTEST-30-ISCSI: readd multiple target test
Harald Hoyer [Fri, 6 Jul 2018 09:56:23 +0000 (11:56 +0200)] 
TEST-30-ISCSI: readd multiple target test

7 years agoNEWS and AUTHORS update 048
Harald Hoyer [Fri, 6 Jul 2018 08:37:51 +0000 (10:37 +0200)] 
NEWS and AUTHORS update

7 years agomdraid: fix case if rd.md.uuid is in ID_FS_UUID format
Harald Hoyer [Fri, 6 Jul 2018 07:23:00 +0000 (09:23 +0200)] 
mdraid: fix case if rd.md.uuid is in ID_FS_UUID format

if rd.md.uuid is in ID_FS_UUID format with dashes
e40a0234-7e52-5f10-f267-658d8ec463fa
convert it for the /dev/disk/by-id/md-uuid-${uuid} format
e40a0234:7e525f10:f267658d:8ec463fa

7 years agordsosreport.sh: best effort to strip out passwords
Harald Hoyer [Thu, 5 Jul 2018 12:24:04 +0000 (14:24 +0200)] 
rdsosreport.sh: best effort to strip out passwords

Modified version of:
https://github.com/dracutdevs/dracut/pull/96

Thanks to Zhiguo Deng <bjzgdeng@linux.vnet.ibm.com>

7 years agodracut.sh: improve udevdir and systemdutildir fallback logic
Mike Gilbert [Tue, 4 Jul 2017 02:39:42 +0000 (22:39 -0400)] 
dracut.sh: improve udevdir and systemdutildir fallback logic

Check for a common binary in systemdutildir. This resolves an issue on
split-usr systems, where it is common to have both /lib/systemd[/system]
and /usr/lib/systemd[/user] present.

Check for systemd-udevd specifically, since some distros (Gentoo) allow
udev to be installed without the rest of the systemd stack.

Similar logic is applied to udevdir simply for consistency.

7 years agoTEST-99-RPM: use Fedora 29
Harald Hoyer [Thu, 5 Jul 2018 10:28:18 +0000 (12:28 +0200)] 
TEST-99-RPM: use Fedora 29

7 years agodracut-init.sh: fix instmods with zero input
Harald Hoyer [Thu, 5 Jul 2018 10:27:33 +0000 (12:27 +0200)] 
dracut-init.sh: fix instmods with zero input

instmods < /dev/null

should not error

7 years agodracut.spec: remove 90multipath-hostonly
Harald Hoyer [Thu, 5 Jul 2018 11:17:53 +0000 (13:17 +0200)] 
dracut.spec: remove 90multipath-hostonly

7 years agoMerge 90-multipath-hostonly and 90-multipath
Kairui Song [Thu, 5 Jul 2018 08:20:04 +0000 (16:20 +0800)] 
Merge 90-multipath-hostonly and 90-multipath

This commit basically reverts 5ce7cc73

90-multipath-hostonly module was added in 5ce7cc73, because if hostonly
mode is enabled, multipath module will always hardcode wwids which
causes problems when the initramfs is cloned to another system with same
hardware.

Now with tri-state hostonly mode, the two modules could be merged and only
hardcode wwids when "strict" hostonly mode is enabled.

7 years agodracut.spec: add 95qeth_rules
Harald Hoyer [Thu, 5 Jul 2018 10:03:34 +0000 (12:03 +0200)] 
dracut.spec: add 95qeth_rules

7 years agonetwork: iface_has_carrier(): fixed logic
Harald Hoyer [Thu, 5 Jul 2018 07:36:32 +0000 (09:36 +0200)] 
network: iface_has_carrier(): fixed logic

7 years agoifup.sh: don't wait linkup when set static ip explicitly
Hiroaki Mizuguchi [Tue, 28 Nov 2017 05:59:55 +0000 (14:59 +0900)] 
ifup.sh: don't wait linkup when set static ip explicitly

iface_has_carrier is skipped when set $dev. Fail curl fetch for root=live:<url>.

7 years ago95qeth_rules: Add new module to copy qeth rules
Daniel Molkentin [Mon, 29 Jan 2018 13:58:31 +0000 (08:58 -0500)] 
95qeth_rules: Add new module to copy qeth rules

Only pick rules for interfaces which have a carrier in the running
system. Those interfaces will be assembled by udev to allow booting
from those devices (i.e. iSCSI).

Reference: FATE#323440

7 years ago90kernel-modules: Don't install extra modules when hostonly mode is set to strict
Kairui Song [Wed, 4 Jul 2018 09:22:00 +0000 (17:22 +0800)] 
90kernel-modules: Don't install extra modules when hostonly mode is set to strict

7 years agoIntroduce tri-state hostonly mode
Kairui Song [Wed, 4 Jul 2018 09:21:37 +0000 (17:21 +0800)] 
Introduce tri-state hostonly mode

Add a new option --hostonly-mode which accept an <mode> parameter, so we have a tri-state hostonly mode:

    * generic: by passing "--no-hostonly" or not passing anything.
               "--hostonly-mode" has no effect in such case.
    * sloppy: by passing "--hostonly --hostonly-mode sloppy". This
              is also the default mode when only "--hostonly" is given.
    * strict: by passing "--hostonly --hostonly-mode strict".

Sloppy mode is the original hostonly mode, the new introduced strict
mode will allow modules to ignore more drivers or do some extra job to
save memory and disk space, while making the image less portable.

Also introduced a helper function "optional_hostonly" to make it
easier for modules to leverage new hostonly mode.

To force install modules only in sloppy hostonly mode, use the form:

hostonly="$(optional_hostonly)" instmods <modules>

Signed-off-by: Kairui Song <kasong@redhat.com>
7 years agoiscsi: s/rd.iscsilogin.retries/rd.iscsi.login_retry_max
Harald Hoyer [Thu, 5 Jul 2018 07:02:55 +0000 (09:02 +0200)] 
iscsi: s/rd.iscsilogin.retries/rd.iscsi.login_retry_max

7 years agoiscsi: do discovery for every network change
Harald Hoyer [Wed, 4 Jul 2018 09:28:33 +0000 (11:28 +0200)] 
iscsi: do discovery for every network change

7 years agoFix syncheck complaints
Daniel Molkentin [Tue, 22 May 2018 11:55:00 +0000 (13:55 +0200)] 
Fix syncheck complaints

7 years ago95iscsi: Replace iscsistart with iscsid
Daniel Molkentin [Thu, 26 Apr 2018 13:03:29 +0000 (15:03 +0200)] 
95iscsi: Replace iscsistart with iscsid

This allows to setup multiple paths to targets, which is
required for iscsi multipath.

7 years agoAdd timeout option to crypt module
Nicolas Porcel [Fri, 18 May 2018 08:49:01 +0000 (10:49 +0200)] 
Add timeout option to crypt module

7 years agodracut-install: Support modules.softdep
Jeremy Linton [Tue, 3 Jul 2018 04:25:05 +0000 (23:25 -0500)] 
dracut-install: Support modules.softdep

Dracut uses the module deps to determine module dependencies
but that only works for modules with hard symbolic dependencies.
Some modules have dependencies created via callback API's or other
methods which aren't reflected in the modules.dep but rather in
modules.softdep through the use of "pre:" and "post:" commands
created in the kernel with MODULE_SOFTDEP().

Since in dracut we are only concerned about early boot, this patch
only looks at the pre: section of modules which are already being
inserted in the initrd under the assumption that the pre: section
lists dependencies required for the functionality of the module being
installed in the initrd.

Signed-off-by: Jeremy Linton <lintonrjeremy@gmail.com>
7 years agoFixed issue #420
Sullivan (CTR), Austin [Wed, 27 Jun 2018 14:33:09 +0000 (10:33 -0400)] 
Fixed issue #420

7 years ago51-dracut-rescue.install: Don't install BLS fragment in /boot/efi on EFI
Javier Martinez Canillas [Mon, 25 Jun 2018 11:12:08 +0000 (13:12 +0200)] 
51-dracut-rescue.install: Don't install BLS fragment in /boot/efi on EFI

For EFI systems, the BLS fragments were stored in the EFI System Partition
(ESP) while in non-EFI systems it was stored in /boot.

For consistency, it's better to always store the BLS fragments in the same
path regardless of the firmware interface used.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
7 years agoInclude virtio DRM drivers in hostonly initramfs
Adam Williamson [Fri, 22 Jun 2018 18:25:04 +0000 (11:25 -0700)] 
Include virtio DRM drivers in hostonly initramfs

The code in 50drm which tries to include all DRM drivers for
hardware attached to the system did not look for virtio devices.
So if the system is a VM using the 'virtio' graphics adapter,
the 'virtio-gpu' module which should be included is not. This
extends the code to also look for virtio devices.

https://bugzilla.redhat.com/show_bug.cgi?id=1593028

Signed-off-by: Adam Williamson <awilliam@redhat.com>
7 years agofips: only install FIPS-compliant crypto modules
Ondrej Mosnacek [Fri, 8 Jun 2018 11:38:34 +0000 (13:38 +0200)] 
fips: only install FIPS-compliant crypto modules

Since the kernel doesn't allow using any non-FIPS-compliant crypto
algorithms, it doesn't make sense to install them. Even if they are
installed, tcrypt will not test them anyway.

Tested on Fedora 28 x86_64 by booting with fips=1 (with hand-patched
module-setup.sh).

7 years agofips: cleanup FIPS crypto module list
Ondrej Mosnacek [Fri, 8 Jun 2018 09:28:20 +0000 (11:28 +0200)] 
fips: cleanup FIPS crypto module list

This patch cleans up the default list of kernel modules in the 01fips
dracut module. All the algorithms that are tested in tcrypt are listed
by their algorithm name so that all the generic implementations and
drivers are picked up automatically based on the module alias.

This drops several unneeded modules and even a bogus one (rot13 -- this
one was obviously copy-pasted from tcrypt.c where it was listed as an
easter egg :).

The patch adds also some algorithms that weren't included in the
original set. It turns out in FIPS mode we only need those algorithms
that are marked as FIPS-allowed in testmgr.c (failure to find a non-FIPS
algorithm is ignored). The non-FIPS algorithms are further removed in a
subsequent patch.

7 years agofips: add crypto_user module for new hmaccalc
Ondrej Mosnacek [Fri, 8 Jun 2018 07:53:13 +0000 (09:53 +0200)] 
fips: add crypto_user module for new hmaccalc

In Fedora 28+, hmaccalc (sha512hmac) is provided by libkcapi-hmaccalc,
which needs the crypto_user module for its functionality.

7 years agodracut: scan and install external kernel modules
Hui Wang [Tue, 19 Jun 2018 19:07:46 +0000 (12:07 -0700)] 
dracut: scan and install external kernel modules

since kmod-25 keyword "external" was implemented in order to avoid
additional actions(like weak-modules) when kernel was updated, which
makes it more simple while kernels' kabi were compatible.

but if move some special modules such as megaraid_sas, mpt3sas and
so on, to a external path like /opt/modules, these modules will not
be install to initramfs by default, which make the initramfs can't
be used to boot for disk detection failure.

according to kmod's document, you must specify a absolute path with
"external" keyword, so scan the lines in modules.dep that begin with
"/" and install them, to make sure necessary modules in external path
can be installed to initramfs too.

Signed-off-by: Hui Wang <john.wanghui@huawei.com>
7 years ago51-dracut-rescue.install: fix exit status code
Javier Martinez Canillas [Fri, 15 Jun 2018 08:36:27 +0000 (10:36 +0200)] 
51-dracut-rescue.install: fix exit status code

After the $COMMAND case statement, the exit status of the last executed
command is added to the $ret variable.

But for the "add" pattern, this last executed command is an arithmetic
expression that also adds the exit status $? to the $ret variable. If
both $? and $ret are 0, then the arithmetic expression evaluates to 0
so is considered false and has an exit status of 1.

This makes the script to wrongly exit with an status code of 1 when it
should had been 0.

  case "$COMMAND" in
      add)
      ...
          ((ret+=$?))
  # $ret is 0 here
          ;;
  ...
  esac

  ((ret+=$?))
  # $ ret is 1 here

  exit $ret

Since $ret is set in the case statement, just exit with that status code
and remove the last arithmetic expression that wrongly sets $ret to 1.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
7 years agofips: Drop obsolete dependencies
Ondrej Mosnacek [Thu, 14 Jun 2018 08:25:33 +0000 (10:25 +0200)] 
fips: Drop obsolete dependencies

Explicitly require libkcapi-hmaccalc and stop installing NSS/prelink
dependencies that are no longer needed.

7 years agoRemove obsolete prelinking functionality
Daniel Molkentin [Thu, 18 Jan 2018 14:07:25 +0000 (15:07 +0100)] 
Remove obsolete prelinking functionality

7 years agofips: Drop the 02fips-aesni module
Ondrej Mosnacek [Thu, 14 Jun 2018 08:30:03 +0000 (10:30 +0200)] 
fips: Drop the 02fips-aesni module

The main 01fips module should always load all optimized/driver modules
of all relevant crypto algorithms (based on their aliases), so we can
drop this useless module.

7 years agocrypt: Implement cmdline rd.luks.partuuid
B. Wilson [Tue, 29 May 2018 09:53:48 +0000 (18:53 +0900)] 
crypt: Implement cmdline rd.luks.partuuid

Commit bf5c53a implements support for mounting LUKS devices with
detached headers; however, it assumes that the LUKS device sits on an
unpartitioned disk.

Mirroring the `rd.luks.serial` option, this commit implements the
`rd.luks.partuuid` cmdline option, supporting headless LUKS devices on
drive partitions.

7 years agoHarden dracut against BASH_ENV environment variable
Renaud Métrich [Thu, 7 Jun 2018 13:42:12 +0000 (15:42 +0200)] 
Harden dracut against BASH_ENV environment variable

When dracut silently produces a broken initramfs, then the system will
likely not boot and this can be very problematic. Typical use case is
after the kernel has been updated.

It appears that dracut is not protected against the BASH_ENV variable,
causing various scripts called by dracut to possibly fail or provide
wrong output (e.g. "ldd" is one of these).
Having a broken output for "ldd" makes the generated initramfs be not
usable, typically because vital binaries will be missing (e.g.
"awk", "udevadm", ...).

Note: because the shebang line cannot contain more than one argument,
the '--norc' option had to be removed. IMHO, it was useless anyway.

Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
7 years agofips: add sha3_generic and sm3_generic modules
Ondrej Mosnacek [Thu, 7 Jun 2018 14:03:54 +0000 (16:03 +0200)] 
fips: add sha3_generic and sm3_generic modules

SHA-3 and SM3 have been added to the tcrypt module recently, so without
them the 'modprobe tcrypt' step causes a kernel panic.

7 years ago40network: introduce ip=either6 option
Pingfan Liu [Tue, 24 Apr 2018 08:41:21 +0000 (16:41 +0800)] 
40network: introduce ip=either6 option

In kdump, if dump-target is ssh on ipv6, we need to sync until ipv6 addr
is ready. Currently ip=auto6/dhcp6 provides such function. But in 1st kernel,
it is hard to know whether the ipv6 addr is got by dhcpv6 or SLAAC.
E.g ifcfg-eth* contains DHCPV6C=yes direction, but there is no dhcpv6
server in the network, and then after the system is up, the user
echo 1 > /proc/sys/net/ipv6/conf/eth0/autoconf && accept_ra by manual
to obtain a ipv6 addr. Or vice.
So this patch suggests to make dhcpv6 as auto6 fallback

Signed-off-by: Pingfan Liu <piliu@redhat.com>
7 years agocleanup empty ldconfig_paths directories
Harald Hoyer [Tue, 22 May 2018 07:48:23 +0000 (09:48 +0200)] 
cleanup empty ldconfig_paths directories

https://bugzilla.redhat.com/show_bug.cgi?id=1324746

7 years agoshutdown: sleep a little, if a process was killed
Harald Hoyer [Tue, 15 May 2018 11:37:53 +0000 (13:37 +0200)] 
shutdown: sleep a little, if a process was killed

If a process (maybe plymouth) was still pinning /oldroot, then shutdown
would
- kill -9 $pid
- umount_a
- umount_a
in a very short timeframe. A small sleep hopefully lets the scheduler free
up /oldroot in the mean time.

7 years agodracut.spec: do not recommend grubby
Harald Hoyer [Mon, 7 May 2018 13:27:22 +0000 (15:27 +0200)] 
dracut.spec: do not recommend grubby

7 years agodracut-install.c: untabify
Harald Hoyer [Mon, 7 May 2018 13:23:04 +0000 (15:23 +0200)] 
dracut-install.c: untabify

7 years agodon't error out, if no modules were installed
Harald Hoyer [Mon, 7 May 2018 13:21:35 +0000 (15:21 +0200)] 
don't error out, if no modules were installed

dracut-install â€¦ -m -s drm_crtc_init =drivers/staging
should not return an error, if no module was found in =drivers/staging

https://bugzilla.redhat.com/show_bug.cgi?id=1575527

7 years ago80lvmmerge/README.md: remove executable bits
Harald Hoyer [Mon, 7 May 2018 08:40:32 +0000 (10:40 +0200)] 
80lvmmerge/README.md: remove executable bits

7 years agos/find_btrfs_devs/btrfs_devs
Harald Hoyer [Mon, 7 May 2018 08:26:05 +0000 (10:26 +0200)] 
s/find_btrfs_devs/btrfs_devs

7 years ago10i18n: Fix possible infinite recursion
Daniel Molkentin [Fri, 27 Apr 2018 14:59:47 +0000 (16:59 +0200)] 
10i18n: Fix possible infinite recursion

7 years agoSuppress sync/fsfreeze if not running on a live system
Colin Walters [Wed, 2 May 2018 15:11:59 +0000 (11:11 -0400)] 
Suppress sync/fsfreeze if not running on a live system

It's possible for e.g. `kernel` to be installed as an RPM BuildRequires or equivalent,
and there's no reason to sync, and *definitely* no reason to fsfreeze.

Another case where this happens is rpm-ostree, which performs its own sync/fsfreeze
globally.  See e.g. https://github.com/ostreedev/ostree/commit/8642ef5ab3fec3ac8eb8f193054852f83a8bc4d0

7 years agoUpdate dracut.modules.7.asc
Michael McCracken [Fri, 27 Apr 2018 06:27:17 +0000 (23:27 -0700)] 
Update dracut.modules.7.asc

Update manpage to reflect code behavior for `inst` with >2 args.

Signed-off-by: Michael McCracken <michael.mccracken@gmail.com>
7 years agospec: add stratis module
Yu Watanabe [Fri, 27 Apr 2018 03:00:53 +0000 (12:00 +0900)] 
spec: add stratis module

Follow-up for c4f8329cc2b158c8d91ad9d9b7776b3970d3735a.

7 years agocrypt: correct s390 arch to include arch-specific crypto modules
Hendrik Brueckner [Wed, 25 Apr 2018 15:29:26 +0000 (17:29 +0200)] 
crypt: correct s390 arch to include arch-specific crypto modules

Convert the s390x into s390 to also include s390-specific crypto
modules, for example, aes_s390 into the initramfs.

Signed-off-by: Hendrik Brueckner <brueckner@linux.ibm.com>
7 years agoInitial Stratis support
Tony Asleson [Mon, 2 Apr 2018 14:32:12 +0000 (09:32 -0500)] 
Initial Stratis support

Ref. https://github.com/stratis-storage

Signed-off-by: Tony Asleson <tasleson@redhat.com>
7 years agofix zstd magic header
tpgxyz [Wed, 18 Apr 2018 18:57:33 +0000 (20:57 +0200)] 
fix zstd magic header

7 years agofs-lib: install crc32 in no-hostonly
Marcos Mello [Mon, 16 Apr 2018 10:59:09 +0000 (07:59 -0300)] 
fs-lib: install crc32 in no-hostonly

It is needed by f2fs.

7 years agofs-lib: install crc32c for ext4
Marcos Mello [Fri, 6 Apr 2018 11:19:27 +0000 (08:19 -0300)] 
fs-lib: install crc32c for ext4

EXT4 filesystems created with metadata_csum (enabled by default in mke2fs 1.44+) or ea_inode need crc32c.

https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/?id=d0b9e0a6aa7d6805338a43b4e372623352d8df09
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/fs/ext4/super.c?h=v4.15.15#n3491

7 years agofs-lib: remove redundancy
Marcos Mello [Fri, 6 Apr 2018 11:17:30 +0000 (08:17 -0300)] 
fs-lib: remove redundancy

7 years agomake failing installation of drm modules nonfatal
Enno Boland [Fri, 30 Mar 2018 13:46:04 +0000 (15:46 +0200)] 
make failing installation of drm modules nonfatal

7 years agoplymouth: fix detection of plymouth directory
Alexander Tsoy [Fri, 23 Mar 2018 08:52:27 +0000 (11:52 +0300)] 
plymouth: fix detection of plymouth directory

Some distros have both /usr/lib/plymouth and /usr/libexec/plymouth
directorirs, so we should check the existance of plymouth-populate-initrd
script.

Fixes: 421b46f8ae89cfe2b62e880a8a5079ee8c1b3aae
7 years agospec: add missing obsoletes and provides for removed fips subpackages
Lukas Nykryn [Thu, 22 Mar 2018 15:25:46 +0000 (16:25 +0100)] 
spec: add missing obsoletes and provides for removed fips subpackages

7 years agospec: merge fips subpackages to main package
Lukas Nykryn [Mon, 19 Mar 2018 12:02:24 +0000 (13:02 +0100)] 
spec: merge fips subpackages to main package

7 years agospec: drop support for legacy distributions
Lukas Nykryn [Thu, 15 Mar 2018 15:57:47 +0000 (16:57 +0100)] 
spec: drop support for legacy distributions

rhel <= 7 has its own branch and there is no point in supporting the old
fedora

7 years ago90kernel-modules: Include Intel Volume Management Device support
Daniel Molkentin [Fri, 16 Mar 2018 14:17:41 +0000 (15:17 +0100)] 
90kernel-modules: Include Intel Volume Management Device support

Reference: bsc#1079924

7 years agolsinitrd.sh: fixed zstd file signature
Harald Hoyer [Thu, 15 Mar 2018 08:56:18 +0000 (09:56 +0100)] 
lsinitrd.sh: fixed zstd file signature

7 years ago51-dracut-rescue.install: fix initramfs not generated in /boot case
Javier Martinez Canillas [Fri, 9 Mar 2018 17:54:49 +0000 (18:54 +0100)] 
51-dracut-rescue.install: fix initramfs not generated in /boot case

Commit 5e574046e76e ("5?-dracut*.install: Allow scripts to install
the initramfs in /boot dir") added support to generate initramfs
images in the /boot directory and copy the respective BLS files.

Unfortunately, it broke the rescue initramfs generation when it's
not installed on /boot due not checking for the correct condition.

It checks for the 0-rescue sub-dir to exist, but this is created so
instead if the parent sub-dir exists has to be checked. Also, check
if the destination directory is /boot or not, instead if it exists.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
7 years agokernel-modules: add mmc/core for arm
Harald Hoyer [Mon, 5 Mar 2018 08:55:39 +0000 (09:55 +0100)] 
kernel-modules: add mmc/core for arm

7 years agoall: fix issues found by shellcheck
Lukas Nykryn [Fri, 2 Mar 2018 11:29:46 +0000 (12:29 +0100)] 
all: fix issues found by shellcheck

Error: SHELLCHECK_WARNING:
/usr/lib/dracut/dracut-init.sh:939:20: error: Argument to implicit -n is always true due to literal strings. [SC2157]
  937|   dracut_kernel_post() {
  938|       for _f in modules.builtin.bin modules.builtin modules.order; do
  939|->         [[ $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f"
  940|       done
  941|

Error: SHELLCHECK_WARNING:
/usr/lib/dracut/modules.d/98syslog/parse-syslog-opts.sh:18:12: error: This expression is constant. Did you forget a $ somewhere? [SC2078]
   16|       elif [ -e /sbin/syslogd ]; then
   17|           syslogtype="syslogd"
   18|->     elif [ /sbin/syslog-ng ]; then
   19|           syslogtype="syslog-ng"
   20|       else

Error: SHELLCHECK_WARNING:
/usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:15:29: error: Since you double quoted this, it will not word split, and the loop will only run once. [SC2066]
   13|               strstr "$d" "${luks##luks-}" && return 0
   14|               if [ -n "$dev" ]; then
   15|->                 for _dev in "$(devnames $d)"; do
   16|                       [ "$dev" -ef "$_dev" ] && return 0
   17|                   done

7 years ago5?-dracut*.install: Allow scripts to install the initramfs in /boot dir
Javier Martinez Canillas [Wed, 28 Feb 2018 08:39:12 +0000 (09:39 +0100)] 
5?-dracut*.install: Allow scripts to install the initramfs in /boot dir

The GRUB 2 bootloaders expect the initrd to be installed in /boot instead
of /boot/$MACHINE_ID/$KERNEL_VERSION/{linux,initrd}, so if that directory
doesn't exists, install the initramfs images on the /boot directory.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
7 years ago90kernel-modules: Ensure PCI host modules are included
Daniel Molkentin [Thu, 1 Mar 2018 09:24:29 +0000 (10:24 +0100)] 
90kernel-modules: Ensure PCI host modules are included

The includes modules like the Intel Volume Management Device driver,
which is required to boot from disk on some systems.

Reference: boo#1079924

7 years agoUpdate %description a bit
Harald Hoyer [Mon, 26 Feb 2018 10:22:55 +0000 (11:22 +0100)] 
Update %description a bit

7 years agodracut.spec: remove BuildRoot
Harald Hoyer [Mon, 19 Feb 2018 09:17:36 +0000 (10:17 +0100)] 
dracut.spec: remove BuildRoot

7 years agodracut.spec: remove clean section
Harald Hoyer [Mon, 19 Feb 2018 09:16:30 +0000 (10:16 +0100)] 
dracut.spec: remove clean section

7 years agoversion 047 047
Harald Hoyer [Mon, 19 Feb 2018 08:50:01 +0000 (09:50 +0100)] 
version 047

7 years agodracut.spec: add BuildRequires gcc
Harald Hoyer [Mon, 19 Feb 2018 08:10:12 +0000 (09:10 +0100)] 
dracut.spec: add BuildRequires gcc

7 years agodracut-function.sh:check_block_and_slaves() check for block devices
Harald Hoyer [Mon, 19 Feb 2018 08:03:02 +0000 (09:03 +0100)] 
dracut-function.sh:check_block_and_slaves() check for block devices

Some nvme have char parents, so check if the "slave" is a block dev.

Fixes https://github.com/dracutdevs/dracut/issues/373

7 years agodm:dm-shutdown.sh: silence all disassembly until the last try
Harald Hoyer [Mon, 12 Feb 2018 08:15:55 +0000 (09:15 +0100)] 
dm:dm-shutdown.sh: silence all disassembly until the last try

7 years agoAvoid executing emergency hooks twice
Ignaz Forster [Tue, 6 Feb 2018 16:32:47 +0000 (17:32 +0100)] 
Avoid executing emergency hooks twice

7 years agocrypt: actually put block_uuid.map into initramfs
Alexander Tsoy [Thu, 1 Feb 2018 19:36:24 +0000 (22:36 +0300)] 
crypt: actually put block_uuid.map into initramfs

Also change path to /etc/block_uuid.map.

Fixes: c3b6970394ad677f05a42bef420bf34b1d0652e0
7 years ago40network: Fix race condition when wait for networks
Pawel Wieczorkiewicz [Tue, 8 Apr 2014 06:50:55 +0000 (08:50 +0200)] 
40network: Fix race condition when wait for networks

If no network related params are specific, but rd.neednet=1 is set,
the default initqueue action is to wait until one of the network
interfaces is marked as setup properly.

This also help with initqueue's race condition when the network interface
shows up late

References: bnc#866771

Signed-off-by: Hannes Reinecke <hare@suse.de>
7 years ago90plymouth: logo file is optional and may not exist
Daniel Molkentin [Fri, 19 Jan 2018 20:01:41 +0000 (21:01 +0100)] 
90plymouth: logo file is optional and may not exist

7 years ago50plymouth: improve distro compatibility
Daniel Molkentin [Thu, 18 Jan 2018 16:45:01 +0000 (17:45 +0100)] 
50plymouth: improve distro compatibility

The existence of dpkg-achitecture is not indicative of a debian
installation. It may well be installed on systems of people who
package for both distros. The previous code path did not take
that into account.

We now traverse all known plymouth directories, locking on the first
valid one, and try to work with it.

At the same time, we do not include the module if the plymouth directory
could not be found.

7 years agosupport kernels with built-in modules
Matthew Thode [Sat, 27 Jan 2018 06:42:55 +0000 (00:42 -0600)] 
support kernels with built-in modules

Don't fail if modprobe fails to load a module, the kernel could have it
statically compiled in.

Signed-off-by: Matthew Thode <mthode@mthode.org>
7 years ago98integrity: support X.509-only EVM configuration
Matthias Gerstner [Wed, 24 Jan 2018 16:19:03 +0000 (17:19 +0100)] 
98integrity: support X.509-only EVM configuration

Previously if no symmetric key was configured for EVM, then the
initialization process was aborted. It can be a valid use case, however,
to only use EVM digital signatures. In this case only X.509 certificates
need to be loaded.

With this change EVM initialization will continue if any of the
symmetric or X.509 keys could be loaded.

7 years ago98integrity: support loading x509 into the trusted/builtin .evm keyring
Matthias Gerstner [Wed, 24 Jan 2018 15:58:15 +0000 (16:58 +0100)] 
98integrity: support loading x509 into the trusted/builtin .evm keyring

This implements logic analogous to the one already implemented in
ima-keys-load.sh, only for the .evm/_evm keyrings.

If the kernel was built with CONFIG_IMA_TRUSTED_KEYRING then the kernel
initially creates and configures .ima and .evm keyrings. These keyrings
only accept x509 certificates that have been signed by a local CA which
belongs to the kernel builtin trusted keyring.

Thus if such a keyring is already present then additional evm keys
should be loaded into them. If this is not the case then the _evm
keyring needs to be created in userspace and keys will be loaded into
it instead.

Before this change dracut always created the _evm keyring and loaded
keys into it without considering an existing .evm keyring. In case of
CONFIG_IMA_TRUSTED_KEYRING being enabled, the _evm keyring will not be
used by the kernel, however, and EVM digital signatures will not work as
expected.

7 years ago98integrity: fix inconsistent whitespace
Matthias Gerstner [Wed, 24 Jan 2018 16:41:05 +0000 (17:41 +0100)] 
98integrity: fix inconsistent whitespace

7 years agodracut-install: strdup() kmod_module_get_name() string
Harald Hoyer [Tue, 23 Jan 2018 13:06:31 +0000 (14:06 +0100)] 
dracut-install: strdup() kmod_module_get_name() string

otherwise it can't be used later on after freeing the context.

Should resolve https://bugzilla.redhat.com/show_bug.cgi?id=1536609

7 years agoMerge pull request #365 from Conan-Kudo/early-microcode-by-default
Harald Hoyer [Thu, 18 Jan 2018 14:20:51 +0000 (15:20 +0100)] 
Merge pull request #365 from Conan-Kudo/early-microcode-by-default

Enable 'early_microcode' by default

7 years agoEnable 'early_microcode' by default 365/head
Thomas Backlund [Tue, 9 Jan 2018 19:07:36 +0000 (19:07 +0000)] 
Enable 'early_microcode' by default

We initially enabled it for Haswell TSX bug (mga#16657)

Now there is also Meltdown and Spectre security issues,
and more microcode issues will most likely show up...

So the sane default for 'early_microcode' to have it enabled,
as theese changes must be done early in boot process to take
effect as intended.

Update documentation accordingly.

Reference: https://bugs.mageia.org/show_bug.cgi?id=16657

Signed-off-by: Thomas Backlund <tmb@mageia.org>
Signed-off-by: Neal Gompa <ngompa13@gmail.com>
7 years agoMerge pull request #362 from danimo/persistance_policy
Harald Hoyer [Thu, 18 Jan 2018 09:35:02 +0000 (10:35 +0100)] 
Merge pull request #362 from danimo/persistance_policy

Give --persistent_policy precedence over /dev/mapper names

7 years agoMerge pull request #317 from dracut-mailing-devs/20171212142718.11451-1-carlo@caione.org
Harald Hoyer [Thu, 18 Jan 2018 09:24:41 +0000 (10:24 +0100)] 
Merge pull request #317 from dracut-mailing-devs/20171212142718.11451-1-carlo@caione.org

drm: Look for DRM drivers in the staging directory

7 years agolsinitrd.sh: quote filename in extract_files()
Harald Hoyer [Thu, 18 Jan 2018 09:17:42 +0000 (10:17 +0100)] 
lsinitrd.sh: quote filename in extract_files()

7 years agodracut.cmdline.7.asc: document rd.ccw and rd.znet
Harald Hoyer [Thu, 18 Jan 2018 07:55:34 +0000 (08:55 +0100)] 
dracut.cmdline.7.asc: document rd.ccw and rd.znet

rd.znet should be used instead of rd.ccw.

Add more info about rd.znet.

Fixes github issue 364