]> git.ipfire.org Git - thirdparty/dracut.git/log
thirdparty/dracut.git
4 years agofeat: add addional global variables
Jóhann B. Guðmundsson [Tue, 19 Jan 2021 22:36:37 +0000 (22:36 +0000)] 
feat: add addional global variables

4 years agofix: add a missing efi support
Jóhann B. Guðmundsson [Sat, 16 Jan 2021 17:44:00 +0000 (17:44 +0000)] 
fix: add a missing efi support

4 years agochore(removal): eliminate bootchart module
Jóhann B. Guðmundsson [Mon, 18 Jan 2021 11:33:42 +0000 (11:33 +0000)] 
chore(removal): eliminate bootchart module

4 years agochore(removal): eliminate bootchart module
Jóhann B. Guðmundsson [Mon, 18 Jan 2021 11:30:34 +0000 (11:30 +0000)] 
chore(removal): eliminate bootchart module

4 years agochore(removal): eliminate bootchart module
Jóhann B. Guðmundsson [Mon, 18 Jan 2021 11:28:06 +0000 (11:28 +0000)] 
chore(removal): eliminate bootchart module

4 years agofeat: add addional global variables
Jóhann B. Guðmundsson [Sun, 17 Jan 2021 22:44:17 +0000 (22:44 +0000)] 
feat: add addional global variables

4 years agofeat(cli): add --no-uefi option
Vladius25 [Wed, 13 Jan 2021 11:32:13 +0000 (16:32 +0500)] 
feat(cli): add --no-uefi option

To be able to turn off UEFI mode, when it's enabled in config.

4 years agochore(github): add CODEOWNERS file
Harald Hoyer [Thu, 14 Jan 2021 09:56:23 +0000 (10:56 +0100)] 
chore(github): add CODEOWNERS file

All CODEOWNERS are automatically added as reviewers.

4 years agochore(cleanup): remove logrotate file
Jóhann B. Guðmundsson [Thu, 14 Jan 2021 11:49:19 +0000 (11:49 +0000)] 
chore(cleanup): remove logrotate file

4 years agofix(35network-manager): avoid restarting NetworkManager
Yang Liu [Mon, 11 Jan 2021 08:50:45 +0000 (03:50 -0500)] 
fix(35network-manager): avoid restarting NetworkManager

On EL8.3 the NetworkManager keep restarting even if it exits successfully while waiting for Clevis to unlock. This patch ensures NetworkManager runs only once in initrd.

4 years agochore: Add configuration for vim
Jóhann B. Guðmundsson [Fri, 25 Dec 2020 16:48:16 +0000 (16:48 +0000)] 
chore: Add configuration for vim

4 years agochore: Add editorconfig
Jóhann B. Guðmundsson [Fri, 25 Dec 2020 16:47:49 +0000 (16:47 +0000)] 
chore: Add editorconfig

4 years agochore: Editors
Jóhann B. Guðmundsson [Fri, 25 Dec 2020 16:46:53 +0000 (16:46 +0000)] 
chore: Editors

4 years agoci: add testing with Fedora 33
Harald Hoyer [Tue, 15 Dec 2020 13:36:11 +0000 (14:36 +0100)] 
ci: add testing with Fedora 33

To test a more recent version of Fedora, add Fedora 33.

4 years agotest(conventional): add Conventional Commits PR github action
Harald Hoyer [Mon, 14 Dec 2020 15:18:02 +0000 (16:18 +0100)] 
test(conventional): add Conventional Commits PR github action

To ease the creation of the release notes, enforce some style on the git
commit message titles with `Commisery`.

https://github.com/marketplace/actions/commisery

Using https://github.com/clog-tool/clog-cli later on these commits will
generate a pretty nice base for the release notes.

4 years agodocs(development): add HACKING.md
Harald Hoyer [Mon, 14 Dec 2020 15:21:30 +0000 (16:21 +0100)] 
docs(development): add HACKING.md

Merge HACKING, README.modules, README.testsuite into HACKING.md.

Provide a new paragraph about git commit messages.

4 years agoUpdate AUTHORS, NEWS 051
Daniel Molkentin [Wed, 5 Aug 2020 15:27:16 +0000 (17:27 +0200)] 
Update AUTHORS, NEWS

4 years agoDrop 51-dracut-rescue-postinst.sh entirely
Adam Williamson [Thu, 26 Nov 2020 19:29:45 +0000 (11:29 -0800)] 
Drop 51-dracut-rescue-postinst.sh entirely

It is only installed on RHEL 8+, but as noted in the first commit
that tried to do this - 0bb9a683 - we already have branches for
all RHEL releases, so there's no point keeping such a conditional
on the master branch. After 0bb9a683, 51-dracut-rescue-postinst.sh
was re-added because Fedora 30 needed it, with a FIXME saying to
remove it after F30 was released. But instead of that happening, it
got changed to a conditional to install it on Fedora <= 30 or RHEL
<= 8 in 9e68789d and the FIXME was removed, then in 9eb1d1ed that
conditional was simplified to only refer to RHEL, so we wound up
with this situation.

Note the last two commits were never ported to the RHEL-8 branch,
so it's broken, I will send a separate PR for that.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
4 years agoRevert "Retrieve service, rpc and protcol entries via getent in hostonly mode"
Daniel Molkentin [Mon, 14 Dec 2020 11:05:06 +0000 (12:05 +0100)] 
Revert "Retrieve service, rpc and protcol entries via getent in hostonly mode"

The underlying issues this was trying to solve is to get a cheap
workaround for the fact that (open)SUSE with atomic support moved
/etc stock files to /usr/etc in order to improve compatibility. But
now that even nsswitch.conf moved, this is no longer enough. And it
might be more trouble to support once it's in an official release.

So let's rather drop it now.

This reverts commit e0524af2bf83184e18d068bea4356a719d2385c2.

4 years agoAdding stalebot file
Jóhann B. Guðmundsson [Mon, 14 Dec 2020 00:04:06 +0000 (00:04 +0000)] 
Adding stalebot file

4 years agoRevert "Add --uefi-output for custom output filename"
Daniel Molkentin [Tue, 1 Dec 2020 23:18:37 +0000 (00:18 +0100)] 
Revert "Add --uefi-output for custom output filename"

This reverts commit f8f3b0f3588273e69b345d6d0602d6d2a1c5a819.

4 years agoImprove documentation of iso-scan/filename feature
Jiri Konecny [Fri, 27 Nov 2020 17:50:35 +0000 (18:50 +0100)] 
Improve documentation of iso-scan/filename feature

From the current man page it's really hard to tell what will be output of this
command.

4 years agomultipathd: fix the comparison
Lukas Nykryn [Fri, 27 Nov 2020 08:32:20 +0000 (09:32 +0100)] 
multipathd: fix the comparison

From shellcheck:
/usr/lib/dracut/modules.d/90multipath/multipathd.sh:3:32: warning[SC2039]: In POSIX sh, == in place of = is undefined.
/usr/lib/dracut/modules.d/90multipath/multipathd.sh:3:32: warning[SC2193]: The arguments to this comparison can never be equal.

4 years ago06dbus: consider dbus-broker
Daniel Molkentin [Tue, 24 Nov 2020 19:46:47 +0000 (20:46 +0100)] 
06dbus: consider dbus-broker

4 years ago06dbus: Add busctl as a more useful tool
Daniel Molkentin [Tue, 24 Nov 2020 19:01:07 +0000 (20:01 +0100)] 
06dbus: Add busctl as a more useful tool

4 years ago06dbus: Include dbus or messagebus group and user, depending on distro
Daniel Molkentin [Tue, 24 Nov 2020 18:59:29 +0000 (19:59 +0100)] 
06dbus: Include dbus or messagebus group and user, depending on distro

4 years ago35network-wicked: openSUSE Factory has reintroduced libexec
Daniel Molkentin [Tue, 24 Nov 2020 18:54:10 +0000 (19:54 +0100)] 
35network-wicked: openSUSE Factory has reintroduced libexec

4 years ago35network-wicked: install ip utility anyway
Daniel Molkentin [Tue, 24 Nov 2020 18:53:36 +0000 (19:53 +0100)] 
35network-wicked: install ip utility anyway

4 years ago35network-wicked: Run wicked early enough to unlock block devices
Daniel Molkentin [Tue, 24 Nov 2020 18:52:23 +0000 (19:52 +0100)] 
35network-wicked: Run wicked early enough to unlock block devices

4 years ago06dbus: Do not install superfluous services
Daniel Molkentin [Tue, 24 Nov 2020 18:42:55 +0000 (19:42 +0100)] 
06dbus: Do not install superfluous services

4 years ago40network: introduce wicked option
Daniel Molkentin [Fri, 21 Aug 2020 16:04:11 +0000 (18:04 +0200)] 
40network: introduce wicked option

4 years ago35network-wicked: introduce wicked support module
Daniel Molkentin [Fri, 21 Aug 2020 16:03:42 +0000 (18:03 +0200)] 
35network-wicked: introduce wicked support module

4 years ago06dbus: introduce dbus support
Daniel Molkentin [Fri, 21 Aug 2020 16:03:09 +0000 (18:03 +0200)] 
06dbus: introduce dbus support

4 years agoAdd --uefi-output for custom output filename
leo-lb [Tue, 8 Sep 2020 11:05:05 +0000 (13:05 +0200)] 
Add --uefi-output for custom output filename

Closes #921

4 years ago95fcoe: don't install if there is no FCoE hostonly devices
Kairui Song [Fri, 13 Nov 2020 10:08:47 +0000 (18:08 +0800)] 
95fcoe: don't install if there is no FCoE hostonly devices

When in hostonly mode, 95fcoe module will still be installed even there
is no FCoE hostonly device. So use the new block_is_fcoe helper to check
for hostonly device in hostonly mode, avoid installing unneccessary module.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years ago95fcoe: ensure needed modules are installed
Kairui Song [Mon, 16 Nov 2020 07:24:14 +0000 (15:24 +0800)] 
95fcoe: ensure needed modules are installed

If fcoe module is loaded, the initramfs will always try load libfcoe
and bnx2fc, so also ensure they are installed if needed.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years agodracut-install: Globbing support for resolving "firmware:"
Daniel Molkentin [Mon, 6 Jul 2020 12:43:34 +0000 (14:43 +0200)] 
dracut-install: Globbing support for resolving "firmware:"

Implements #849

4 years agodracut-bash-completion.sh: add positional argument completion
Gaël PORTAY [Tue, 14 Jul 2020 15:29:53 +0000 (11:29 -0400)] 
dracut-bash-completion.sh: add positional argument completion

4 years agoPrevent creating unexpected files on the host when running dracut
Petr Pavlu [Thu, 17 Sep 2020 14:18:44 +0000 (16:18 +0200)] 
Prevent creating unexpected files on the host when running dracut

Library file modules.d/99base/dracut-lib.sh contains initialization code
that makes sure certain directories and links are created when a system
runs from the produced initramfs. This file is normally sourced only
from initramfs scripts. However, modules.d/99base/module-setup.sh
includes it also when an initramfs image is being created to gain access
to some of the functions in this library. This can result in creating
unexpected directories and links on the current root file system when
the dracut command is executed.

For instance, during a system installation when dracut is invoked to
create an initial initramfs, the target sysroot might not contain
directory /run/initramfs but have /var/log. This situation results in
the code in modules.d/99base/dracut-lib.sh creating an unexpected link
/var/log/log that points to /run/initramfs/log. This link is then also
present on the installed system.

The patch fixes the problem by skipping the described logic in
modules.d/99base/dracut-lib.sh when the PREFIX variable is non-empty
which indicates that a target initramfs is being prepared. The variable
is set by modules.d/99base/module-setup.sh prior to including
dracut-lib.sh.

4 years agoconfigure: Find FTS library with --as-needed
A. Wilcox [Sun, 5 Apr 2020 09:52:19 +0000 (04:52 -0500)] 
configure: Find FTS library with --as-needed

When LDFLAGS contains ``-Wl,--as-needed``, the FTS library will be
ignored if it is specified before the .c source.

Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
Fixes: 62f27ee6f145 ("configure: find cflags and libs for fts on musl")
4 years agoDon't print when a module is explicitly omitted (by default)
Colin Walters [Fri, 16 Oct 2020 21:04:45 +0000 (21:04 +0000)] 
Don't print when a module is explicitly omitted (by default)

dracut builds today are fairly verbose to start, but on top of
that many of the messages tend to liberally use the
exclamation point `!` which calls attention to them.

I see these a lot when looking at rpm-ostree build logs
and it'd be nicer if we were quiet when there wasn't
an actual problem.

In this specific case, if the builder is explicitly adding
`--omit=foo`, there's no reason for us to say:

`dracut: dracut module 'foo' will not be installed, because it's in the list to be omitted!`

We already print the command line to start, so the information
is there.

Demote this message to debug.

4 years ago95nfs: /var/lib/nfs/statd/sm is /var/lib/nfs/sm on SUSE
Daniel Molkentin [Sat, 14 Nov 2020 15:10:55 +0000 (16:10 +0100)] 
95nfs: /var/lib/nfs/statd/sm is /var/lib/nfs/sm on SUSE

Reference: boo#1177462

4 years agoRetrieve service, rpc and protcol entries via getent in hostonly mode
Daniel Molkentin [Fri, 27 Mar 2020 13:22:37 +0000 (14:22 +0100)] 
Retrieve service, rpc and protcol entries via getent in hostonly mode

Sometimes, systems have more elaborate backends in nsswitch.conf,
the complexity of which we do not want in the initrd. SUSE systems
with atomic for instance, where those files may also reside in /usr/etc.

With this change, the unavaiable nsswitch.conf backends will be silently
ignored, and we still end up with all the information we need.

Reference: boo#1165366

4 years agoRemove uses of bash (and bash specific syntax) in runtime scripts
Daniel Molkentin [Mon, 19 Oct 2020 14:23:51 +0000 (16:23 +0200)] 
Remove uses of bash (and bash specific syntax) in runtime scripts

dracutinstall picks up interpreters and includes bash despite
the users' wishes or expectations, as modules should not require
bashisms at runtime.

Fixes #951

4 years ago90crypt: pull in remote-cryptsetup.target enablement
Jonathan Lebon [Thu, 12 Nov 2020 16:27:39 +0000 (11:27 -0500)] 
90crypt: pull in remote-cryptsetup.target enablement

This should've been part of #964. As mentioned there, the
`initrd-cryptsetup.target` approach was reverted in the end, and we went
back to relying in `remote-cryptsetup.target`:

https://github.com/systemd/systemd/pull/17467

So we do need to ship the enablement symlink for it.

4 years ago90multipath: install kpartx's 11-dm-parts.rules
David Tardon [Fri, 13 Nov 2020 09:45:59 +0000 (10:45 +0100)] 
90multipath: install kpartx's 11-dm-parts.rules

This makes /dev/disk/by-uuid links point to the right device.

4 years agoRevert "90crypt: ship initrd-cryptsetup.target"
Jonathan Lebon [Wed, 28 Oct 2020 13:13:34 +0000 (09:13 -0400)] 
Revert "90crypt: ship initrd-cryptsetup.target"

This reverts commit 8f56daa8c3c75b167823286553f223e5b46cd6ab.

The addition of `initrd-cryptsetup.target` was reverted in systemd:
https://github.com/systemd/systemd/pull/17467

4 years ago90qemu-net: install less module for strict hostonly mode
Kairui Song [Tue, 20 Oct 2020 09:52:03 +0000 (17:52 +0800)] 
90qemu-net: install less module for strict hostonly mode

4 years ago90qemu-net: in hostonly mode, only install if network is needed
Kairui Song [Tue, 20 Oct 2020 08:47:41 +0000 (16:47 +0800)] 
90qemu-net: in hostonly mode, only install if network is needed

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years ago95nfs: Install less module if hostonly mode is strict
Kairui Song [Mon, 19 Oct 2020 14:11:23 +0000 (22:11 +0800)] 
95nfs: Install less module if hostonly mode is strict

For strict hostonly mode, only install currently loaded modules instead
of a bunch of driver that may not be needed.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years ago90kernel-modules: Install less modules for hostonly mode
Kairui Song [Tue, 20 Oct 2020 09:30:03 +0000 (17:30 +0800)] 
90kernel-modules: Install less modules for hostonly mode

Rearrange some module installation mode, install less modules for
hostonly mode.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years ago90kernel-modules: install block drivers more strictly
Kairui Song [Tue, 20 Oct 2020 08:44:40 +0000 (16:44 +0800)] 
90kernel-modules: install block drivers more strictly

For strict hostonly mode, only install block drivers needed for hostonly
devices.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years ago04watchdog-modules: Simplify install_kernel using new added helper
Kairui Song [Mon, 12 Oct 2020 07:28:40 +0000 (15:28 +0800)] 
04watchdog-modules: Simplify install_kernel using new added helper

The new added get_dev_modules helper can help simplify the driver
detection code by a lot.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years agodracut-init.sh: Add a helper for detect device kernel modules
Kairui Song [Mon, 12 Oct 2020 07:18:45 +0000 (15:18 +0800)] 
dracut-init.sh: Add a helper for detect device kernel modules

Use udevadm to detect the required kernel modules to load a given
device. udevadm will follow the device chain, help detect all required
parent device drivers as well.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years agodracut-functions.sh: Fix check_block_and_slaves_all
Kairui Song [Tue, 13 Oct 2020 08:17:11 +0000 (16:17 +0800)] 
dracut-functions.sh: Fix check_block_and_slaves_all

check_block_and_slaves_all $func $dev should return 0, if $func return 0
for any checked device. Currently if any device don't have any sub
device, 1 is returned instead.

So remove the sub device checking statement. Also remove the same
statement in check_block_and_slaves, the "[[ -f $_x/dev ]]" in the for
loop is enought to ensure sub device exists.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years ago90kernel-network-modules: Don't install iscsi related module
Kairui Song [Tue, 20 Oct 2020 09:33:08 +0000 (17:33 +0800)] 
90kernel-network-modules: Don't install iscsi related module

These modules are installed in 95iscsi, no need to repeat here.

4 years agoAdd a --hostonly-nics option
Kairui Song [Wed, 21 Oct 2020 08:18:07 +0000 (16:18 +0800)] 
Add a --hostonly-nics option

Currently when network is enabled, dracut will install all network
drivers that are currently loaded, but some time only one NIC is needed
for the initramfs.

So for strict hostonly mode, add a --hostonly-nics option, user can
provide a list of NICs to be enabled, and only needed drivers for
specifed NICs will be installed so save space.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years agoConfigure the runner for team interfaces
Rumbaut Thomas [Fri, 23 Oct 2020 10:38:04 +0000 (12:38 +0200)] 
Configure the runner for team interfaces

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

4 years ago99squash: Check require module earlier, and properly
Kairui Song [Mon, 12 Oct 2020 07:23:30 +0000 (15:23 +0800)] 
99squash: Check require module earlier, and properly

Let 99squash fail earlier if required modules are not enabled or
missing, using the new added helper.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years agodracut-functions: add a helper to check if kernel module is available
Kairui Song [Tue, 20 Oct 2020 08:58:01 +0000 (16:58 +0800)] 
dracut-functions: add a helper to check if kernel module is available

It's like check_kernel_config, help to check if a kernel module is
enabled (cover built-in or compiled module case).

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years ago90crypt: ship initrd-cryptsetup.target
Jonathan Lebon [Tue, 20 Oct 2020 20:41:00 +0000 (16:41 -0400)] 
90crypt: ship initrd-cryptsetup.target

This was added in https://github.com/systemd/systemd/pull/17149 and is
the designated cryptsetup target for all encrypted volumes that need to
be opened in the initrd.

So it effectively replaces `cryptsetup.target` and
`remote-cryptsetup.target` there. I've removed the latter since it was
added recently (by me) in #930, but kept `cryptsetup.target` since we've
been shipping it for a long time now.

4 years agoRevert "90crypt: pull in remote-cryptsetup.target enablement"
Jonathan Lebon [Tue, 20 Oct 2020 20:41:11 +0000 (16:41 -0400)] 
Revert "90crypt: pull in remote-cryptsetup.target enablement"

This reverts commit 7ea391b527eb19c572a750fe00f95d02a50beabf.

We've moved away from this in
https://github.com/systemd/systemd/pull/17149.

4 years agodmsquash-live/iso-scan: Provide an easy reference to iso-scan device.
Frederick Grose [Tue, 20 Oct 2020 00:39:37 +0000 (20:39 -0400)] 
dmsquash-live/iso-scan: Provide an easy reference to iso-scan device.

With commit 3c8c807, /run/initramfs/isoscan and /run/initramfs/live
mountpoints are unmounted upon rd.live.ram boots.  Save a link to
the iso-scan device in /run/initramfs/isoscandev to easily remount
the source, if desired.

4 years ago99memstrack: use /bin/bash
Daniel Molkentin [Mon, 12 Oct 2020 11:49:46 +0000 (13:49 +0200)] 
99memstrack: use /bin/bash

/usr/local/bin causes trouble for distros that do not use /usr/bin == /bin
/usr/bin/env likewise, plus the use of env is not needed here

4 years ago98dracut-systemd: don't wait for root device if remote cryptsetup active
Jonathan Lebon [Fri, 9 Oct 2020 23:44:35 +0000 (19:44 -0400)] 
98dracut-systemd: don't wait for root device if remote cryptsetup active

This is a plain and simple hack around dependency issues between dracut
and systemd.

When using Tang-pinned LUKS root devices, we want to rely on
`systemd-cryptsetup@.service` to unlock it. However, that service only
runs `After=remote-fs-pre.target`, while `dracut-initqueue.service` has
`Before=remote-fs-pre.target` (which makes sense because we don't want
to attempt networked root devices before networking is up).

