Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes related to rd.driver.pre #2412

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aafeijoo-suse
Copy link
Member

This is a follow up to #2410:

  • fix(btrfs): do not add rd.driver.pre to cmdline if the kernel has btrfs built-in
  • fix(multipath): do not add rd.driver.pre to cmdline with --no-kernel

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

…fs built-in

`rd.driver.pre` tries to load kernel modules using `modprobe` at boot time, but
if the kernel has btrfs built-in, there is no need to do this.

Also, only add kernel cmdline options if `hostonly_cmdline` is `yes`.
If the initrd is built without kernel modules, there is no need to require
modules via `rd.driver.pre`.

Also, explicitly check if `hostonly_cmdline` is `yes`, because it can be `no`,
so the current check is invalid.
@github-actions github-actions bot added modules Issue tracker for all modules btrfs Issues related to the btrfs module multipath Issues related to the multipath module labels Jun 21, 2023
@tblume tblume requested review from tblume and removed request for tblume June 21, 2023 13:54
@@ -26,13 +26,22 @@ depends() {
cmdline() {
# Hack for slow machines
# see https://github.com/dracutdevs/dracut/issues/658
printf " rd.driver.pre=btrfs"
if grep -m 1 -q -w btrfs /proc/modules; then
Copy link
Collaborator

@LaszloGombos LaszloGombos Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this work if the running kernel on the host and the target kernel for the generated initramfs are not the same (e.g. after a kernel update but still running the old kernel before a reboot) ?

Slightly related - 3f60444

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this work if the running kernel on the host and the target kernel for the generated initramfs are not the same

No, it's the same approach implemented for multipath. Suggestions are welcome.

Copy link
Collaborator

@LaszloGombos LaszloGombos Jun 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should try to find a way to do the /proc/modules check during actual boot time when initramfs is executed and not when initramfs is built.

For /proc/filesystem checking the solution is to do it boot time already - see #1919 and related PRs.

Ideally we also find a solution that works for all modules so that not each module should worry about this (e.g. doing it in the base or kernel-modules module).

@stale
Copy link

stale bot commented Aug 9, 2023

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

@stale stale bot added the stale communication is stuck label Aug 9, 2023
@aafeijoo-suse aafeijoo-suse removed the stale communication is stuck label Aug 10, 2023
@stale
Copy link

stale bot commented Sep 16, 2023

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

@stale stale bot added the stale communication is stuck label Sep 16, 2023
@aafeijoo-suse aafeijoo-suse removed the stale communication is stuck label Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
btrfs Issues related to the btrfs module modules Issue tracker for all modules multipath Issues related to the multipath module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants