]> git.ipfire.org Git - thirdparty/dracut.git/log
thirdparty/dracut.git
5 years agomight even run without kvm
Harald Hoyer [Tue, 14 Aug 2018 14:18:53 +0000 (16:18 +0200)] 
might even run without kvm

5 years agoadd travis build job
Harald Hoyer [Tue, 14 Aug 2018 14:01:39 +0000 (16:01 +0200)] 
add travis build job

5 years agoTEST-31-ISCSI-MULTI: increase verbose level
Harald Hoyer [Tue, 14 Aug 2018 13:54:42 +0000 (15:54 +0200)] 
TEST-31-ISCSI-MULTI: increase verbose level

5 years agotest: add TEST_RUN_ID
Harald Hoyer [Tue, 14 Aug 2018 13:42:21 +0000 (15:42 +0200)] 
test: add TEST_RUN_ID

5 years agoTEST-31-ISCSI-MULTI/test.sh: fixed test description
Harald Hoyer [Tue, 14 Aug 2018 13:28:56 +0000 (15:28 +0200)] 
TEST-31-ISCSI-MULTI/test.sh: fixed test description

5 years agoTEST-50-MULTINIC/test.sh: fixed server startup
Harald Hoyer [Tue, 14 Aug 2018 12:12:54 +0000 (14:12 +0200)] 
TEST-50-MULTINIC/test.sh: fixed server startup

5 years agokernel-network-modules: add vlan kernel modules
Harald Hoyer [Tue, 14 Aug 2018 12:07:12 +0000 (14:07 +0200)] 
kernel-network-modules: add vlan kernel modules

5 years agotest: fixed KVERSION and qemu backwards compatiblity
Harald Hoyer [Tue, 14 Aug 2018 11:58:21 +0000 (13:58 +0200)] 
test: fixed KVERSION and qemu backwards compatiblity

5 years agoTEST-70-BONDBRIDGETEAMVLAN: load vlan kernel modules
Harald Hoyer [Tue, 14 Aug 2018 11:57:15 +0000 (13:57 +0200)] 
TEST-70-BONDBRIDGETEAMVLAN: load vlan kernel modules

5 years agotest: also output server.log on failure
Harald Hoyer [Tue, 14 Aug 2018 09:37:57 +0000 (11:37 +0200)] 
test: also output server.log on failure

5 years agoTEST-50-MULTINIC: s/--device/-device
Harald Hoyer [Tue, 14 Aug 2018 09:35:26 +0000 (11:35 +0200)] 
TEST-50-MULTINIC: s/--device/-device

5 years agoenable parallel test suite
Harald Hoyer [Tue, 14 Aug 2018 09:04:17 +0000 (11:04 +0200)] 
enable parallel test suite