However, the rootfs-generator here wants to make sure that the root
device exists *before* exiting the initqueue via an initqueue/finished
"devexists" hook. This will never work though because by design
`systemd-cryptsetup@.service`, which unlocks the root device, won't run
until after we exit.

So we have a dependency cycle:

    initqueue -> devexists hook -> root device ->
        systemd-cryptsetup@.service -> remote-fs-pre.target -> initqueue

There's no clean way to break this. The root issue is that there's no
way right now to split sequencing of systemd services across the
initqueue/online and initqueue/finished events because it's all bundled
in a single service. (The deeper root issue of course is that we have
two init systems. :) ).

Here we do a tactical fix: if there's a `systemd-cryptsetup@.service`
instance, let's assume it's for the root device and skip waiting for it
to show up if it depends on `remote-fs-pre.target`.

4 years agocryptroot-ask: unify /etc/crypttab and rd.luks.key
Đoàn Trần Công Danh [Sat, 3 Oct 2020 07:53:27 +0000 (14:53 +0700)] 
cryptroot-ask: unify /etc/crypttab and rd.luks.key

dracut feeds whatever it receives in password field of
crypttab(5) to `cryptsetup -d`, treating them as plain-text key file.

Meanwhile, dracut treats the key file from `rd.luks.key` differently,
by have some special rules to decrypt those key files that has extension of
`gpg` and `img`.

Let's begin to treat them the same.

This is a backward-incompatible change for those people
that uses plain-text key-file that has extension of `gpg` and `img`.
However, those setup is questionable to begin with.

4 years ago90kernel-modules: arm: add drivers/hwmon for arm/arm64
Nicolas Chauvet [Wed, 7 Oct 2020 13:39:23 +0000 (15:39 +0200)] 
90kernel-modules: arm: add drivers/hwmon for arm/arm64

In the case of the s805x the drivers/hwmon directory contains the
scpi_hwmon kernel module.
On a running system, lsmod would output the following dependencies:
 arm_scpi               24576  2 clk_scpi,scpi_hwmon

It means that if the clock driver is bundled in the initramfs it will
bring arm_scpi. But if scpi_hwmon is missing the scpi will be incomplete
and it can lead to crashes.

When the hwmon is bundled, no crash occurs

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
4 years agorootfs-block: only write root argument for block device
Đoàn Trần Công Danh [Sat, 3 Oct 2020 07:23:26 +0000 (14:23 +0700)] 
rootfs-block: only write root argument for block device

Some filesystem (e.g. ZFS, and btrfs subvolumes) don't use block
devices. Should they be mounted as `/`, `find_root_block_device`
yields nothing, hence dracut will append this problematic argument
to kernel cmdline:

root=/dev/block

On a machine that employ root ZFS on LUKS, which was setup with
an OpenPGP-encrypted key file, this argument renders that machine
unbootable. Remove that `root=/dev/block` manually could boot the
machine.

Let check if that device is a block device before write down `root`
argument. This is consistent with the check for block device in
`find_block_device`.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
4 years ago90crypt: pull in remote-cryptsetup.target enablement
Jonathan Lebon [Thu, 24 Sep 2020 01:15:52 +0000 (21:15 -0400)] 
90crypt: pull in remote-cryptsetup.target enablement

This is enabled upstream in
https://github.com/systemd/systemd/pull/17149.

4 years ago00systemd: add missing cryptsetup-related targets
Jonathan Lebon [Wed, 23 Sep 2020 20:18:18 +0000 (16:18 -0400)] 
00systemd: add missing cryptsetup-related targets

We want these in the initramfs. Things related to clevis and systemd's
`cryptsetup-generator` reference these targets.

4 years ago95nvmf: Implement 'fc,auto' commandline syntax
Hannes Reinecke [Mon, 28 Sep 2020 12:02:28 +0000 (14:02 +0200)] 
95nvmf: Implement 'fc,auto' commandline syntax

Add a 'fc,auto' commandline syntax for nvmf.discover to force
nvmf autodiscovery on FC-NVMe.

Signed-off-by: Hannes Reinecke <hare@suse.de>
4 years ago95nvmf: add nvmf-autoconnect script
Hannes Reinecke [Mon, 28 Sep 2020 11:39:07 +0000 (13:39 +0200)] 
95nvmf: add nvmf-autoconnect script

Add a script to run FC autoconnect.

