-
Notifications
You must be signed in to change notification settings - Fork 396
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
base: master
Are you sure you want to change the base?
Conversation
…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.
@@ -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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
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. |
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. |
This is a follow up to #2410:
rd.driver.pre
to cmdline if the kernel hasbtrfs
built-inrd.driver.pre
to cmdline with--no-kernel
Checklist