$ time sudo make -j SKIP=14 V=2 check
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-13-ENC-RAID-LVM'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-40-NBD'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-04-FULL-SYSTEMD'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-12-RAID-DEG'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-15-BTRFSRAID'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-16-DMSQUASH'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-17-LVM-THIN'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-11-LVM'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-31-ISCSI-MULTI'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-20-NFS'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-99-RPM'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-02-SYSTEMD'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-30-ISCSI'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-01-BASIC'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-03-USR-MOUNT'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-70-BONDBRIDGETEAMVLAN'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-50-MULTINIC'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-10-RAID'
make[1]: Entering directory '/home/harald/git/dracut/test/TEST-18-LVM-ENC-LV'
TEST: root filesystem on an encrypted LVM PV on a degraded RAID-5 [STARTED]
TEST: root filesystem on NBD [STARTED]
TEST: root filesystem on NBD [SKIPPED]
TEST: Full systemd serialization/deserialization test with /usr mount [STARTED]
TEST: root filesystem on multiple device btrfs [STARTED]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-40-NBD'
TEST: root filesystem on a LiveCD dmsquash filesystem [STARTED]
TEST: root filesystem on a LiveCD dmsquash filesystem [SKIPPED]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-16-DMSQUASH'
TEST: root filesystem on LVM on encrypted partitions of a RAID-5 [STARTED]
TEST: root filesystem on LVM PV [STARTED]
TEST: rpm integrity after dracut and kernel install [STARTED]
TEST: root filesystem on NFS [STARTED]
TEST: root filesystem over iSCSI [STARTED]
TEST: root filesystem on LVM PV with thin pool [STARTED]
TEST: root filesystem over iSCSI [STARTED]
TEST: root filesystem on a ext3 filesystem [STARTED]
TEST: root filesystem on a ext3 filesystem [STARTED]
TEST: root filesystem on a btrfs filesystem with /usr subvolume [STARTED]
TEST: root filesystem on NFS with bridging/bonding/vlan [STARTED]
TEST: root filesystem on NFS with multiple nics [STARTED]
TEST: root filesystem on an encrypted LVM PV on a RAID-5 [STARTED]
TEST: root filesystem on LVM on encrypted partitions of a RAID-5 [STARTED]
TEST: root filesystem on LVM PV [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-11-LVM'
TEST: root filesystem on multiple device btrfs [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-15-BTRFSRAID'
TEST: root filesystem on LVM PV with thin pool [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-17-LVM-THIN'
TEST: root filesystem on a ext3 filesystem [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-02-SYSTEMD'
TEST: root filesystem on a btrfs filesystem with /usr subvolume [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-03-USR-MOUNT'
TEST: root filesystem on LVM on encrypted partitions of a RAID-5 [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-18-LVM-ENC-LV'
TEST: Full systemd serialization/deserialization test with /usr mount [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-04-FULL-SYSTEMD'
TEST: root filesystem on an encrypted LVM PV on a RAID-5 [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-10-RAID'
TEST: root filesystem on LVM on encrypted partitions of a RAID-5 [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-13-ENC-RAID-LVM'
TEST: root filesystem over iSCSI [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-30-ISCSI'
TEST: root filesystem on a ext3 filesystem [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-01-BASIC'
TEST: root filesystem over iSCSI [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-31-ISCSI-MULTI'
TEST: rpm integrity after dracut and kernel install [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-99-RPM'
TEST: root filesystem on NFS [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-20-NFS'
TEST: root filesystem on NFS with bridging/bonding/vlan [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-70-BONDBRIDGETEAMVLAN'
TEST: root filesystem on an encrypted LVM PV on a degraded RAID-5 [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-12-RAID-DEG'
TEST: root filesystem on NFS with multiple nics [OK]
make[1]: Leaving directory '/home/harald/git/dracut/test/TEST-50-MULTINIC'

real 9m3,969s
user 22m50,323s
sys 5m24,411s

5 years agoTEST-31-ISCSI-MULTI: use different port than TEST-30
Harald Hoyer [Tue, 14 Aug 2018 09:03:48 +0000 (11:03 +0200)] 
TEST-31-ISCSI-MULTI: use different port than TEST-30

5 years agoload modules earlier for iscsi via dhcp root-path
Harald Hoyer [Tue, 14 Aug 2018 09:03:11 +0000 (11:03 +0200)] 
load modules earlier for iscsi via dhcp root-path

5 years agotest/{TEST-50-MULTINIC,TEST-70-BONDBRIDGETEAMVLAN}: use qemu-3.0 syntax
Harald Hoyer [Mon, 13 Aug 2018 14:27:59 +0000 (16:27 +0200)] 
test/{TEST-50-MULTINIC,TEST-70-BONDBRIDGETEAMVLAN}: use qemu-3.0 syntax

use qemu-3.0 syntax for network devices

5 years agomultipath-shutdown: fix shell syntax
Harald Hoyer [Mon, 13 Aug 2018 09:37:44 +0000 (11:37 +0200)] 
multipath-shutdown: fix shell syntax

seems like a misplaced $()

5 years agodracut.spec: remove warpclock from z-series, not the other way round
Harald Hoyer [Mon, 13 Aug 2018 09:30:03 +0000 (11:30 +0200)] 
dracut.spec: remove warpclock from z-series, not the other way round

5 years agoiscsi: remove $() where it does not fit
Harald Hoyer [Mon, 13 Aug 2018 08:56:53 +0000 (10:56 +0200)] 
iscsi: remove $() where it does not fit

also simplify iscsiadm command to one call

5 years agomdraid: better handling of various UUID formats
Harald Hoyer [Mon, 13 Aug 2018 08:01:36 +0000 (10:01 +0200)] 
mdraid: better handling of various UUID formats

5 years agodracut-functions: fix the word splitting
Lukas Nykryn [Thu, 9 Aug 2018 10:14:20 +0000 (12:14 +0200)] 
dracut-functions: fix the word splitting

5 years agoAdd gpio and pinctrl drivers for arm*/aarch64
Nicolas Chauvet [Fri, 3 Aug 2018 21:39:51 +0000 (23:39 +0200)] 
Add gpio and pinctrl drivers for arm*/aarch64

This is needed since few gpio/pinctrl can be built as modules and are
useful on early boot.

One example is jetson-tx1 where sata and external mmc can work only
after loading pinctrl-max77620 and gpio-max77620 modules.

Having theses kind of drivers bundled into the initramfs will also
avoid some deferred probes.

V2: add pinctrl for all arches

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
5 years agomdraid/parse-md.sh: also accept rd.md.uuid with ":"
Harald Hoyer [Thu, 2 Aug 2018 14:32:41 +0000 (16:32 +0200)] 
mdraid/parse-md.sh: also accept rd.md.uuid with ":"

convert rd.md.uuid=32ef2172:f056:6fa7:66a8:2f7fc8b1798
to udev rules in the correct UUID format 32ef2172-f056-6fa7-66a8-2f7fcf8b1798

5 years agospec: sort modules
Yu Watanabe [Sun, 29 Jul 2018 17:26:48 +0000 (02:26 +0900)] 
spec: sort modules

Also drops remaining %defattr.

5 years agospec: warpclock is not available on s390 or s390x
Yu Watanabe [Sun, 29 Jul 2018 17:26:01 +0000 (02:26 +0900)] 
spec: warpclock is not available on s390 or s390x

5 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

5 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

5 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

5 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>
5 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.

5 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>
5 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

5 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>
5 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

5 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

5 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

5 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

5 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

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

5 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

5 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>

5 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.

5 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

5 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

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

5 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.

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

5 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

5 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>.

5 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

5 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

5 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>
5 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

5 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

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

5 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.

5 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

5 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>
5 years agoFixed issue #420
Sullivan (CTR), Austin [Wed, 27 Jun 2018 14:33:09 +0000 (10:33 -0400)] 
Fixed issue #420

5 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>
5 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>
5 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).

5 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.

5 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.

5 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>
5 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>
5 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.

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

5 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.

5 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.

5 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>
5 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.

5 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>
5 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

5 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.

5 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

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

5 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

5 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

5 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

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

5 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

5 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>
5 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.

6 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>
6 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>
6 years agofix zstd magic header
tpgxyz [Wed, 18 Apr 2018 18:57:33 +0000 (20:57 +0200)] 
fix zstd magic header

6 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.

6 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

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

6 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

6 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
6 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

6 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

6 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

6 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

6 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

6 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>
6 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

6 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

6 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>