Signed-off-by: Hannes Reinecke <hare@suse.de>
4 years ago95nvmf: Fixup FC connections
Hannes Reinecke [Mon, 28 Sep 2020 11:39:07 +0000 (13:39 +0200)] 
95nvmf: Fixup FC connections

D-Bus doesn't run in the initrd, so our usual trick of activating
custom systemd services from udev doesn't work.
So add a rule to create initqueue entries for each possible
connection.

Signed-off-by: Hannes Reinecke <hare@suse.de>
4 years ago95nvmf: add documentation
Hannes Reinecke [Mon, 28 Sep 2020 09:38:40 +0000 (11:38 +0200)] 
95nvmf: add documentation

Add documentation for 95nvmf module to dracut.cmdline

Signed-off-by: Hannes Reinecke <hare@suse.de>
4 years ago95nvmf: rework parameter handling
Hannes Reinecke [Mon, 28 Sep 2020 09:25:53 +0000 (11:25 +0200)] 
95nvmf: rework parameter handling

Always add the nvmf.discover parameters to /etc/nvme/discovery
when parsing the dracut commandline, and rely on NVMe autodiscovery
when no parameters are given.
And modify the syntax to use a comma ',' as a separator for nvmf.discover
as the semicolon ':' is already used for the FC-NVMe transport address format.

Signed-off-by: Hannes Reinecke <hare@suse.de>
4 years agodracut-install: fix edge-case regression with weak modules
Daniel Molkentin [Thu, 1 Oct 2020 15:12:26 +0000 (17:12 +0200)] 
dracut-install: fix edge-case regression with weak modules

This was introduced with 6dafdda4a6bdb8721133e4267553c5d86564f9e8, but
is actually caused by the fact that modules that have already been
installed cause dracut_install() to return without adding the module
to the hashmap. This can happen if an earlier-run dracut module chose
to install the same module. Now modprobe statements like:

softdep usb_storage post: uas
softdep uas pre: usb_storage

(which look weird, but are perfectly valid), cause
dracut_install() to enter an infinite recursion if and only if
at least one of the files has previously been installed by another
module.

Fix this by also adding already installed modules to the hashmap.

4 years agodracut-install: ignore bogus preload libs
David Tardon [Thu, 1 Oct 2020 12:08:38 +0000 (14:08 +0200)] 
dracut-install: ignore bogus preload libs

If there are any nonexistent libraries listed in /etc/ld.so.preload, ldd
prints error messages like:

ERROR: ld.so: object '/usr/lib64/libfoo.so.1' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.

This causes resolve_deps() to return error, which leads to symlinks
(like usr/bin/awk) not being copied into the initrd.

4 years agodracut.spec: Use make macros
Harald Hoyer [Fri, 2 Oct 2020 11:50:40 +0000 (13:50 +0200)] 
dracut.spec: Use make macros

https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro

4 years agodracut.spec: remove fedora pre 30 quirks
Harald Hoyer [Fri, 2 Oct 2020 11:40:00 +0000 (13:40 +0200)] 
dracut.spec: remove fedora pre 30 quirks

4 years ago50drm: Check drm_encoder_init along drm_crtc_init
Nicolas Chauvet [Sat, 26 Sep 2020 13:01:55 +0000 (15:01 +0200)] 
50drm: Check drm_encoder_init along drm_crtc_init

Some modules are involved in the display output without to rely on
drm_crtc_init.

This is the case for the meson_dw_hdmi. This module need to be included
into the initramfs in both hostonly and generic modes.

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
4 years ago50drm: Include drm platform drivers in hostonly
Nicolas Chauvet [Sat, 26 Sep 2020 11:15:55 +0000 (13:15 +0200)] 
50drm: Include drm platform drivers in hostonly

On arm, many drm drivers are located in the plaform bus.

Adding the platform bus will allow drm drivers to be included in the
initramfs when using hostonly mode.

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
4 years ago50drm: fix ambiguous redirects
Nicolas Chauvet [Sat, 26 Sep 2020 12:50:31 +0000 (14:50 +0200)] 
50drm: fix ambiguous redirects

If i contains a space, there is a need to protect the variable usage in some cases.

This will occurs when a next patch will enable platform bus with such case:
'/sys/bus/platform/devices/Fixed MDIO bus.0'

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
4 years agoInclude devfreq drivers in initrd
Peter Robinson [Tue, 22 Sep 2020 11:01:17 +0000 (12:01 +0100)] 
Include devfreq drivers in initrd

Some SoCs now have drivers that user devfreq in early init and fail
if the drivers are missing so make sure we have them in the initrd.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
4 years agodracut.spec: include the 04watchdog-modules module
Beniamino Galvani [Sun, 20 Sep 2020 07:44:08 +0000 (09:44 +0200)] 
dracut.spec: include the 04watchdog-modules module

Include the 04watchdog-modules module that was added in 39d90012a652
("04watchdog: split the watchdog module install").

4 years ago90crypt: make `rd.luks.key` usable with encrypted keydev.
Antz [Sat, 29 Aug 2020 12:54:19 +0000 (14:54 +0200)] 
90crypt: make `rd.luks.key` usable with encrypted keydev.

Introduce prefix `keysource:` for the values of `rd.luks.partuuid`,
`rd.luks.serial` and `rd.luks.uuid`.
If specified, ask for passphrase instead of waiting for keydevs to come
online.

4 years ago04watchdog: split the watchdog module install
Kairui Song [Wed, 9 Sep 2020 18:18:02 +0000 (02:18 +0800)] 
04watchdog: split the watchdog module install

In some cases, user only want to include the watchdog module, not the
wdctl or any other userspace helper. For example, systemd have a
RebootWatchdogSec option that use watchdog to prevent reboot hangs. And
it can help prevent machines hangs when reboot directly within the
initramfs stage. So split the module installation to a standlone module.

Also when watchdog-module get included, install driver for all loaded
watchdog instaed of only install driver for active watchdog. Both
watchdog and watchdog-module return 255 in check(), so it's enabled only
when manually included, the watchdog may get configured/activated later.

Signed-off-by: Kairui Song <kasong@redhat.com>
4 years agofix graphics startup failure with the rhgb paramter in CentOS8.2
GuoChuang [Mon, 24 Aug 2020 06:03:48 +0000 (14:03 +0800)] 
fix graphics startup failure with the rhgb paramter in CentOS8.2

4 years agodracut.cmdline.7.asc: fix typo
Beniamino Galvani [Mon, 13 Jul 2020 06:51:33 +0000 (08:51 +0200)] 
dracut.cmdline.7.asc: fix typo

4 years agoAdd --version to man page
Daniel Molkentin [Fri, 28 Aug 2020 15:12:27 +0000 (17:12 +0200)] 
Add --version to man page

4 years agodracut.sh: Add --version
Daniel Molkentin [Mon, 17 Aug 2020 13:46:17 +0000 (15:46 +0200)] 
dracut.sh: Add --version

4 years agoFix CoC URL
Jóhann B. Guðmundsson [Fri, 28 Aug 2020 17:57:45 +0000 (17:57 +0000)] 
Fix CoC URL

4 years agoFix Unicode and dracut install labeler
Jóhann B. Guðmundsson [Fri, 28 Aug 2020 17:36:35 +0000 (17:36 +0000)] 
Fix Unicode and dracut install labeler

4 years agoFix Unicode
Jóhann B. Guðmundsson [Fri, 28 Aug 2020 17:11:41 +0000 (17:11 +0000)] 
Fix Unicode

4 years agoAdding security policy
Jóhann B. Guðmundsson [Fri, 28 Aug 2020 16:21:08 +0000 (16:21 +0000)] 
Adding security policy

4 years agoAdding documentation template
Jóhann B. Guðmundsson [Fri, 28 Aug 2020 16:03:37 +0000 (16:03 +0000)] 
Adding documentation template

4 years agoAdding a feature request template
Jóhann B. Guðmundsson [Fri, 28 Aug 2020 16:02:40 +0000 (16:02 +0000)] 
Adding a feature request template

4 years agoAdding a bug report template
Jóhann B. Guðmundsson [Fri, 28 Aug 2020 16:02:20 +0000 (16:02 +0000)] 
Adding a bug report template

4 years agoDo not start inside container
Tomasz Paweł Gajc [Wed, 26 Aug 2020 09:19:24 +0000 (11:19 +0200)] 
Do not start inside container

Host should take care of good entropy pool
#791

4 years agoAdding a pull request template
Jóhann B. Guðmundsson [Fri, 28 Aug 2020 11:47:06 +0000 (11:47 +0000)] 
Adding a pull request template

4 years agoAdding code of conduct
Jóhann B. Guðmundsson [Fri, 28 Aug 2020 10:33:50 +0000 (10:33 +0000)] 
Adding code of conduct